From 59c96f54635aed579fcb40a1980ff3694af46bd8 Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Wed, 27 Jan 1999 08:45:11 +0000 Subject: Fixes to documentation. Restored the lines drawn around symbols, it uses fl_color_average to pick a dark line color that is still deactivatable. Requested by CE. git-svn-id: file:///fltk/svn/fltk/trunk@249 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl_Group.html | 58 ++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 24 deletions(-) (limited to 'documentation/Fl_Group.html') diff --git a/documentation/Fl_Group.html b/documentation/Fl_Group.html index e307d71b4..ccf7a3c45 100644 --- a/documentation/Fl_Group.html +++ b/documentation/Fl_Group.html @@ -69,14 +69,28 @@ and label string. The default boxtype is FL_NO_BOX. whole tree to be deleted at once, without having to keep a pointer to all the children in the user code. A kludge has been done so the Fl_Group and all of it's children can be automatic (local) -variables, but you must declare the Fl_Groupfirst, so +variables, but you must declare the Fl_Group first, so that it is destroyed last.

void Fl_Group::add(Fl_Widget &w)
void Fl_Group::add(Fl_Widget *w)

- Adds a widget to the group at the end of the child array. -

Fl_Group -&Fl_Group::add_resizable(Fl_Widget &box)

- Adds a widget to the group and makes it the resizable widget. +Adds a widget to the group at the end of the child array. If the +widget is already in a group it is removed from that group before +adding to this one. + +

void Fl_Group::insert(Fl_Widget &w, int n) +
void Fl_Group::insert(Fl_Widget &w, Fl_Widget +*beforethis)

+ +The widget is removed from it's current group (if any) and then +inserted into this group. It is put at index n (or at the end +if n >= children(). The second version does a +find(beforethis) and inserts using that index (at the end if +beforethis is not in this group). + +

void Fl_Group::remove(Fl_Widget &w)

+Removes a widget from the group. This does nothing if the widget is +not currently a child of this group. +

const Fl_Widget **Fl_Group::array() const

Returns a pointer to the array of children. This pointer can change when children are added or removed! @@ -84,33 +98,25 @@ when children are added or removed! begin() sets the current group so you can build the widget tree by just constructing the widgets. begin() is automatically called by the constructor for Fl_Group (and thus for -Fl_Window as well). begin() does current(this). +Fl_Window as well). begin() is exactly the same as current(this).

Don't forget to end() the group or window!

+

void Fl_Group::end()

+end() is exactly the same as current(this->parent()). Any new widgets +added to the widget tree will be added to the parent of the group. +

static Fl_Group *Fl_Group::current() +
static void Fl_Group::current(Fl_Group *w)

+current() returns the currently active group. The Fl_Widget + constructor automatically does current()->add(widget) if this is not null. + To prevent new widgets from being added to a group, call Fl_Group::current(0).

Fl_Widget *Fl_Group::child(int n) const

Returns child n, where 0 <= n < children().

int Fl_Group::children() const

Returns how many child widgets the group has. -

static Fl_Group *Fl_Group::current() -
static void Fl_Group::current(Fl_Group *w)

-current() returns the currently active group in the widget -tree. To prevent widgets from being added to a group, call current() - with a NULL group. -

void Fl_Group::end()

-end() does current(this->parent()). Any new widgets -added to the widget tree will be added to the parent of the group.

int Fl_Group::find(const Fl_Widget *w) const
int Fl_Group::find(const Fl_Widget &w) const

Searches the child array for the widget and returns the index. Returns children() if the widget is NULL or not found. -

void Fl_Group::insert(Fl_Widget &w, int n) -
void Fl_Group::insert(Fl_Widget &w, Fl_Widget *beforethis)

- Inserts a widget into the child array. It is put at index n - which must be less or equal to children(). The second version does a -find(beforethis) and inserts using that index. -

void Fl_Group::remove(Fl_Widget &w)

- Removes a widget from the group. This does nothing if the widget is -not currently a child of this group.

void Fl_Group::resizable(Fl_Widget *box)
void Fl_Group::resizable(Fl_Widget &box)
Fl_Widget *Fl_Group::resizable() const

@@ -121,8 +127,8 @@ dimensions of the box are scaled to the new size. Widgets outside the box are moved.

In these examples the gray area is the resizable:

-

  

+

  

The resizable may be set to the group itself (this is the default value for an Fl_Group, although NULL is the default for an Fl_Window), in which case all the contents are resized. @@ -131,4 +137,8 @@ and distance from the top-left corner.

It is possible to achieve any type of resize behavior by using an invisible Fl_Box as the resizable and/or by using a hierarchy of child Fl_Group's.

+ +

Fl_Group +&Fl_Group::add_resizable(Fl_Widget &box)

+ Adds a widget to the group and makes it the resizable widget. -- cgit v1.2.3