
Depending on the values passed to the constructor, components are laid out horizontally (in a row) or vertically (in a column), aligned as specified and with an inter-component space of gp. If the container using this manager offers enough space, components receive their preferred size. Otherwise, they are scaled down according to their respective requests. This layout manager ignores any constraint passed to its add function.
Public Types | |
| enum | { HORIZONTAL, VERTICAL } |
| enum | { CENTER = 0, LEFT = 1, RIGHT = 2 } |
| enum | { TOP = 1, BOTTOM = 2 } |
Public Member Functions | |
| void | add (Component *, const LayoutConstraint *) |
| adds a component to be laid out later | |
| void | layout (Widget *, const Bounds &) |
| lays out the given object | |
| Size | preferredLayoutSize (const Widget *) const |
| calculates the preferred size for the given object | |
| void | remove (Component *) |
| removes a component | |
| StackLayout (char or=HORIZONTAL, char al=LEFT, int gp=0) | |
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
||||||||||||
|
adds a component to be laid out later
The components are only modified when
Implements ONE::gui::LayoutManager. |
|
||||||||||||
|
lays out the given object
This function will rearrange and resize
Implements ONE::gui::LayoutManager. |
|
|
calculates the preferred size for the given object
The size is calculated based on this layout manager's layout strategy and the content's preferred sizes. Note, hovever, that this function does not check for the presence of a border around
Implements ONE::gui::LayoutManager. |
|
|
removes a component
Implements ONE::gui::LayoutManager. |
1.4.3