JugiMap Framework
|
The GuiTextField class provides a widget for text input. More...
#include <jmGuiTextWidgets.h>
Inherits GuiWidget.
Public Member Functions | |
GuiTextInput (ComposedSprite *_rootSprite) | |
Construct a new gui text input from the given *_rootSprite*. More... | |
void | SetDisabled (bool _disabled) override |
Set the disabled state of this widget. More... | |
void | SetVisible (bool _visible) override |
Set the visibility of this widget. More... | |
void | Start () |
Start the text editing. More... | |
void | Start (const std::string &_text) |
Set the text and start editing. More... | |
void | SetText (const std::string &_text) |
Set the text. More... | |
std::string | GetText () |
Returns the text. More... | |
void | SetTextMaximumLength (int _maxLength) |
Set the maximum number of characters of the text. More... | |
void | SetAllowEscToAbort (bool _allowEscToAbort) |
Set if the escape key aborts editing. More... | |
void | SetAllowEmptyText (bool _allowEmptyText) |
Set if empty text is allowed. More... | |
void | SetBannedChars (const std::string &_bannedChars) |
Set a string of characters which can not appear in the text. More... | |
void | MakeCharsFileNameSafe () |
Set a string of banned characters in file name. More... | |
void | SetCursorFlashingSpeed (int _cursorFlashingMS) |
Set the flashing interval of the text cursor in milliseconds. More... | |
![]() | |
bool | IsCursorDown () |
Returns true if the cursor is hold down over this widget; otherwise returns false. More... | |
bool | IsCursorOver () |
Returns true if the cursor is over this widget; otherwise returns false. More... | |
bool | IsPressed () |
Returns true if the cursor is pressed while over this widget; otherwise returns false. More... | |
bool | IsValueChanged () |
Returns true if this widget's value is changed; otherwise returns false. More... | |
bool | IsDisabled () |
Returns true if this widget is disabled; otherwise returns false. More... | |
bool | IsVisible () |
Returns true if this widget is visible; otherwise returns false. More... | |
void | SetName (const std::string &_name) |
Set the name of this widget. More... | |
std::string | GetName () |
Returns the name of this widget. More... | |
void | SetTag (int _tag) |
Set the tag of this widget. More... | |
int | GetTag () |
Returns the tag of this widget. More... | |
GuiWidgetKind | GetKind () |
Returns the kind of this widget. More... | |
std::string | GetDesignKind () |
Returns the design kind of this widget. More... | |
void | AssignCustomObject (CustomObject *_customObject) |
Assign the given *_customObject* to this widget. More... | |
CustomObject * | GetCustomObject () |
Returns the custom object of this widget or nullptr if none. More... | |
void | AssignCallback (GuiWidgetCallback *_callback) |
Assign the given *_callback* to this widget. More... | |
GuiWidgetCallback * | GetCallback () |
Returns the callback of this widget or nullptr if none. More... | |
Additional Inherited Members | |
![]() | |
static GuiWidget * | GetInteracted () |
Returns the interacted widget. More... | |
static GuiWidget * | GetInteracted (const std::string &_name) |
Returns the interacted widget with the given *_name*. More... | |
static GuiWidget * | GetInteracted (int _tag) |
Returns the interacted widget with the given *_tag*. More... | |
static GuiWidget * | GetInteracted (CustomObject *_customObject) |
Returns the interacted widget which has assigned the given *_customObject*. More... | |
static GuiWidget * | GetInteracted_Pressed () |
Returns the interacted widget which is pressed. More... | |
static GuiWidget * | GetInteracted_Pressed (const std::string &_name) |
Returns the interacted widget with the given *_name* which is pressed. More... | |
static GuiWidget * | GetInteracted_Pressed (int _tag) |
Returns the interacted widget with the given *_tag* which is pressed. More... | |
static GuiWidget * | GetInteracted_Pressed (CustomObject *_customObject) |
Returns the interacted widget with assigned *_customObject* which is pressed. More... | |
static GuiWidget * | GetInteracted_ValueChanged () |
Returns the interacted widget which has changed value. More... | |
static GuiWidget * | GetInteracted_ValueChanged (const std::string &_name) |
Returns the interacted widget with the given *_name* which has changed value. More... | |
static GuiWidget * | GetInteracted_ValueChanged (int _tag) |
Returns the interacted widget with the given *_tag* which has changed value. More... | |
static GuiWidget * | GetInteracted_ValueChanged (CustomObject *_customObject) |
Returns the interacted widget with assigned *_customObject* which has changed value. More... | |
static GuiWidget * | GetInteracted_CursorOver () |
Returns the interacted widget which has the cursor over. More... | |
static GuiWidget * | GetInteracted_CursorOver (const std::string &_name) |
Returns the interacted widget with the given *_name* which has the cursor over. More... | |
static GuiWidget * | GetInteracted_CursorOver (int _tag) |
Returns the interacted widget with the given *_tag* which has the cursor over. More... | |
static GuiWidget * | GetInteracted_CursorOver (CustomObject *_customObject) |
Returns the interacted widget with assigned *_customObject* which has the cursor over. More... | |
static GuiWidget * | GetInteracted_cursorDown () |
Returns the interacted widget which has the cursor hold down. More... | |
static GuiWidget * | GetInteracted_CursorDown (const std::string &_name) |
Returns the interacted widget with the given *_name* which has the cursor hold down. More... | |
static GuiWidget * | GetInteracted_CursorDown (int _tag) |
Returns the interacted widget with the given *_tag* which has the cursor hold down. More... | |
static GuiWidget * | GetInteracted_CursorDown (CustomObject *_customObject) |
Returns the interacted widget with assigned *_customObject* which has the cursor hold down. More... | |
The GuiTextField class provides a widget for text input.
The text editing is started with GuiTextInput::Start and completed by pressing the Enter key. This widget currently works only with the ASCII character set.
GuiTextInput | ( | ComposedSprite * | _rootSprite | ) |
Construct a new gui text input from the given *_rootSprite*.
|
overridevirtual |
|
overridevirtual |
Set the visibility of this widget.
This function is not available for GuiTextField.
Reimplemented from GuiWidget.
void Start | ( | ) |
Start the text editing.
void Start | ( | const std::string & | _text | ) |
Set the text and start editing.
void SetText | ( | const std::string & | _text | ) |
Set the text.
|
inline |
Returns the text.
|
inline |
Set the maximum number of characters of the text.
|
inline |
Set if the escape key aborts editing.
|
inline |
Set if empty text is allowed.
|
inline |
Set a string of characters which can not appear in the text.
void MakeCharsFileNameSafe | ( | ) |
Set a string of banned characters in file name.
void SetCursorFlashingSpeed | ( | int | _cursorFlashingMS | ) |
Set the flashing interval of the text cursor in milliseconds.