TDME2 1.9.121
GUIRadioButtonController.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <string>
5#include <vector>
6
7#include <tdme/tdme.h>
13
14using std::map;
15using std::string;
16using std::vector;
17
24
25/**
26 * GUI radio button controller
27 * @author Andreas Drewke
28 * @version $Id$
29 */
32{
33 friend class GUIRadioButton;
34
35private:
42 STATIC_DLL_IMPEXT static map<string, vector<GUIElementNode*>>* radioButtonGroupNodesByName;
44
45 /**
46 * Private constructor
47 * @param node node
48 */
50
51 /**
52 * @return is checked
53 */
54 bool isSelected();
55
56 /**
57 * Select
58 */
59 void select();
60
61public:
62 // overridden methods
63 bool isDisabled() override;
64 void setDisabled(bool disabled) override;
65 void initialize() override;
66 void dispose() override;
67 void postLayout() override;
68 void handleMouseEvent(GUINode* node, GUIMouseEvent* event) override;
69 void handleKeyboardEvent(GUIKeyboardEvent* event) override;
70 void tick() override;
71 void onFocusGained() override;
72 void onFocusLost() override;
73 bool hasValue() override;
74 const MutableString& getValue() override;
75 void setValue(const MutableString& value) override;
76
77};
static STATIC_DLL_IMPEXT map< string, vector< GUIElementNode * > > * radioButtonGroupNodesByName
void initialize() override
Initialize controller after element has been created.
void handleKeyboardEvent(GUIKeyboardEvent *event) override
Handle keyboard event.
GUIRadioButtonController(GUINode *node)
Private constructor.
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_UNSELECTED
void setDisabled(bool disabled) override
Set disabled.
GUI radio button element.
GUI node base class.
Definition: GUINode.h:63
Mutable string class.
Definition: MutableString.h:16
#define STATIC_DLL_IMPEXT
Definition: tdme.h:11