Public Types | |
enum | { NORMAL, ALL_CHILDREN_VERTICAL } |
Public Member Functions | |
void | layout () |
PackedGroup (int x, int y, int w, int h, const char *l=0, bool begin=false) | |
int | spacing () const |
void | spacing (int i) |
This is most useful for layout menu/toolbars and work areas in your main window. You can get many layouts with this, except the top widgets always extend to the right edge and the left widgets always extend to the bottom. To change this, put the top or left widgets and resizable in a PackedGroup and nest that inside another one with the bottom and right widgets.
A child widget can change it's size by calling layout() on itself and this will rearrange all other widgets to accomodate the new height.
If resizable is not set, the PackedGroup itself resizes to surround the items, allowing it to be imbedded in a surrounding PackedGroup or ScrollGroup. This only works if all objects are horizontal or all are vertical.
Setting type(PackedGroup::ALL_CHILDREN_VERTICAL) will make it act like all the children have vertical() set.
|
Set a fixed-size gap between all the children. This defaults to zero. If you change this in an already-existing one, call relayout(). |