Jazz2::UI::Windows::Separator class

Line between parts of a panel.

Base classes

class Element
Element of the interface.

Constructors, destructors, conversion operators

Separator(Windows::Orientation orientation = Windows::Orientation::Horizontal) explicit
Creates a new instance, a vertical separator divides a row.

Public functions

auto Measure(const Context& context, Vector2f available) -> Vector2f override
Returns the size the element wants, in pixels.
auto MeasureDependsOnAvailable() const -> bool override
Returns false if what Measure() returns doesn't depend on the available size, it's measured once a frame then.
void Draw(Painter& painter) override
Draws the element and its children.

Public variables

Windows::Orientation Orientation
Direction of the line.

Function documentation

Vector2f Jazz2::UI::Windows::Separator::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.