TDME2 1.9.121
GUITabController.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#include <tdme/tdme.h>
13
14using std::string;
15
22
23/**
24 * GUI tab controller
25 * @author Andreas Drewke
26 * @version $Id$
27 */
29{
30 friend class GUITab;
31 friend class GUITabsController;
33
34private:
39 GUINode* tabsNode { nullptr };
40 GUINode* tabsHeaderNode { nullptr };
48
49 /**
50 * Private constructor
51 */
53
54 /**
55 * @return is checked
56 */
57 bool isSelected();
58
59 /**
60 * Set checked
61 * @param selected selected
62 */
63 void setSelected(bool selected);
64
65public:
66 // overridden methods
67 bool isDisabled() override;
68 void setDisabled(bool disabled) override;
69 void initialize() override;
70 void dispose() override;
71 void postLayout() override;
72 void handleMouseEvent(GUINode* node, GUIMouseEvent* event) override;
73 void handleKeyboardEvent(GUIKeyboardEvent* event) override;
74 void tick() override;
75 void onFocusGained() override;
76 void onFocusLost() override;
77 bool hasValue() override;
78 const MutableString& getValue() override;
79 void setValue(const MutableString& value) override;
80
81};
void onFocusGained() override
On focus gained.
void dispose() override
Dispose controller.
void postLayout() override
Post layout event.
void initialize() override
Initialize controller after element has been created.
void handleKeyboardEvent(GUIKeyboardEvent *event) override
Handle keyboard event.
void onFocusLost() override
On focus lost.
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
static STATIC_DLL_IMPEXT string CONDITION_UNSELECTED
void setDisabled(bool disabled) override
Set disabled.
const MutableString & getValue() override
void setSelected(bool selected)
Set checked.
GUITabController(GUINode *node)
Private constructor.
static STATIC_DLL_IMPEXT string CONDITION_SELECTED
GUI tab element.
Definition: GUITab.h:28
GUI node base class.
Definition: GUINode.h:63
Mutable string class.
Definition: MutableString.h:16
#define STATIC_DLL_IMPEXT
Definition: tdme.h:11