TDME2 1.9.121
GUISelectorHController.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include <tdme/tdme.h>
12
13using std::string;
14using std::vector;
15
25
26/**
27 * GUI selector horizontal controller
28 * @author Andreas Drewke
29 * @version $Id$
30 */
33{
34 friend class GUISelectorH;
36
37private:
40 vector<GUISelectorHOptionController*> selectorHOptionControllers;
43 string search;
47
48private:
49 /**
50 * Private constructor
51 * @param node node
52 */
54
55 /**
56 * Unselect
57 */
58 void unselect();
59
60 /**
61 * Select by index
62 * @param idx index
63 */
64 void select(int idx);
65
66 /**
67 * Select by option element node
68 * @param selectedSelectorHOptionElementNode selected selector horizontal option element node
69 */
70 void select(GUIElementNode* selectedSelectorHOptionElementNode);
71
72 /**
73 * Determine drop down option controllers
74 */
76
77 /**
78 * Select next node
79 */
80 void selectNext();
81
82 /**
83 * Select previous
84 */
85 void selectPrevious();
86
87public:
88 // overridden methods
89 bool isDisabled() override;
90 void setDisabled(bool disabled) override;
91 void initialize() override;
92 void dispose() override;
93 void postLayout() override;
94 void handleMouseEvent(GUINode* node, GUIMouseEvent* event) override;
95 void handleKeyboardEvent(GUIKeyboardEvent* event) override;
96 void tick() override;
97 void onFocusGained() override;
98 void onFocusLost() override;
99 bool hasValue() override;
100 const MutableString& getValue() override;
101 void setValue(const MutableString& value) override;
102 void onSubTreeChange() override;
103
104};
GUI selector horizontal controller.
vector< GUISelectorHOptionController * > selectorHOptionControllers
void initialize() override
Initialize controller after element has been created.
void handleKeyboardEvent(GUIKeyboardEvent *event) override
Handle keyboard event.
void setValue(const MutableString &value) override
Set value.
void handleMouseEvent(GUINode *node, GUIMouseEvent *event) override
Handle mouse event.
void tick() override
Tick method will be executed once per frame.
static STATIC_DLL_IMPEXT string CONDITION_DISABLED
static STATIC_DLL_IMPEXT string CONDITION_ENABLED
void setDisabled(bool disabled) override
Set disabled.
GUISelectorHController(GUINode *node)
Private constructor.
void onSubTreeChange() override
On sub tree change.
void determineSelectorHOptionControllers()
Determine drop down option controllers.
GUI selector horizontal element.
Definition: GUISelectorH.h:28
GUI node controller base class.
GUI node base class.
Definition: GUINode.h:63
GUI parent node base class thats supporting child nodes.
Definition: GUIParentNode.h:43
Mutable string class.
Definition: MutableString.h:16
GUI action listener interface.
#define STATIC_DLL_IMPEXT
Definition: tdme.h:11