diff options
| author | Bill Spitzak <spitzak@gmail.com> | 1999-01-27 08:45:11 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 1999-01-27 08:45:11 +0000 |
| commit | 59c96f54635aed579fcb40a1980ff3694af46bd8 (patch) | |
| tree | 06bbd99c434659190549626dd5380262ce6eb0c5 /documentation/Fl_Group.html | |
| parent | 7e0bd92469a8d9fd6fde66a856bfea703d587e71 (diff) | |
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
Diffstat (limited to 'documentation/Fl_Group.html')
| -rw-r--r-- | documentation/Fl_Group.html | 58 |
1 files changed, 34 insertions, 24 deletions
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 <TT>FL_NO_BOX</TT>. 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 <TT> Fl_Group</TT> and all of it's children can be automatic (local) -variables, but you must declare the <TT>Fl_Group</TT><I>first</I>, so +variables, but you must declare the <TT>Fl_Group</TT> <I>first</I>, so that it is destroyed last. <H4><A name=Fl_Group.add>void Fl_Group::add(Fl_Widget &w) <BR> void Fl_Group::add(Fl_Widget *w)</A></H4> - Adds a widget to the group at the end of the child array. -<H4><A name=Fl_Group.add_resizable>Fl_Group -&Fl_Group::add_resizable(Fl_Widget &box)</A></H4> - 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. + +<H4><A name=Fl_Group.insert>void Fl_Group::insert(Fl_Widget &w, int n) +<BR> void Fl_Group::insert(Fl_Widget &w, Fl_Widget +*beforethis)</A></H4> + +The widget is removed from it's current group (if any) and then +inserted into this group. It is put at index <TT>n</TT> (or at the end +if <tt>n >= children()</tt>. The second version does a <TT> +find(beforethis)</TT> and inserts using that index (at the end if +<tt>beforethis</tt> is not in this group). + +<H4><A name=Fl_Group.remove>void Fl_Group::remove(Fl_Widget &w)</A></H4> +Removes a widget from the group. This does nothing if the widget is +not currently a child of this group. + <H4><A name=Fl_Group.array>const Fl_Widget **Fl_Group::array() const</A></H4> Returns a pointer to the array of children. <I>This pointer can change when children are added or removed!</I> @@ -84,33 +98,25 @@ when children are added or removed!</I> <TT>begin()</TT> sets the current group so you can build the widget tree by just constructing the widgets. <TT>begin()</TT> is automatically called by the constructor for Fl_Group (and thus for -Fl_Window as well). <TT>begin()</TT> does <TT>current(this)</TT>. +Fl_Window as well). <TT>begin()</TT> <i>is exactly the same as</i> <TT>current(this)</TT>. <P><I>Don't forget to <TT>end()</TT> the group or window!</I></P> +<H4><A name=Fl_Group.end>void Fl_Group::end()</A></H4> +<TT>end()</TT> <i>is exactly the same as</i> <TT>current(this->parent())</TT>. Any new widgets +added to the widget tree will be added to the parent of the group. +<H4><A name=Fl_Group.current>static Fl_Group *Fl_Group::current() +<BR> static void Fl_Group::current(Fl_Group *w)</A></H4> +<TT>current()</TT> returns the currently active group. The Fl_Widget + constructor automatically does <tt>current()->add(widget)</tt> if this is not null. + To prevent new widgets from being added to a group, call <TT>Fl_Group::current(0)</TT>. <H4><A name=Fl_Group.child>Fl_Widget *Fl_Group::child(int n) const</A></H4> Returns child <TT>n</TT>, where <TT>0 <= n < children()</TT>. <H4><A name=Fl_Group.children>int Fl_Group::children() const</A></H4> Returns how many child widgets the group has. -<H4><A name=Fl_Group.current>static Fl_Group *Fl_Group::current() -<BR> static void Fl_Group::current(Fl_Group *w)</A></H4> -<TT>current()</TT> returns the currently active group in the widget -tree. To prevent widgets from being added to a group, call <TT>current()</TT> - with a <TT>NULL</TT> group. -<H4><A name=Fl_Group.end>void Fl_Group::end()</A></H4> -<TT>end()</TT> does <TT>current(this->parent())</TT>. Any new widgets -added to the widget tree will be added to the parent of the group. <H4><A name=Fl_Group.find>int Fl_Group::find(const Fl_Widget *w) const <BR> int Fl_Group::find(const Fl_Widget &w) const</A></H4> Searches the child array for the widget and returns the index. Returns <A href=#Fl_Group.children><TT>children()</TT></A> if the widget is <TT> NULL</TT> or not found. -<H4><A name=Fl_Group.insert>void Fl_Group::insert(Fl_Widget &w, int n) -<BR> void Fl_Group::insert(Fl_Widget &w, Fl_Widget *beforethis)</A></H4> - Inserts a widget into the child array. It is put at index <TT>n</TT> - which must be less or equal to children(). The second version does a <TT> -find(beforethis)</TT> and inserts using that index. -<H4><A name=Fl_Group.remove>void Fl_Group::remove(Fl_Widget &w)</A></H4> - Removes a widget from the group. This does nothing if the widget is -not currently a child of this group. <H4><A name=Fl_Group.resizeable>void Fl_Group::resizable(Fl_Widget *box) <BR> void Fl_Group::resizable(Fl_Widget &box) <BR> Fl_Widget *Fl_Group::resizable() const</A></H4> @@ -121,8 +127,8 @@ dimensions of the box are scaled to the new size. Widgets outside the box are moved. <P>In these examples the gray area is the resizable: <BR></P> -<P align=center><IMG align=TOP height=240 SRC=./resizebox1.gif> <IMG align=TOP -height=240 SRC=./resizebox2.gif></P> +<P align=center><IMG align=TOP SRC=./resizebox1.gif> <IMG align=TOP +SRC=./resizebox2.gif></P> <P>The resizable may be set to the group itself (this is the default value for an <TT>Fl_Group</TT>, although <TT>NULL</TT> is the default for an <TT>Fl_Window</TT>), in which case all the contents are resized. @@ -131,4 +137,8 @@ and distance from the top-left corner. </P> <P>It is possible to achieve any type of resize behavior by using an invisible <TT>Fl_Box</TT> as the resizable and/or by using a hierarchy of child <TT>Fl_Group</TT>'s. </P> + +<H4><A name=Fl_Group.add_resizable>Fl_Group +&Fl_Group::add_resizable(Fl_Widget &box)</A></H4> + Adds a widget to the group and makes it the resizable widget. </TT></BODY></HTML> |
