WrappedLabel class
#include <Jazz2/UI/Windows/Widgets.h>
Text on as many lines as it needs in the width it gets.
A label would be cut off. Lines are broken at spaces and new lines, a word wider than the width gets a line of its own. It's always aligned to the left.
Base classes
- class Label
- Text.
Constructors, destructors, conversion operators
- WrappedLabel(StringView text = {}, const Colorf& color = Theme::Text) explicit
- Creates a new instance.
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
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.