|
R-Type
Distributed multiplayer game engine in C++
|
Abstract interface for UI text input fields. More...
#include <ITextInput.hpp>


Public Member Functions | |
| virtual | ~ITextInput ()=default |
| Virtual destructor. | |
| virtual void | Update ()=0 |
| Update the text input internal state (focus, cursor, input). | |
| virtual void | Render ()=0 |
| Render the text input box. | |
| virtual void | SetOnTextChanged (std::function< void(const std::string &)> callback)=0 |
| Set callback invoked when text changes. | |
| virtual void | SetPosition (float x, float y)=0 |
| Set the top-left position of the text input. | |
| virtual void | GetPosition (float &x, float &y) const =0 |
| Get the current top-left position of the text input. | |
| virtual void | SetSize (float width, float height)=0 |
| Set the text input size. | |
| virtual void | GetSize (float &width, float &height) const =0 |
| Get the current size of the text input. | |
| virtual void | SetBackgroundColor (unsigned int color)=0 |
| Set the background color of the text input box. | |
| virtual void | SetBorderColor (unsigned int color)=0 |
| Set the border color when the input is not focused. | |
| virtual void | SetActiveBorderColor (unsigned int color)=0 |
| Set the border color when the input is focused/active. | |
| virtual void | SetTextColor (unsigned int color)=0 |
| Set the text color. | |
| virtual void | SetPlaceholderColor (unsigned int color)=0 |
| Set the placeholder text color (when input is empty). | |
| virtual void | SetTextSize (int size)=0 |
| Set the text size in pixels. | |
| virtual void | SetPlaceholder (const std::string &placeholder)=0 |
| Set the placeholder text displayed when the input is empty. | |
| virtual void | SetMaxLength (size_t maxLength)=0 |
| Set the maximum number of characters allowed. | |
| virtual void | SetValidationRegex (const std::string ®exPattern)=0 |
| Set a regex pattern to restrict allowed characters. | |
| virtual const std::string & | GetText () const =0 |
| Get the current text content. | |
| virtual void | SetText (const std::string &text)=0 |
| Set the text content programmatically. | |
| virtual void | Clear ()=0 |
| Clear the text content. | |
| virtual bool | IsFocused () const =0 |
| Check if the text input is currently focused/active. | |
| virtual void | SetFocused (bool focused)=0 |
| Set focus state programmatically. | |
| virtual void | SetFont (int fontHandle)=0 |
| Set the font handle for rendering text. | |
| virtual void | SetAlign (Align align)=0 |
| Set alignment mode relative to the window. | |
| virtual Align | GetAlign () const =0 |
| Get the current alignment mode. | |
| virtual void | ApplyAlignment ()=0 |
| Apply the current alignment mode to the position. | |
| virtual void | SetEnabled (bool enabled)=0 |
| Enable or disable the text input. | |
| virtual bool | IsEnabled () const =0 |
| Check if the text input is enabled. | |
| virtual void | SetPasswordMode (bool passwordMode)=0 |
| Enable or disable password mode (masks characters with asterisks). | |
| virtual bool | IsPasswordMode () const =0 |
| Check if password mode is enabled. | |
Abstract interface for UI text input fields.
This interface defines a text input box with the following features:
Definition at line 32 of file ITextInput.hpp.
|
virtualdefault |
Virtual destructor.
|
pure virtual |
Apply the current alignment mode to the position.
Implemented in UI::RaylibTextInput.
|
pure virtual |
Clear the text content.
Implemented in UI::RaylibTextInput.
|
pure virtual |
|
pure virtual |
Get the current top-left position of the text input.
| x | Output X position in pixels. |
| y | Output Y position in pixels. |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Get the current size of the text input.
| width | Output width in pixels. |
| height | Output height in pixels. |
Implemented in UI::RaylibTextInput.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Check if the text input is currently focused/active.
Implemented in UI::RaylibTextInput.
|
pure virtual |
Check if password mode is enabled.
Implemented in UI::RaylibTextInput.
|
pure virtual |
Render the text input box.
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set the border color when the input is focused/active.
| color | Color in ARGB format (0xAARRGGBB). |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set alignment mode relative to the window.
| align | Alignment mode. |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set the background color of the text input box.
| color | Color in ARGB format (0xAARRGGBB). |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set the border color when the input is not focused.
| color | Color in ARGB format (0xAARRGGBB). |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Enable or disable the text input.
| enabled | true to enable, false to disable. |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set focus state programmatically.
| focused | true to focus, false to blur. |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set the font handle for rendering text.
| fontHandle | Font handle (-1 for default font). |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set the maximum number of characters allowed.
| maxLength | Maximum character count (0 = unlimited). |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set callback invoked when text changes.
| callback | Function called when the text content changes. |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Enable or disable password mode (masks characters with asterisks).
| passwordMode | true to mask characters, false to show them normally. |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set the placeholder text displayed when the input is empty.
| placeholder | Placeholder string. |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set the placeholder text color (when input is empty).
| color | Color in ARGB format (0xAARRGGBB). |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set the top-left position of the text input.
| x | X position in pixels. |
| y | Y position in pixels. |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set the text input size.
| width | Width in pixels. |
| height | Height in pixels. |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set the text content programmatically.
| text | New text content. |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Set the text color.
| color | Color in ARGB format (0xAARRGGBB). |
Implemented in UI::RaylibTextInput.
|
pure virtual |
|
pure virtual |
Set a regex pattern to restrict allowed characters.
| regexPattern | Regex pattern string (e.g., "[a-zA-Z0-9]+" for alphanumeric only). Empty string = no restriction. |
Implemented in UI::RaylibTextInput.
|
pure virtual |
Update the text input internal state (focus, cursor, input).
Implemented in UI::RaylibTextInput.