TDME2 1.9.121
GUIMenuHeaderItemController.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
24
25/**
26 * GUI menu header item controller
27 * @author Andreas Drewke
28 * @version $Id$
29 */
32{
34 friend class GUIMenuHeaderItem;
37
38private:
44 vector<GUIMenuItemController*> menuItemControllers;
45 bool open;
49
50private:
51 /**
52 * Private constructor
53 * @param node node
54 */
56
57 /**
58 * @return menu open state
59 */
60 bool isOpen();
61
62 /**
63 * @return is selected
64 */
65 bool isSelected();
66
67 /**
68 * Select
69 */
70 void select();
71
72 /**
73 * Unselect
74 */
75 void unselect();
76
77 /**
78 * Toggle open state
79 */
80 void toggleOpenState();
81
82 /**
83 * Determine menu item controllers
84 */
86
87 /**
88 * Unselect selection
89 */
90 void unselectSelection();
91
92 /**
93 * Select first menu item
94 */
95 void selectFirst();
96
97 /**
98 * Select next menu item
99 */
100 void selectNext();
101
102 /**
103 * Select previous menu item
104 */
105 void selectPrevious();
106
107 /**
108 * Handle current menu item keyboard event
109 * @param event event
110 */
112
113public:
114 // overridden methods
115 void initialize() override;
116 void dispose() override;
117 void postLayout() override;
118 void handleMouseEvent(GUINode* node, GUIMouseEvent* event) override;
119 void handleKeyboardEvent(GUIKeyboardEvent* event) override;
120 void tick() override;
121 void onFocusGained() override;
122 void onFocusLost() override;
123 bool hasValue() override;
124 const MutableString& getValue() override;
125 void setValue(const MutableString& value) override;
126 void onSubTreeChange() override;
127
128};
GUIMenuHeaderItemController(GUINode *node)
Private constructor.
void initialize() override
Initialize controller after element has been created.
void handleKeyboardEvent(GUIKeyboardEvent *event) override
Handle keyboard event.
void handleCurrentMenuItemKeyboardEvent(GUIKeyboardEvent *event)
Handle current menu item keyboard event.
void determineMenuItemControllers()
Determine menu item controllers.
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.
GUI menu header item element.
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
#define STATIC_DLL_IMPEXT
Definition: tdme.h:11