|
DUDS
|
Distributed Update of Data from Something
|
A variation of a Panel that can only be added to one layout at a time, and that keeps track of its own priority and the layout object. More...
#include <SingleLayoutPanel.hpp>
Public Member Functions | |
| virtual void | added (PriorityGridLayout *l, int p) |
| Records the layout object and priority that has been assigned to this panel. More... | |
| int | layoutPriority () const |
| Returns the priority assigned to this panel when added to a layout, or zero if not added. More... | |
| PriorityGridLayout * | owner () const |
| Returns the layout object that has added this Panel, or nullptr if no layout has the panel. More... | |
| GridLayoutConfig & | panelConfig () |
| Returns the panel's layout configuration. More... | |
| virtual void | removing (PriorityGridLayout *l, int p) |
| Records that the panel has been removed from the layout. More... | |
Public Member Functions inherited from duds::ui::graphics::Panel | |
| virtual void | added (PriorityGridLayout *pgl, unsigned int pri) |
| Informs the panel that it is being added to a layout. More... | |
| virtual void | removing (PriorityGridLayout *pgl, unsigned int pri) |
| Informs the panel that it is being removed from a layout. More... | |
| virtual const BppImage * | render (ImageLocation &offset, ImageDimensions &dim, PanelMargins &margin, int sizeStep)=0 |
| Returns the image of the rendered panel. More... | |
Private Attributes | |
| PriorityGridLayout * | pgl = nullptr |
| The layout object that has added this Panel, or nullptr if not added. More... | |
| unsigned int | pri = 0 |
| The priority value assigned to this Panel when added to a layout. More... | |
A variation of a Panel that can only be added to one layout at a time, and that keeps track of its own priority and the layout object.
By tracking its layout and priority, the SingleLayoutPanel offers the panelConfig() function that makes it easier to modify its layout configuration.
Definition at line 25 of file SingleLayoutPanel.hpp.
|
virtual |
Records the layout object and priority that has been assigned to this panel.
| PanelAlreadyAddedError | SingleLayoutPanel objects may only be used by one layout at any given time. The exception will prevent the layout from adding this panel. |
Definition at line 24 of file SingleLayoutPanel.cpp.
Referenced by layoutPriority().
|
inline |
Returns the priority assigned to this panel when added to a layout, or zero if not added.
Definition at line 46 of file SingleLayoutPanel.hpp.
|
inline |
Returns the layout object that has added this Panel, or nullptr if no layout has the panel.
Definition at line 39 of file SingleLayoutPanel.hpp.
| GridLayoutConfig & duds::ui::graphics::SingleLayoutPanel::panelConfig | ( | ) |
Returns the panel's layout configuration.
The configuration may be modified, but not in a thread-safe manner. If modifications are made, PriorityGridLayout::layout() must be called prior to rendering again.
| PanelNotAddedError | The panel has not been added to a layout, or has been removed from a layout, so it has no layout configuration. |
Definition at line 17 of file SingleLayoutPanel.cpp.
Referenced by layoutPriority().
|
virtual |
Records that the panel has been removed from the layout.
After removal, the panel may be added to a layout.
Definition at line 34 of file SingleLayoutPanel.cpp.
Referenced by layoutPriority().
|
private |
The layout object that has added this Panel, or nullptr if not added.
Definition at line 29 of file SingleLayoutPanel.hpp.
Referenced by added(), owner(), panelConfig(), and removing().
|
private |
The priority value assigned to this Panel when added to a layout.
Definition at line 33 of file SingleLayoutPanel.hpp.
Referenced by added(), layoutPriority(), panelConfig(), and removing().