diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2007-10-06 17:54:25 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2007-10-06 17:54:25 +0000 |
| commit | a9456e49f421460d8439b651e40953e0ed7ef5ed (patch) | |
| tree | 7138765311179d4822bee13c0cec4b7f6d54d795 | |
| parent | f6de9c9692cf13e8df8dc980c2a5e7c73773a432 (diff) | |
STR #1718: added short documentation to Basics that briefly explains automatic parenting.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5944 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | documentation/basics.html | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/documentation/basics.html b/documentation/basics.html index 94d0c2031..522e7d845 100644 --- a/documentation/basics.html +++ b/documentation/basics.html @@ -39,13 +39,13 @@ int main(int argc, char **argv) { <!-- NEED 2in --> <P>After including the required header files, the program then creates a -window:</P> +window. All following widgets will automatically be children of this window.</P> <UL><PRE> Fl_Window *window = new <A href="Fl_Window.html#Fl_Window">Fl_Window</A>(300,180); </PRE></UL> -<P>and a box with the "Hello, World!" string in it:</P> +<P>Then we create a box with the "Hello, World!" string in it.</P> <UL><PRE> Fl_Box *box = new <A href="Fl_Box.html#Fl_Box">Fl_Box</A>(20,40,260,100,"Hello, World!"); @@ -60,10 +60,15 @@ box-><A href=Fl_Widget.html#Fl_Widget.labelfont>labelfont</A>(FL_BOLD+FL_ITAL box-><A href=Fl_Widget.html#Fl_Widget.labeltype>labeltype</A>(FL_SHADOW_LABEL); </PRE></UL> -<P>Finally, we show the window and enter the FLTK event loop:</P> +<P>We tell FLTK that we will not add any more widgets to the window.</P> <UL><PRE> window-><A href=Fl_Group.html#Fl_Group.end>end</A>(); +</PRE></UL> + +<P>Finally, we show the window and enter the FLTK event loop:</P> + +<UL><PRE> window-><A href=Fl_Window.html#Fl_Window.show>show</A>(argc, argv); return <A href="Fl.html#Fl.run">Fl::run</A>(); </PRE></UL> |
