Author: matt
Date: 2007-12-27 03:02:27 -0800 (Thu, 27 Dec 2007)
New Revision: 6007
Log:
STR 1815: Added begin() and end() information to the Basics chapter. Hope 
you'll like it

Modified:
   branches/branch-1.1/CHANGES
   branches/branch-1.1/documentation/basics.html

Modified: branches/branch-1.1/CHANGES
===================================================================
--- branches/branch-1.1/CHANGES 2007-12-20 16:32:56 UTC (rev 6006)
+++ branches/branch-1.1/CHANGES 2007-12-27 11:02:27 UTC (rev 6007)
@@ -4,7 +4,7 @@
          STR #1457, STR #1458, STR #1460, STR #1481, STR #1578,
          STR #1639, STR #1645, STR #1644, STR #1792, STR #1793,
          STR #1742, STR #1777, STR #1794, STR #1827, STR #1843,
-         STR #1796)
+         STR #1796, STR #1815)
        - Fixed 16 bit PNM image support (STR #1847)
        - Fixed exposure event on zero size windows (STR #1824)
        - Fixed overlay offset for OS X Quartz (STR #1729)

Modified: branches/branch-1.1/documentation/basics.html
===================================================================
--- branches/branch-1.1/documentation/basics.html       2007-12-20 16:32:56 UTC 
(rev 6006)
+++ branches/branch-1.1/documentation/basics.html       2007-12-27 11:02:27 UTC 
(rev 6007)
@@ -45,7 +45,8 @@
 Fl_Window *window = new <A 
href="Fl_Window.html#Fl_Window">Fl_Window</A>(300,180);
 </PRE></UL>
 
-<P>Then we create a box with the &quot;Hello, World!&quot; string in it.</P>
+<P>Then we create a box with the &quot;Hello, World!&quot; string in it. FLTK 
automatically adds
+the new box to <tt>window</tt>, the current grouping widget.</P>
 
 <UL><PRE>
 Fl_Box *box = new <A 
href="Fl_Box.html#Fl_Box">Fl_Box</A>(20,40,260,100,&quot;Hello, World!&quot;);
@@ -60,7 +61,7 @@
 box-&gt;<A 
href=Fl_Widget.html#Fl_Widget.labeltype>labeltype</A>(FL_SHADOW_LABEL);
 </PRE></UL>
 
-<P>We tell FLTK that we will not add any more widgets to the window.</P>
+<P>We tell FLTK that we will not add any more widgets to <tt>window</tt>.</P>
 
 <UL><PRE>
 window-&gt;<A href=Fl_Group.html#Fl_Group.end>end</A>();
@@ -105,6 +106,24 @@
 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-&gt;begin()</tt> and 
+<tt>myGroup-&gt;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-&gt;box(FL_UP_BOX)</tt> sets the type of box the

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to