TDME2 1.9.121
GUICheckboxController.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#include <tdme/tdme.h>
11
12using std::string;
13
20
21/**
22 * GUI check box controller
23 * @author Andreas Drewke
24 * @version $Id$
25 */
28{
29 friend class GUICheckbox;
30
31private:
36 bool checked;
39
40 /**
41 * Private constructor
42 * @param node node
43 */
45
46 /**
47 * @return is checked
48 */
49 bool isChecked();
50
51 /**
52 * Set checked
53 * @param checked checked
54 */
55 void setChecked(bool checked);
56
57public:
58 // overridden methods
59 bool isDisabled() override;
60 void setDisabled(bool disabled) override;
61 void initialize() override;
62 void dispose() override;
63 void postLayout() override;
64 void handleMouseEvent(GUINode* node, GUIMouseEvent* event) override;
65 void handleKeyboardEvent(GUIKeyboardEvent* event) override;
66 void tick() override;
67 void onFocusGained() override;
68 void onFocusLost() override;
69 bool hasValue() override;
70 const MutableString& getValue() override;
71 void setValue(const MutableString& value) override;
72
73};
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.
GUICheckboxController(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_UNCHECKED
static STATIC_DLL_IMPEXT string CONDITION_DISABLED
static STATIC_DLL_IMPEXT string CONDITION_ENABLED
void setDisabled(bool disabled) override
Set disabled.
static STATIC_DLL_IMPEXT string CONDITION_CHECKED
GUI check box element.
Definition: GUICheckbox.h:28
GUI node controller base class.
GUI node base class.
Definition: GUINode.h:63
Mutable string class.
Definition: MutableString.h:16
#define STATIC_DLL_IMPEXT
Definition: tdme.h:11