fltk.group
FLTK Group/Container Class
This module provides the Group class that wraps FLTK's Fl_Group. Groups are container widgets that can hold child widgets.
The Group class provides:
- Container for child widgets
- Range-based iteration over children
- Add/remove child operations
- begin()/end() for automatic child assignment
License
BSD-3-ClauseCopyright
Copyright © 2025 DDN (D Developer Network) Members
class Group
Types 1
Container widget that can hold child widgets.
Groups are invisible containers that organize child widgets. They can be used for layout management and logical grouping.
Example:
auto group = new Group(0, 0, 200, 100);
group.begin();
// Widgets created here become children of group
auto button1 = new Button(10, 10, 80, 25, "One");
auto button2 = new Button(10, 40, 80, 25, "Two");
group.end();
// Iterate over children
foreach (child; group.children) {
writeln("Child at: ", child.x, ", ", child.y);
}Fields
GroupPtr _groupHandleThe underlying group handleMethods
ChildRange children()Returns a range for iterating over child widgets.Constructors
this(int x, int y, int width, int height, string label = null)Creates a new group widget.Destructors
~thisDestroys the group and releases resources.Nested Templates
ChildRangeRange type for iterating over child widgets.