TDME2 1.9.121
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
GUIKnobController Class Referencefinal

GUI knob controller. More...

#include <tdme/gui/elements/GUIKnobController.h>

Inheritance diagram for GUIKnobController:
Inheritance graph
Collaboration diagram for GUIKnobController:
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...
 
- Public Member Functions inherited from GUIElementController
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...
 

Private Member Functions

 GUIKnobController (GUINode *node)
 Private constructor. More...
 
void updateKnob ()
 Update knob. More...
 

Private Attributes

GUINodeknobNode { nullptr }
 
bool disabled { false }
 
float valueFloat { 0.0f }
 
MutableString value
 
int mouseLastX { -1 }
 

Friends

class GUIKnob
 

Additional Inherited Members

- Protected Member Functions inherited from GUIElementController
 GUIElementController (GUINode *node)
 Constructor. More...
 
- Protected Member Functions inherited from GUINodeController
 GUINodeController (GUINode *node)
 Private constructor. More...
 
- Protected Attributes inherited from GUINodeController
GUINodenode { nullptr }
 
- Static Protected Attributes inherited from GUIElementController
static STATIC_DLL_IMPEXT string CONDITION_DISABLED = "disabled"
 
static STATIC_DLL_IMPEXT string CONDITION_ENABLED = "enabled"
 

Detailed Description

GUI knob controller.

Author
Andreas Drewke
Version
$Id$

Definition at line 21 of file GUIKnobController.h.

Constructor & Destructor Documentation

◆ GUIKnobController()

GUIKnobController ( GUINode node)
private

Private constructor.

Parameters
nodenode

Definition at line 42 of file GUIKnobController.cpp.

Member Function Documentation

◆ dispose()

void dispose ( )
overridevirtual

Dispose controller.

Implements GUINodeController.

Definition at line 62 of file GUIKnobController.cpp.

◆ getValue()

const MutableString & getValue ( )
overridevirtual
Returns
value

Implements GUINodeController.

Definition at line 135 of file GUIKnobController.cpp.

◆ handleKeyboardEvent()

void handleKeyboardEvent ( GUIKeyboardEvent event)
overridevirtual

Handle keyboard event.

Parameters
eventevent

Implements GUINodeController.

Definition at line 97 of file GUIKnobController.cpp.

◆ handleMouseEvent()

void handleMouseEvent ( GUINode node,
GUIMouseEvent event 
)
overridevirtual

Handle mouse event.

Parameters
nodenode
eventevent

Implements GUINodeController.

Definition at line 70 of file GUIKnobController.cpp.

◆ hasValue()

bool hasValue ( )
overridevirtual
Returns
has value

Implements GUINodeController.

Definition at line 131 of file GUIKnobController.cpp.

◆ initialize()

void initialize ( )
overridevirtual

Initialize controller after element has been created.

Implements GUINodeController.

Definition at line 54 of file GUIKnobController.cpp.

◆ isDisabled()

bool isDisabled ( )
overridevirtual
Returns
is disabled

Implements GUINodeController.

Definition at line 46 of file GUIKnobController.cpp.

◆ onFocusGained()

void onFocusGained ( )
overridevirtual

On focus gained.

Implements GUINodeController.

Definition at line 125 of file GUIKnobController.cpp.

◆ onFocusLost()

void onFocusLost ( )
overridevirtual

On focus lost.

Implements GUINodeController.

Definition at line 128 of file GUIKnobController.cpp.

◆ postLayout()

void postLayout ( )
overridevirtual

Post layout event.

Implements GUINodeController.

Definition at line 66 of file GUIKnobController.cpp.

◆ setDisabled()

void setDisabled ( bool  disabled)
overridevirtual

Set disabled.

Parameters
disableddisabled

Implements GUINodeController.

Definition at line 50 of file GUIKnobController.cpp.

◆ setValue()

void setValue ( const MutableString value)
overridevirtual

Set value.

Parameters
valuevalue

Implements GUINodeController.

Definition at line 139 of file GUIKnobController.cpp.

◆ tick()

void tick ( )
overridevirtual

Tick method will be executed once per frame.

Implements GUINodeController.

Definition at line 121 of file GUIKnobController.cpp.

◆ updateKnob()

void updateKnob ( )
private

Update knob.

Definition at line 145 of file GUIKnobController.cpp.

Friends And Related Function Documentation

◆ GUIKnob

friend class GUIKnob
friend

Definition at line 23 of file GUIKnobController.h.

Member Data Documentation

◆ disabled

bool disabled { false }
private

Definition at line 27 of file GUIKnobController.h.

◆ knobNode

GUINode* knobNode { nullptr }
private

Definition at line 26 of file GUIKnobController.h.

◆ mouseLastX

int mouseLastX { -1 }
private

Definition at line 30 of file GUIKnobController.h.

◆ value

MutableString value
private

Definition at line 29 of file GUIKnobController.h.

◆ valueFloat

float valueFloat { 0.0f }
private

Definition at line 28 of file GUIKnobController.h.


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