TDME2 1.9.121
GUIMenuHeaderController.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include <tdme/tdme.h>
11
12using std::vector;
13
20
21/**
22 * GUI menu header controller
23 * @author Andreas Drewke
24 * @version $Id$
25 */
27 : public GUINodeController
28{
29 friend class GUIMenuHeader;
31
32private:
33 vector<GUIMenuHeaderItemController*> menuHeaderItemControllers;
34 bool focus;
37
38 /**
39 * Private constructor
40 * @param node node
41 */
43
44 /**
45 * @return has focus
46 */
47 bool hasFocus();
48
49 /**
50 * Determine menu header item controllers
51 */
53
54 /**
55 * @return if menu is open
56 */
57 bool isOpen();
58
59 /**
60 * Unselect
61 */
62 void unselect();
63
64 /**
65 * Select next node
66 */
67 void selectNext();
68
69 /**
70 * Select previous
71 */
72 void selectPrevious();
73
74 /**
75 * Select by index
76 * @param idx index
77 */
78 void select(int idx);
79
80 /**
81 * Select element node
82 * @param elementNode element node
83 */
84 void select(GUIElementNode* elementNode);
85
86public:
87 // overridden methods
88 bool isDisabled() override;
89 void setDisabled(bool disabled) override;
90 void initialize() override;
91 void dispose() override;
92 void postLayout() override;
93 void handleMouseEvent(GUINode* node, GUIMouseEvent* event) override;
94 void handleKeyboardEvent(GUIKeyboardEvent* event) override;
95 void tick() override;
96 void onFocusGained() override;
97 void onFocusLost() override;
98 bool hasValue() override;
99 const MutableString& getValue() override;
100 void setValue(const MutableString& value) override;
101 void onSubTreeChange() override;
102
103};
void determineMenuHeaderItemControllers()
Determine menu header item controllers.
vector< GUIMenuHeaderItemController * > menuHeaderItemControllers
GUIMenuHeaderController(GUINode *node)
Private constructor.
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.
void setDisabled(bool disabled) override
Set disabled.
void onSubTreeChange() override
On sub tree change.
GUI menu header element.
Definition: GUIMenuHeader.h:28
GUI node controller base class.
GUI node base class.
Definition: GUINode.h:63
Mutable string class.
Definition: MutableString.h:16