Class endstone::TextInput¶
ClassList > endstone > TextInput
Represents a text input field.
#include <endstone/form/controls/text_input.h>
Public Functions¶
Type | Name |
---|---|
TextInput () = default |
|
TextInput (Message label, Message placeholder, std::optional< std::string > default_text=std::nullopt) |
|
std::optional< std::string > | getDefaultValue () const Gets the default text of the text input field. |
Message | getLabel () const Gets the label of the text input field. |
Message | getPlaceholder () const Gets the placeholder of the text input field. |
TextInput & | setDefaultValue (std::optional< std::string > text) Sets the default text of the text input field. |
TextInput & | setLabel (Message label) Sets the label of the text input field. |
TextInput & | setPlaceholder (Message placeholder) Sets the placeholder of the text input field. |
Public Functions Documentation¶
function TextInput [½]¶
function TextInput [2/2]¶
inline explicit endstone::TextInput::TextInput (
Message label,
Message placeholder,
std::optional< std::string > default_text=std::nullopt
)
function getDefaultValue¶
Gets the default text of the text input field.
Returns:
The default text of the text input field.
function getLabel¶
Gets the label of the text input field.
Returns:
The label of the text input field.
function getPlaceholder¶
Gets the placeholder of the text input field.
Returns:
The placeholder of the text input field.
function setDefaultValue¶
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.
function setLabel¶
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.
function setPlaceholder¶
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.
The documentation for this class was generated from the following file include/endstone/form/controls/text_input.h