TDME2 1.9.121
Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Attributes | Static Private Attributes | Friends | List of all members
GUIElementController Class Reference

GUI element controller. More...

#include <tdme/gui/nodes/GUIElementController.h>

Inheritance diagram for GUIElementController:
Inheritance graph
Collaboration diagram for GUIElementController:
Collaboration graph

Public Member Functions

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 MutableStringgetValue () override
 
void setValue (const MutableString &value) override
 Set value. More...
 
void onSubTreeChange () override
 On sub tree change. More...
 
- Public Member Functions inherited from GUINodeController
virtual ~GUINodeController ()
 Destructor. More...
 
virtual GUINodegetNode ()
 
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 MutableStringgetValue ()=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...
 

Protected Member Functions

 GUIElementController (GUINode *node)
 Constructor. More...
 
- Protected Member Functions inherited from GUINodeController
 GUINodeController (GUINode *node)
 Private constructor. More...
 

Static Protected Attributes

static STATIC_DLL_IMPEXT string CONDITION_DISABLED = "disabled"
 
static STATIC_DLL_IMPEXT string CONDITION_ENABLED = "enabled"
 

Private Attributes

bool disabled
 
bool isActionPerforming
 
bool initialized
 
MutableString value
 
int64_t timeLastClicked { -1LL }
 

Static Private Attributes

static constexpr int64_t TIME_DOUBLECLICK { 200LL }
 

Friends

class GUIElementNode
 

Additional Inherited Members

- Protected Attributes inherited from GUINodeController
GUINodenode { nullptr }
 

Detailed Description

GUI element controller.

Author
Andreas Drewke
Version
$Id$

Definition at line 24 of file GUIElementController.h.

Constructor & Destructor Documentation

◆ GUIElementController()

GUIElementController ( GUINode node)
protected

Constructor.

Parameters
nodenode

Definition at line 34 of file GUIElementController.cpp.

Member Function Documentation

◆ dispose()

void dispose ( )
overridevirtual

Dispose controller.

Implements GUINodeController.

Definition at line 65 of file GUIElementController.cpp.

◆ getValue()

const MutableString & getValue ( )
overridevirtual
Returns
value

Implements GUINodeController.

Definition at line 212 of file GUIElementController.cpp.

◆ handleKeyboardEvent()

void handleKeyboardEvent ( GUIKeyboardEvent event)
overridevirtual

Handle keyboard event.

Parameters
eventevent

Implements GUINodeController.

Definition at line 151 of file GUIElementController.cpp.

◆ handleMouseEvent()

void handleMouseEvent ( GUINode node,
GUIMouseEvent event 
)
overridevirtual

Handle mouse event.

Parameters
nodenode
eventevent

Implements GUINodeController.

Definition at line 73 of file GUIElementController.cpp.

◆ hasValue()

bool hasValue ( )
overridevirtual
Returns
has value

Implements GUINodeController.

Definition at line 207 of file GUIElementController.cpp.

◆ initialize()

void initialize ( )
overridevirtual

Initialize controller after element has been created.

Implements GUINodeController.

Definition at line 59 of file GUIElementController.cpp.

◆ isDisabled()

bool isDisabled ( )
overridevirtual
Returns
is disabled

Implements GUINodeController.

Definition at line 45 of file GUIElementController.cpp.

◆ onFocusGained()

void onFocusGained ( )
overridevirtual

On focus gained.

Implements GUINodeController.

Definition at line 199 of file GUIElementController.cpp.

◆ onFocusLost()

void onFocusLost ( )
overridevirtual

On focus lost.

Implements GUINodeController.

Definition at line 203 of file GUIElementController.cpp.

◆ onSubTreeChange()

void onSubTreeChange ( )
overridevirtual

On sub tree change.

Implements GUINodeController.

Definition at line 221 of file GUIElementController.cpp.

◆ postLayout()

void postLayout ( )
overridevirtual

Post layout event.

Implements GUINodeController.

Definition at line 69 of file GUIElementController.cpp.

◆ setDisabled()

void setDisabled ( bool  disabled)
overridevirtual

Set disabled.

Parameters
disableddisabled

Implements GUINodeController.

Definition at line 50 of file GUIElementController.cpp.

◆ setValue()

void setValue ( const MutableString value)
overridevirtual

Set value.

Parameters
valuevalue

Implements GUINodeController.

Definition at line 217 of file GUIElementController.cpp.

◆ tick()

void tick ( )
overridevirtual

Tick method will be executed once per frame.

Implements GUINodeController.

Definition at line 171 of file GUIElementController.cpp.

Friends And Related Function Documentation

◆ GUIElementNode

friend class GUIElementNode
friend

Definition at line 27 of file GUIElementController.h.

Member Data Documentation

◆ CONDITION_DISABLED

string CONDITION_DISABLED = "disabled"
staticprotected

Definition at line 39 of file GUIElementController.h.

◆ CONDITION_ENABLED

string CONDITION_ENABLED = "enabled"
staticprotected

Definition at line 40 of file GUIElementController.h.

◆ disabled

bool disabled
private

Definition at line 32 of file GUIElementController.h.

◆ initialized

bool initialized
private

Definition at line 34 of file GUIElementController.h.

◆ isActionPerforming

bool isActionPerforming
private

Definition at line 33 of file GUIElementController.h.

◆ TIME_DOUBLECLICK

constexpr int64_t TIME_DOUBLECLICK { 200LL }
staticconstexprprivate

Definition at line 30 of file GUIElementController.h.

◆ timeLastClicked

int64_t timeLastClicked { -1LL }
private

Definition at line 36 of file GUIElementController.h.

◆ value

MutableString value
private

Definition at line 35 of file GUIElementController.h.


The documentation for this class was generated from the following files: