Fl_Group(int,int,int,int, const char* = 0);
virtual ~Fl_Group();
int children() const;
Fl_Object* child(int n) const;
Fl_Object*const* array() const;
int find(const Fl_Object*) const;
int find(const Fl_Object&) const;
void add(Fl_Object&);
void add(Fl_Object*);
void begin();
void end();
static Fl_Group* current();
static void current(Fl_Group*);
Fl_Group::current()->add(this)
if current() is not null.
This allows you to build the object tree by just constructing the
objects. However I have had trouble with compilers producing warning
messages about unused objects, and possibly even optimizing the
constructors out (allowed by C++) and so you may not want to
use this.
begin()
does current(this)
.
end()
does current(this->parent())
. You can
also directly get and set the current value.
void insert(Fl_Object&, int n);
void insert(Fl_Object&, Fl_Object* beforethis);
void remove(Fl_Object&);
void resize();
void resizable(Fl_Object*);
void resizable(Fl_Object&);
Fl_Group& add_resizable(Fl_Object&);
Fl_Object* 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 objects 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.