fltk::Group | +----fltk::Pack
#include <fltk/Pack.h>
In the above image the widgets 1,4,7, and 8 have the fltk::PACK_VERTICAL bit on in their flags(). The widgets are numbered with the order they were added to the pack.
Each child widget is stretched (ie one of it's dimensions is changed and the other left alone) to completely fill the remaining space on one edge of the pack and placed against all the previous widgets on that edge.
Any widget with the fltk::PACK_VERTICAL bit (8) set in the flags() are placed against the left or right edge, otherwise against the top or bottom edge. (If type() of the pack is set to fltk::Pack::HORIZONTAL then it will "pack horzontally" which means that all widgets are packed against the left or right edges, whether or not they have fltk::PACK_VERTICAL turned on)
All widgets before the resizable() widget are placed against the top and left edge, all widgets after the resizable() widget are placed against the bottom and right edge in backwards order. If the resizable() is not set, all widgets are placed against the top and left edge, and the pack itself resizes to surround them. Such a pack must be imbedded in another pack or be the only child of a window so that this resizing can be used to layout the parent widget.
If any child changes size the pack automatically re-layouts and possibly changes it's own size to accomodate it. If you add, move, remove, hide, or show a child widget, or change the fltk::PACK_VERTICAL flag, you should call relayout() on the pack yourself.
The default box is fltk::FLAT_BOX. If you set it to something else the border of the box is drawn and the widgets are packed against the inside of this border.