DUDS
Distributed Update of Data from Something
duds::ui::graphics::PriorityGridLayout::RowData Struct Reference

Internal data structure used by layout() to store information on each row that is only needed to place all the panels. More...

Collaboration diagram for duds::ui::graphics::PriorityGridLayout::RowData:

Public Types

typedef std::pair< unsigned int, PanelStatus * > KeyPanel
 Stores a panel priority key and a pointer to the associated PanelStatus object inside configs. More...
 

Public Member Functions

bool minCols (int mc) noexcept
 Ensures the minimum number of allocated columns includes the given index. More...
 
KeyPaneloperator[] (int c)
 

Public Attributes

bool heightExpand = false
 True when a panel requests height expansion. More...
 
std::vector< KeyPanelpanels
 The panels in column order, left to right. More...
 
ImageDimensions used = ImageDimensions(0, 0)
 Minimum used area of the panels. More...
 
int widthExpand = 0
 Number of panels requesting width expansion. More...
 

Detailed Description

Internal data structure used by layout() to store information on each row that is only needed to place all the panels.

Definition at line 130 of file PriorityGridLayout.hpp.

Member Typedef Documentation

◆ KeyPanel

Stores a panel priority key and a pointer to the associated PanelStatus object inside configs.

Definition at line 135 of file PriorityGridLayout.hpp.

Member Function Documentation

◆ minCols()

bool duds::ui::graphics::PriorityGridLayout::RowData::minCols ( int  mc)
noexcept

Ensures the minimum number of allocated columns includes the given index.

Parameters
mcThe minimum column number.
Postcondition
The panels vector will have enough allocated space to include the index mc.
Returns
True if no allocation was required, or false if the column did not previously exist.

Definition at line 16 of file PriorityGridLayout.cpp.

Referenced by operator[]().

◆ operator[]()

PriorityGridLayout::RowData::KeyPanel & duds::ui::graphics::PriorityGridLayout::RowData::operator[] ( int  c)

Definition at line 24 of file PriorityGridLayout.cpp.

Member Data Documentation

◆ heightExpand

bool duds::ui::graphics::PriorityGridLayout::RowData::heightExpand = false

True when a panel requests height expansion.

Definition at line 152 of file PriorityGridLayout.hpp.

Referenced by duds::ui::graphics::PriorityGridLayout::layout().

◆ panels

std::vector<KeyPanel> duds::ui::graphics::PriorityGridLayout::RowData::panels

The panels in column order, left to right.

A priority key of zero indicates an unused column; no space is given to such columns.

Definition at line 140 of file PriorityGridLayout.hpp.

Referenced by duds::ui::graphics::PriorityGridLayout::layout(), and operator[]().

◆ used

ImageDimensions duds::ui::graphics::PriorityGridLayout::RowData::used = ImageDimensions(0, 0)

Minimum used area of the panels.

Definition at line 144 of file PriorityGridLayout.hpp.

Referenced by duds::ui::graphics::PriorityGridLayout::layout().

◆ widthExpand

int duds::ui::graphics::PriorityGridLayout::RowData::widthExpand = 0

Number of panels requesting width expansion.

Definition at line 148 of file PriorityGridLayout.hpp.

Referenced by duds::ui::graphics::PriorityGridLayout::layout().


The documentation for this struct was generated from the following files: