From 7a3a8c18922d035370653bf6269af40002a3c08b Mon Sep 17 00:00:00 2001
From: Matthias Melcher
Then we create a box with the "Hello, World!" string in it.
+Then we create a box with the "Hello, World!" string in it. FLTK automatically adds +the new box to window, the current grouping widget.
Fl_Box *box = new Fl_Box(20,40,260,100,"Hello, World!"); @@ -60,7 +61,7 @@ box->labelfont(FL_BOLD+FL_ITAL box->labeltype(FL_SHADOW_LABEL);-
We tell FLTK that we will not add any more widgets to the window.
+We tell FLTK that we will not add any more widgets to window.
window->end(); @@ -105,6 +106,24 @@ defaults to NULL. 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. +Creating Widget hierarchies
+ +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 myGroup->begin() and +myGroup->end(). In this example, myGroup +would be the current group.
+ +Newly created groups and their derived widgets implicitly call +begin() in the constructor, effectively adding all +subsequently created widgets to itself until end() +is called.
+ +Setting the current group to NULL will stop automatic +hierarchies. New widgets can now be added manually using +Fl_Group::add(...) and Fl_Group::insert(...).
+Get/Set Methods
box->box(FL_UP_BOX) sets the type of box the