Label class
#include <Jazz2/UI/Windows/Widgets.h>
Text.
Base classes
- class Element
- Element of the interface.
Derived classes
- class WrappedLabel
- Text on as many lines as it needs in the width it gets.
Constructors, destructors, conversion operators
-
Label(StringView text = {},
const Colorf& color = Theme::Text,
Alignment align = Alignment::
Left) explicit - Creates a new instance.
Public functions
- auto GetText() -> StringView
- Returns the text shown, TextFunc is called at most once a frame of layout.
- auto Measure(const Context& context, Vector2f available) -> Vector2f override
- Returns the size the element wants, in pixels.
- auto MeasureDependsOnAvailable() const -> bool override
- Returns
falseif 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.