|
DUDS
|
Distributed Update of Data from Something
|
Informs a PriorityGridLayout object where to place and how large to make Panel objects. More...
#include <GridLayoutConfig.hpp>
Public Types | |
| typedef duds::general::BitFlags< struct GridLayoutConfigFlags > | Flags |
| The type for configuration flags that adjust how the panel is placed. More... | |
Public Member Functions | |
| GridLayoutConfig ()=default | |
| Makes a new configuration that lacks any size-steps and has the default flags. More... | |
| GridLayoutConfig (const GridSizeSteps &gss, Flags flg) | |
| Constructs a new grid layout. More... | |
| GridLayoutConfig (GridSizeSteps &&gss, Flags flg) | |
| Constructs a new grid layout. More... | |
| GridLayoutConfig (const GridSizeSteps &gss) | |
| Constructs a new grid layout. More... | |
| GridLayoutConfig (GridSizeSteps &&gss) | |
| Constructs a new grid layout. More... | |
| GridLayoutConfig (const GridSizeStep &step) | |
| Generates a configuration using the given size-step as a template. More... | |
| GridLayoutConfig (GridSizeStep &&step) | |
| Generates a configuration using the given size-step as a template. More... | |
| void | center () |
| Sets all the positioning flags to indicate the panel should be centered horizontally and vertically. More... | |
| void | centerHoriz () |
| Sets the horizontal positioning flags to indicate the panel should be centered. More... | |
| void | centerVert () |
| Sets the vertcal positioning flags to indicate the panel should be centered. More... | |
| void | hide () |
| Sets the flag to hide the panel. More... | |
| void | justifyDown () |
| Sets the vertcal positioning flags to indicate the panel should be justified to the bottom edge. More... | |
| void | justifyLeft () |
| Sets the horizontal positioning flags to indicate the panel should be justified to the left edge. More... | |
| void | justifyRight () |
| Sets the horizontal positioning flags to indicate the panel should be justified to the right edge. More... | |
| void | justifyUp () |
| Sets the vertcal positioning flags to indicate the panel should be justified to the top edge. More... | |
| void | show () |
| Clear the flag to show the panel. More... | |
Public Attributes | |
| Flags | flags = Flags::Zero() |
| The configuration flags used for the panel for all of its size-steps. More... | |
| GridSizeSteps | sizes |
| The size-steps for the panel. More... | |
Static Public Attributes | |
| static constexpr Flags | PanelCenter = PanelCenterHoriz | PanelCenterVert |
| Center the panel horizontally and vertically within its grid spot. More... | |
| static constexpr Flags | PanelCenterHoriz = Flags::Bit(5) |
| Center the panel horizontally within its grid spot. More... | |
| static constexpr Flags | PanelCenterVert = Flags::Bit(6) |
| Center the panel vertically within its grid spot. More... | |
| static constexpr Flags | PanelExpand = PanelWidthExpand | PanelHeightExpand |
| Request both width and height expansion. More... | |
| static constexpr Flags | PanelHeightExpand = Flags::Bit(2) |
| Request that this panel's height be expanded past the requested minumum if there is extra space available on the output image. More... | |
| static constexpr Flags | PanelHidden = Flags::Bit(0) |
| The panel is not showm; this prevents it from being placed in the layout. More... | |
| static constexpr Flags | PanelJustifyDown = Flags::Bit(4) |
| Place the panel's bottom edge to the far bottom in its grid spot. More... | |
| static constexpr Flags | PanelJustifyLeft = Flags::Zero() |
| Place the panel's left edge to the far left in its grid spot. More... | |
| static constexpr Flags | PanelJustifyRight = Flags::Bit(3) |
| Place the panel's right edge to the far right in its grid spot. More... | |
| static constexpr Flags | PanelJustifyUp = Flags::Zero() |
| Place the panel's top edge to the far top in its grid spot. More... | |
| static constexpr Flags | PanelPositionHorizMask |
| Mask of all configuration flags affecting a panel's horizontal positioning. More... | |
| static constexpr Flags | PanelPositionMask |
| Mask of all configuration flags affecting panel position. More... | |
| static constexpr Flags | PanelPositionVertMask |
| Mask of all configuration flags affecting a panel's vertical positioning. More... | |
| static constexpr Flags | PanelShown = Flags::Zero() |
| The panel is shown. More... | |
| static constexpr Flags | PanelWidthExpand = Flags::Bit(1) |
| Request that this panel's width be expanded past the requested minumum if there is extra space available on the row. More... | |
Informs a PriorityGridLayout object where to place and how large to make Panel objects.
Definition at line 30 of file GridLayoutConfig.hpp.
| typedef duds::general::BitFlags<struct GridLayoutConfigFlags> duds::ui::graphics::GridLayoutConfig::Flags |
The type for configuration flags that adjust how the panel is placed.
Definition at line 45 of file GridLayoutConfig.hpp.
|
default |
Makes a new configuration that lacks any size-steps and has the default flags.
Referenced by GridLayoutConfig().
|
inline |
Constructs a new grid layout.
| gss | The size-steps for a panel. |
| flg | The configuration flags. |
Definition at line 139 of file GridLayoutConfig.hpp.
|
inline |
Constructs a new grid layout.
| gss | The size-steps for a panel; these are moved into this new object. |
| flg | The configuration flags. |
Definition at line 147 of file GridLayoutConfig.hpp.
|
inline |
Constructs a new grid layout.
| gss | The size-steps for a panel. |
Definition at line 153 of file GridLayoutConfig.hpp.
|
inline |
Constructs a new grid layout.
| gss | The size-steps for a panel; these are moved into this new object. |
Definition at line 159 of file GridLayoutConfig.hpp.
| duds::ui::graphics::GridLayoutConfig::GridLayoutConfig | ( | const GridSizeStep & | step | ) |
Generates a configuration using the given size-step as a template.
The size-step is copied to be the only item in sizes, and the configuration flags are also copied into flags.
Definition at line 30 of file GridLayoutConfig.cpp.
| duds::ui::graphics::GridLayoutConfig::GridLayoutConfig | ( | GridSizeStep && | step | ) |
Generates a configuration using the given size-step as a template.
The size-step is moved into sizes, and the configuration flags are also copied into flags.
Definition at line 34 of file GridLayoutConfig.cpp.
|
inline |
Sets all the positioning flags to indicate the panel should be centered horizontally and vertically.
Definition at line 218 of file GridLayoutConfig.hpp.
|
inline |
Sets the horizontal positioning flags to indicate the panel should be centered.
Definition at line 190 of file GridLayoutConfig.hpp.
|
inline |
Sets the vertcal positioning flags to indicate the panel should be centered.
Definition at line 211 of file GridLayoutConfig.hpp.
|
inline |
Sets the flag to hide the panel.
Definition at line 224 of file GridLayoutConfig.hpp.
|
inline |
Sets the vertcal positioning flags to indicate the panel should be justified to the bottom edge.
Definition at line 204 of file GridLayoutConfig.hpp.
|
inline |
Sets the horizontal positioning flags to indicate the panel should be justified to the left edge.
This is the default configuration.
Definition at line 176 of file GridLayoutConfig.hpp.
|
inline |
Sets the horizontal positioning flags to indicate the panel should be justified to the right edge.
Definition at line 183 of file GridLayoutConfig.hpp.
|
inline |
Sets the vertcal positioning flags to indicate the panel should be justified to the top edge.
This is the default configuration.
Definition at line 197 of file GridLayoutConfig.hpp.
|
inline |
Clear the flag to show the panel.
Definition at line 230 of file GridLayoutConfig.hpp.
| Flags duds::ui::graphics::GridLayoutConfig::flags = Flags::Zero() |
The configuration flags used for the panel for all of its size-steps.
The actual flags used will be the result of OR'ing these flags with the ones of the selected size-step.
Definition at line 128 of file GridLayoutConfig.hpp.
Referenced by duds::ui::graphics::PriorityGridLayout::PanelStatus::flags().
|
static |
Center the panel horizontally and vertically within its grid spot.
Definition at line 105 of file GridLayoutConfig.hpp.
Referenced by duds::ui::graphics::GridSizeStep::center().
|
static |
Center the panel horizontally within its grid spot.
Definition at line 97 of file GridLayoutConfig.hpp.
Referenced by duds::ui::graphics::GridSizeStep::centerHoriz(), and duds::ui::graphics::PriorityGridLayout::render().
|
static |
Center the panel vertically within its grid spot.
Definition at line 101 of file GridLayoutConfig.hpp.
Referenced by duds::ui::graphics::GridSizeStep::centerVert(), and duds::ui::graphics::PriorityGridLayout::render().
|
static |
Request both width and height expansion.
Definition at line 75 of file GridLayoutConfig.hpp.
|
static |
Request that this panel's height be expanded past the requested minumum if there is extra space available on the output image.
All panels in the same row will be given the same height. If multiple panels on the row make this request, the result is the same as one panel making the request. If multiple panels in different rows make this request, extra height will be provided about evenly among the rows.
Definition at line 71 of file GridLayoutConfig.hpp.
Referenced by duds::ui::graphics::PriorityGridLayout::layout().
|
static |
The panel is not showm; this prevents it from being placed in the layout.
Use this to temporarily make a panel disappear without having to remove configuration data from vectors.
Definition at line 51 of file GridLayoutConfig.hpp.
Referenced by hide(), duds::ui::graphics::GridSizeStep::hide(), duds::ui::graphics::PriorityGridLayout::layout(), and duds::ui::graphics::GridSizeStep::show().
|
static |
Place the panel's bottom edge to the far bottom in its grid spot.
Definition at line 93 of file GridLayoutConfig.hpp.
Referenced by duds::ui::graphics::GridSizeStep::justifyDown(), and duds::ui::graphics::PriorityGridLayout::render().
|
static |
Place the panel's left edge to the far left in its grid spot.
This is the default.
Definition at line 80 of file GridLayoutConfig.hpp.
|
static |
Place the panel's right edge to the far right in its grid spot.
Definition at line 84 of file GridLayoutConfig.hpp.
Referenced by duds::ui::graphics::GridSizeStep::justifyRight(), and duds::ui::graphics::PriorityGridLayout::render().
|
static |
Place the panel's top edge to the far top in its grid spot.
This is the default.
Definition at line 89 of file GridLayoutConfig.hpp.
|
static |
Mask of all configuration flags affecting a panel's horizontal positioning.
Definition at line 110 of file GridLayoutConfig.hpp.
Referenced by duds::ui::graphics::GridSizeStep::centerHoriz(), duds::ui::graphics::GridSizeStep::justifyLeft(), and duds::ui::graphics::GridSizeStep::justifyRight().
|
static |
Mask of all configuration flags affecting panel position.
Definition at line 121 of file GridLayoutConfig.hpp.
Referenced by duds::ui::graphics::GridSizeStep::center().
|
static |
Mask of all configuration flags affecting a panel's vertical positioning.
Definition at line 116 of file GridLayoutConfig.hpp.
Referenced by duds::ui::graphics::GridSizeStep::centerVert(), duds::ui::graphics::GridSizeStep::justifyDown(), and duds::ui::graphics::GridSizeStep::justifyUp().
|
static |
|
static |
Request that this panel's width be expanded past the requested minumum if there is extra space available on the row.
If multiple panels on the row make this request, extra width will be provided about evenly among the panels.
Definition at line 62 of file GridLayoutConfig.hpp.
Referenced by duds::ui::graphics::PriorityGridLayout::layout().
| GridSizeSteps duds::ui::graphics::GridLayoutConfig::sizes |
The size-steps for the panel.
The size-steps are given in order of precedence; the layout will use the first size-step, starting at index 0, that fits. A size-step does not fit if it is too large for the remaining area, or if its grid location is already taken by a higher priority Panel.
If no size-steps are present (sizes.empty() is true), the corresponding Panel will not be placed.
Definition at line 41 of file GridLayoutConfig.hpp.
Referenced by duds::ui::graphics::PriorityGridLayout::PanelStatus::currentStep(), duds::ui::graphics::PriorityGridLayout::PanelStatus::flags(), and GridLayoutConfig().