PackedGroup Class Reference

Inherits Group.

List of all members.

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)


Detailed Description

Resizes all the child widgets to be the full width and stacks them. All widgets before the resizable() (or all of them if there is no resizable()) are pushed against the top of this widget, all widgets after the resizable() are pushed against the bottom, and the resizable() fills the remaining space. Child widgets that have vertical() true are pushed against the left/right edge.

Fl_Pack.gif

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.


Member Function Documentation

void PackedGroup::spacing int  i  )  [inline]
 

Set a fixed-size gap between all the children. This defaults to zero. If you change this in an already-existing one, call relayout().


The documentation for this class was generated from the following files:
Sun Jan 7 00:55:18 2007. FLTK ©2006 Bill Spitzak and others.
Permission is granted to reproduce this manual or any portion for any purpose, provided this copyright and permission notice are preserved.