#include <Fl_Pack.h>
Inheritance diagram for Fl_Pack:
Public Types | |
enum | Types { NORMAL = GROUP_TYPE, VERTICAL = NORMAL, HORIZONTAL = GROUP_TYPE+1 } |
values for type(int). More... | |
Public Methods | |
Fl_Pack (int x, int y, int w,int h, const char *label=0) | |
Creates new pack widget using the given position, size, and label string. | |
Fl_Pack (const char *l=0, int layout_size=30, Fl_Align layout_al=FL_ALIGN_TOP, int label_w=100) | |
Creates new pack widget using the label, size, alignment, and label_width. | |
virtual void | layout () |
int | spacing () const |
Get the number of extra pixels of blank space that are added between each child widgets. | |
void | spacing (int i) |
Set the number of extra pixels of blank space that are added between each child widgets. More... | |
Static Public Attributes | |
Fl_Named_Style * | default_style |
This is similar to layout widgets used by TK and some other toolkits.
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 FL_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 Fl_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 FL_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 FL_PACK_VERTICAL flag, you should call relayout() on the pack yourself.
The default box is FL_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.
Definition at line 41 of file Fl_Pack.h.
|
values for type(int).
|
|
Set the number of extra pixels of blank space that are added between each child widgets.
|