TDME2 1.9.121
|
GUI input internal controller. More...
#include <tdme/gui/nodes/GUIInputInternalController.h>
Public Types | |
enum | CursorMode { CURSORMODE_HIDE , CURSORMODE_SHOW } |
Public Member Functions | |
void | onTextUpdate () |
Reset cursor index and offset. More... | |
void | formatText () |
Format text according to options. More... | |
bool | isShowCursor () |
bool | isDisabled () override |
void | setDisabled (bool disabled) override |
Set disabled. More... | |
void | initialize () override |
Initialize controller after element has been created. More... | |
void | dispose () override |
Dispose controller. More... | |
void | postLayout () override |
Post layout event. More... | |
void | handleMouseEvent (GUINode *node, GUIMouseEvent *event) override |
Handle mouse event. More... | |
void | handleKeyboardEvent (GUIKeyboardEvent *event) override |
Handle keyboard event. More... | |
void | tick () override |
Tick method will be executed once per frame. More... | |
void | onFocusGained () override |
On focus gained. More... | |
void | onFocusLost () override |
On focus lost. More... | |
bool | hasValue () override |
const MutableString & | getValue () override |
void | setValue (const MutableString &value) override |
Set value. More... | |
void | onSubTreeChange () override |
On sub tree change. More... | |
![]() | |
virtual | ~GUINodeController () |
Destructor. More... | |
virtual GUINode * | getNode () |
virtual void | initialize ()=0 |
Initialize controller after element has been created. More... | |
virtual void | dispose ()=0 |
Dispose controller. More... | |
virtual void | postLayout ()=0 |
Post layout event. More... | |
virtual void | handleMouseEvent (GUINode *node, GUIMouseEvent *event)=0 |
Handle mouse event. More... | |
virtual void | handleKeyboardEvent (GUIKeyboardEvent *event)=0 |
Handle keyboard event. More... | |
virtual void | tick ()=0 |
Tick method will be executed once per frame. More... | |
virtual void | onFocusGained ()=0 |
On focus gained. More... | |
virtual void | onFocusLost ()=0 |
On focus lost. More... | |
virtual bool | hasValue ()=0 |
virtual const MutableString & | getValue ()=0 |
virtual void | setValue (const MutableString &value)=0 |
Set value. More... | |
virtual bool | isDisabled ()=0 |
virtual void | setDisabled (bool disabled)=0 |
Set disabled. More... | |
virtual void | onSubTreeChange ()=0 |
On sub tree change. More... | |
Private Types | |
enum | Type { TYPE_STRING , TYPE_FLOAT , TYPE_INT } |
Private Member Functions | |
GUIInputInternalController (GUINode *node) | |
Private constructor. More... | |
int | getIndex () |
int | getSelectionIndex () |
int | getOffset () |
void | resetCursorMode () |
Reset cursor mode. More... | |
CursorMode | getCursorMode () |
void | checkOffset () |
Check and correct offset. More... | |
Private Attributes | |
GUIElementNode * | inputNode { nullptr } |
int64_t | cursorModeStarted { -1LL } |
CursorMode | cursorMode { CURSORMODE_SHOW } |
int | index { 0 } |
int | selectionIndex { -1 } |
int | offset { 0 } |
bool | mouseDraggingInit { false } |
bool | mouseDraggingSlideValueActive { false } |
bool | mouseDraggingSelectionActive { false } |
array< int, 2 > | mouseDragPosition |
array< int, 2 > | mouseOriginalPosition |
MutableString | value |
Type | type { TYPE_STRING } |
bool | haveMin { false } |
bool | haveMax { false } |
bool | haveStep { false } |
float | min { 0.0f } |
float | max { 0.0f } |
float | step { 0.0f } |
int | decimals { 3 } |
bool | editMode { false } |
Static Private Attributes | |
static constexpr int64_t | CURSOR_MODE_DURATION { 500LL } |
static constexpr int64_t | DRAGGING_CALMDOWN { 50LL } |
Friends | |
class | GUIInputInternalNode |
class | GUIInputInternalController_CursorMode |
Additional Inherited Members | |
![]() | |
GUINodeController (GUINode *node) | |
Private constructor. More... | |
![]() | |
GUINode * | node { nullptr } |
GUI input internal controller.
Definition at line 26 of file GUIInputInternalController.h.
enum CursorMode |
Enumerator | |
---|---|
CURSORMODE_HIDE | |
CURSORMODE_SHOW |
Definition at line 32 of file GUIInputInternalController.h.
|
private |
Enumerator | |
---|---|
TYPE_STRING | |
TYPE_FLOAT | |
TYPE_INT |
Definition at line 49 of file GUIInputInternalController.h.
|
private |
Private constructor.
node | node |
Definition at line 57 of file GUIInputInternalController.cpp.
|
private |
Check and correct offset.
Definition at line 287 of file GUIInputInternalController.cpp.
|
overridevirtual |
Dispose controller.
Implements GUINodeController.
Definition at line 107 of file GUIInputInternalController.cpp.
void formatText | ( | ) |
Format text according to options.
Definition at line 575 of file GUIInputInternalController.cpp.
|
private |
Definition at line 121 of file GUIInputInternalController.cpp.
|
inlineprivate |
Definition at line 70 of file GUIInputInternalController.h.
|
inlineprivate |
Definition at line 84 of file GUIInputInternalController.h.
|
inlineprivate |
Definition at line 77 of file GUIInputInternalController.h.
|
overridevirtual |
Implements GUINodeController.
Definition at line 548 of file GUIInputInternalController.cpp.
|
overridevirtual |
Handle keyboard event.
event | event |
Implements GUINodeController.
Definition at line 304 of file GUIInputInternalController.cpp.
|
overridevirtual |
Handle mouse event.
node | node |
event | event |
Implements GUINodeController.
Definition at line 137 of file GUIInputInternalController.cpp.
|
overridevirtual |
Implements GUINodeController.
Definition at line 543 of file GUIInputInternalController.cpp.
|
overridevirtual |
Initialize controller after element has been created.
Implements GUINodeController.
Definition at line 79 of file GUIInputInternalController.cpp.
|
overridevirtual |
Implements GUINodeController.
Definition at line 70 of file GUIInputInternalController.cpp.
bool isShowCursor | ( | ) |
Definition at line 570 of file GUIInputInternalController.cpp.
|
overridevirtual |
On focus gained.
Implements GUINodeController.
Definition at line 531 of file GUIInputInternalController.cpp.
|
overridevirtual |
On focus lost.
Implements GUINodeController.
Definition at line 535 of file GUIInputInternalController.cpp.
|
overridevirtual |
On sub tree change.
Implements GUINodeController.
Definition at line 624 of file GUIInputInternalController.cpp.
void onTextUpdate | ( | ) |
Reset cursor index and offset.
Definition at line 557 of file GUIInputInternalController.cpp.
|
overridevirtual |
Post layout event.
Implements GUINodeController.
Definition at line 111 of file GUIInputInternalController.cpp.
|
private |
Reset cursor mode.
Definition at line 115 of file GUIInputInternalController.cpp.
|
overridevirtual |
Set disabled.
disabled | disabled |
Implements GUINodeController.
Definition at line 75 of file GUIInputInternalController.cpp.
|
overridevirtual |
Set value.
value | value |
Implements GUINodeController.
Definition at line 553 of file GUIInputInternalController.cpp.
|
overridevirtual |
Tick method will be executed once per frame.
Implements GUINodeController.
Definition at line 527 of file GUIInputInternalController.cpp.
|
friend |
Definition at line 30 of file GUIInputInternalController.h.
|
friend |
Definition at line 29 of file GUIInputInternalController.h.
|
staticconstexprprivate |
Definition at line 34 of file GUIInputInternalController.h.
|
private |
Definition at line 38 of file GUIInputInternalController.h.
|
private |
Definition at line 37 of file GUIInputInternalController.h.
|
private |
Definition at line 57 of file GUIInputInternalController.h.
|
staticconstexprprivate |
Definition at line 35 of file GUIInputInternalController.h.
|
private |
Definition at line 59 of file GUIInputInternalController.h.
|
private |
Definition at line 52 of file GUIInputInternalController.h.
|
private |
Definition at line 51 of file GUIInputInternalController.h.
|
private |
Definition at line 53 of file GUIInputInternalController.h.
|
private |
Definition at line 39 of file GUIInputInternalController.h.
|
private |
Definition at line 36 of file GUIInputInternalController.h.
|
private |
Definition at line 55 of file GUIInputInternalController.h.
|
private |
Definition at line 54 of file GUIInputInternalController.h.
|
private |
Definition at line 42 of file GUIInputInternalController.h.
|
private |
Definition at line 44 of file GUIInputInternalController.h.
|
private |
Definition at line 43 of file GUIInputInternalController.h.
|
private |
Definition at line 45 of file GUIInputInternalController.h.
|
private |
Definition at line 46 of file GUIInputInternalController.h.
|
private |
Definition at line 41 of file GUIInputInternalController.h.
|
private |
Definition at line 40 of file GUIInputInternalController.h.
|
private |
Definition at line 56 of file GUIInputInternalController.h.
|
private |
Definition at line 50 of file GUIInputInternalController.h.
|
private |
Definition at line 47 of file GUIInputInternalController.h.