Entry

Single-line text input view.

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

Constructors

Entry(Entry::Type type)

Create a new Entry with type.

By default type is Normal.

Parameters

Class properties

const char* kClassName

The class name of this view.

Methods

void SetText(const std::string& text)

Change the text in the view.

Parameters

std::string GetText() const

Return currently displayed text.

Return

std::string

Events

void on_text_change(Entry* self)

Emitted when user has changed text.

Parameters

Preventable

No.

void on_activate(Entry* self)

Emitted when user has pressed Enter in the view.

Parameters

Preventable

No.