gui2.layout
Base class for widget layoyts.
- abstract class Layout;
Manages layout of a widget and its children. When a widget is resized, its children need to be resized and repositioned accordingly. Implementations of Layout handle this in various ways.
- void minimize(Widget[] children);
Minimize a widget's layout, determining its minimal bounds.
minimize() is called for all widget layouts before expand(). Called for deepest children first, then for their parents, etc, until the root is reached. Children are already minimized when minimize() is called.
- void expand(Widget parent);
Expand a widget's layout, determining definitive sizes and positions of its children. First called for root, then its children, etc; the parent is already expanded when expand() is called.
- const pure nothrow @property ref const(Recti) bounds();
Get the bounds of the layout (rectangle of the widget) in screen space.
- protected static Layout getLayout(Widget widget);
Allows layouts to access layouts of passed widgets.