From 09daf20b81cdae78772f07c0af22a571d7cc73eb Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 29 Nov 2001 19:24:00 +0000 Subject: Documentation updates galore (up to chapter 7, still need to do chapter 8 and 9, tweek the appendices, and recapture the screenshots...) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1786 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl_Group.html | 72 ++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'documentation/Fl_Group.html') diff --git a/documentation/Fl_Group.html b/documentation/Fl_Group.html index 1e8e4dac6..957b4bf3f 100644 --- a/documentation/Fl_Group.html +++ b/documentation/Fl_Group.html @@ -19,12 +19,12 @@

Description

- The Fl_Group class is the FLTK container widget. It maintains -an array of child widgets. These children can themselves be any widget + The Fl_Group class is the FLTK container widget. It maintains +an array of child widgets. These children can themselves be any widget including Fl_Group. The most important subclass of Fl_Group - is Fl_Window, however -groups can also be used to control radio buttons or to enforce resize -behavior. + is Fl_Window, however +groups can also be used to control radio buttons or to enforce resize +behavior.

Methods

@@ -61,17 +61,17 @@ behavior.
-

Fl_Group::Fl_Group(int x, int y, int w, +

Fl_Group::Fl_Group(int x, int y, int w, int h, const char *label = 0)

- Creates a new Fl_Group widget using the given position, size, -and label string. The default boxtype is FL_NO_BOX. + Creates a new Fl_Group widget using the given position, size, +and label string. The default boxtype is FL_NO_BOX.

virtual Fl_Group::~Fl_Group()

- The destructor also deletes all the children. This allows a -whole tree to be deleted at once, without having to keep a pointer to + The destructor also deletes all the children. This allows a +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_Group first, so -that it is destroyed last. +Fl_Group and all of it's children can be automatic (local) +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)

@@ -99,8 +99,8 @@ This does insert(w, find(beforethis)). This will append the widget if beforethis is not in the 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. +Removes a widget from the group. This does nothing if the widget is +not currently a child of this group.

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

@@ -108,48 +108,48 @@ not currently a child of this group. 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).

void Fl_Group::begin()

-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() is exactly the same as current(this). +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() 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. +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.

const Fl_Widget **Fl_Group::array() const

Returns a pointer to the array of children. This pointer is only valid until the next time a child is added or removed.

Fl_Widget *Fl_Group::child(int n) const

Returns array()[n]. No range checking is done!

int Fl_Group::children() const

- Returns how many child widgets the group has. + Returns how many child widgets the group has.

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. +NULL or not found.

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

- The resizable widget defines the resizing box for the group. When the -group is resized it calculates a new size and position for all of its -children. Widgets that are horizontally or vertically inside the -dimensions of the box are scaled to the new size. Widgets outside the -box are moved. + The resizable widget defines the resizing box for the group. When the +group is resized it calculates a new size and position for all of its +children. Widgets that are horizontally or vertically inside the +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:

Resizeable groups   Resizeable groups

-

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. -If the resizable is NULL then all widgets remain a fixed size +

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. +If the resizable is NULL then all widgets remain a fixed size 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 +

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 &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 and makes it the resizable widget. -- cgit v1.2.3