|
DUDS
|
Distributed Update of Data from Something
|
Represents something being drawn in a rectangular region defined by a PriorityGridLayout object. More...
#include <Panel.hpp>
Public Member Functions | |
| 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... | |
Represents something being drawn in a rectangular region defined by a PriorityGridLayout object.
A panel may be added to any number of layout objects, and may be added to one layout multiple times. Each layout identifies a panel by a priority value unique for the layout.
Panels must be managed by a std::shared_ptr.
|
virtual |
Informs the panel that it is being added to a layout.
The default implementation does nothing.
| pgl | The layout object that is adding the panel. |
| pri | The priority assigned to the panel. This priority is unique for the layout instance, but is not unique between different layout instances. |
| object | Any exception will prevent the panel from being added to the layout. The exception will be rethrown by the layout. |
|
virtual |
Informs the panel that it is being removed from a layout.
The default implementation does nothing.
| pgl | The layout object that is removing the panel. |
| pri | The priority assigned to the panel that is being removed. |
| object | Any exception will prevent the panel from being removed from the layout. The exception will be rethrown by the layout. |
|
pure virtual |
Returns the image of the rendered panel.
| offset | The location within the returned image that will be the upper left corner of the visible panel. This is initialized to (0,0). |
| dim | The dimensions of the panel to render. This is initialized to the maximum dimensions alloted to the panel and must not be made larger. It needs to be set to the dimensions of the returned image to show. |
| margin | The size of a clear (0) border around the panel's image. This is initialized to all zeros. The margin must fit within the panel's dimensions, so if a margin is used, dim must be made smaller. Any edge justification of the panel, or centering, will include the size of the margin. |
| sizeStep | The index of the panel's size-step that was chosen during layout. |
Implemented in duds::ui::graphics::EmptyPanel.