Skip to Content
⚠ Under Construction
ReferenceC++ APITextInput

endstone::TextInput

Represents a text input field.

Functions:

NameDescription
TextInput
TextInput
getDefaultValueGets the default text of the text input field.
getLabelGets the label of the text input field.
getPlaceholderGets the placeholder of the text input field.
setDefaultValueSets the default text of the text input field.
setLabelSets the label of the text input field.
setPlaceholderSets the placeholder of the text input field.

TextInput

TextInput() = default
TextInput(Message label, Message placeholder, std::optional<std::string> default_text = std::nullopt)

getDefaultValue

std::optional<std::string> getDefaultValue() const

Gets the default text of the text input field.

Returns:

The default text of the text input field.

getLabel

Message getLabel() const

Gets the label of the text input field.

Returns:

The label of the text input field.

getPlaceholder

Message getPlaceholder() const

Gets the placeholder of the text input field.

Returns:

The placeholder of the text input field.

setDefaultValue

TextInput &setDefaultValue(std::optional<std::string> text)

Sets the default text of the text input field.

Parameters:

  • text The new default text for the text input field.

Returns:

A reference to the text input field itself.

setLabel

TextInput &setLabel(Message label)

Sets the label of the text input field.

Parameters:

  • label The new label for the text input field.

Returns:

A reference to the text input field itself.

setPlaceholder

TextInput &setPlaceholder(Message placeholder)

Sets the placeholder of the text input field.

Parameters:

  • placeholder The new placeholder for the text input field.

Returns:

A reference to the text input field itself.

Last updated on