Jazz2::UI::Windows::Stack class

Places its children in a row or a column.

Base classes

class Element
Element of the interface.

Derived classes

class DragBar
Row that moves what it belongs to when dragged, such as the title of a window.
class Form
Rows of a label and what it's about, with the labels in a column as wide as the longest of them.
class Panel
A stack with a background.

Constructors, destructors, conversion operators

Stack(Windows::Orientation orientation = Windows::Orientation::Vertical, float spacing = 0.0f, Thickness padding = {}) explicit
Creates a new instance.

Public functions

auto Measure(const Context& context, Vector2f available) -> Vector2f override
Returns the size the element wants, in pixels.
void Arrange(const Context& context, const Rectf& bounds) override
Places the element and its children.

Public variables

Windows::Orientation Orientation
Direction the children are placed in.
float Spacing
Space between the children in units.
Thickness Padding
Space around the children in units.

Function documentation

Vector2f Jazz2::UI::Windows::Stack::Measure(const Context& context, Vector2f available) override

Returns the size the element wants, in pixels.

The available size is what the parent can give, a size without limit is a very large number.