Label

Display text.

Header#include "nativeui/label.h"
Namespacenamespace nu
Typeclass (RefCounted)
InheritsView

Constructors

Label(const std::string& text)

Create a new Label with text.

Parameters

Label(scoped_refptr<AttributedText> text)

Create a new Label with attributed text.

Parameters

Class properties

const char* kClassName

The class name of this view.

Methods

void SetText(const std::string& text)

Set the text to display.

Parameters

std::string GetText() const

Return the text displayed.

Return

std::string

void SetAlign(TextAlign align)

Set horizontal text alignment.

Parameters

void SetVAlign(TextAlign align)

Set vertical text alignment.

Parameters

void SetAttributedText(scoped_refptr<AttributedText> text)

Set the attributed text to display.

Parameters

AttributedText* GetAttributedText() const

Return the attributed text displayed.

Return

AttributedText*