@ -45,7 +45,8 @@ window. All following widgets will automatically be children of this window.</P>
@@ -45,7 +45,8 @@ window. All following widgets will automatically be children of this window.</P>
Fl_Window *window = new <Ahref="Fl_Window.html#Fl_Window">Fl_Window</A>(300,180);
</PRE></UL>
<P>Then we create a box with the "Hello, World!" string in it.</P>
<P>Then we create a box with the "Hello, World!" string in it. FLTK automatically adds
the new box to <tt>window</tt>, the current grouping widget.</P>
<UL><PRE>
Fl_Box *box = new <Ahref="Fl_Box.html#Fl_Box">Fl_Box</A>(20,40,260,100,"Hello, World!");
@ -105,6 +106,24 @@ defaults to <tt>NULL</tt>. The label string must be in static
@@ -105,6 +106,24 @@ defaults to <tt>NULL</tt>. The label string must be in static
storage such as a string constant because FLTK does not make a
copy of it - it just uses the pointer.</P>
<H3>Creating Widget hierarchies</H3>
<P>Widgets are commonly ordered into functional groups, which
in turn may be grouped again, creating a hierarchy of widgets.
FLTK makes it easy to fill groups by automatically adding all widgets
that are created between a <tt>myGroup->begin()</tt> and
<tt>myGroup->end()</tt>. In this example, <tt>myGroup</tt>
would be the <i>current</i> group.</P>
<P>Newly created groups and their derived widgets implicitly call
<tt>begin()</tt> in the constructor, effectively adding all
subsequently created widgets to itself until <tt>end()</tt>
is called.</P>
<P>Setting the current group to <tt>NULL</tt> will stop automatic
hierarchies. New widgets can now be added manually using
<tt>Fl_Group::add(...)</tt> and <tt>Fl_Group::insert(...)</tt>.</P>
<H3>Get/Set Methods</H3>
<P><tt>box->box(FL_UP_BOX)</tt> sets the type of box the