Fl_Group::Fl_Group(int,int,int,int, const char* = 0);
virtual Fl_Group::~Fl_Group();
int Fl_Group::children() const;
Fl_Widget* Fl_Group::child(int n) const;
Fl_Widget*const* Fl_Group::array() const;
int Fl_Group::find(const Fl_Widget*) const;
int Fl_Group::find(const Fl_Widget&) const;
void Fl_Group::add(Fl_Widget&);
void Fl_Group::add(Fl_Widget*);
void Fl_Group::insert(Fl_Widget&, int n);
void Fl_Group::insert(Fl_Widget&, Fl_Widget* beforethis);
void Fl_Group::remove(Fl_Widget&);
void Fl_Group::begin();
void Fl_Group::end();
static Fl_Group* Fl_Group::current();
static void Fl_Group::current(Fl_Group*);
Fl_Group::current()->add(this)
if current() is not null.
This allows you to build the widget tree by just constructing the
widgets. Fl_Group::begin() is automatically called by the constructor
for Fl_Group (and thus for Fl_Window as well). Don't forget to
Fl_Group::end() the group or window!
Fl_Group::begin()
does
Fl_Group::current(this)
. Fl_Group::end()
does Fl_Group::current(this->parent())
. You can also
directly get and set the current value (useful for forcing it to zero
so you can prevent the constructor from adding an object).
class Fl_End;
Fl_Group::current()->end()
. This allows you to end a
group in a constructor list of a class:
class MyClass {
Fl_Group group;
Fl_Button button_in_group;
Fl_End end;
Fl_Button button_outside_group;
MyClass();
};
MyClass::MyClass() :
group(10,10,100,100),
button_in_group(20,20,60,30),
end(),
button_outside_group(10,120,60,30)
{}
void Fl_Group::resizable(Fl_Widget*);
void Fl_Group::resizable(Fl_Widget&);
Fl_Group& Fl_Group::add_resizable(Fl_Widget&);
Fl_Widget* Fl_Group::resizable() const;
In these examples the gray area is the resizable:
The resizable may be set to the group itself (this is the default value for an Fl_Group, although NULL is the default for an Fl_Window), in which case all the contents are resized. If the resizable is NULL then all widgets remain a fixed size and distance from the top-left corner.
It should be possible to achieve any type of resize behavior by using an invisible Fl_Box as the resizable and/or by using a hierarchy of child Fl_Groups.