TDME2
1.9.121
Toggle main menu visibility
Main Page
Related Pages
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
a
b
c
e
f
g
i
l
m
n
r
s
t
u
v
Enumerator
a
b
c
e
f
g
i
k
l
m
n
o
r
s
t
v
Related Functions
a
b
c
e
f
g
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Files
File List
File Members
All
a
b
c
e
f
g
k
m
o
p
r
s
t
Functions
c
g
m
o
p
r
s
t
Variables
Macros
a
b
c
e
f
g
k
m
p
s
t
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
tdme
gui
elements
GUIMenuItemController.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
5
#include <
tdme/tdme.h
>
6
#include <
tdme/gui/elements/fwd-tdme.h
>
7
#include <
tdme/gui/events/fwd-tdme.h
>
8
#include <
tdme/gui/nodes/fwd-tdme.h
>
9
#include <
tdme/gui/nodes/GUIElementController.h
>
10
#include <
tdme/utilities/MutableString.h
>
11
12
using
std::string;
13
14
using
tdme::gui::events::GUIKeyboardEvent
;
15
using
tdme::gui::events::GUIMouseEvent
;
16
using
tdme::gui::nodes::GUIElementController
;
17
using
tdme::gui::nodes::GUINode
;
18
using
tdme::gui::nodes::GUINodeController
;
19
using
tdme::gui::nodes::GUIParentNode
;
20
using
tdme::utilities::MutableString
;
21
22
/**
23
* GUI menu item controller
24
* @author Andreas Drewke
25
* @version $Id$
26
*/
27
class
tdme::gui::elements::GUIMenuItemController
final
28
:
public
GUIElementController
29
{
30
friend
class
GUIMenuItem
;
31
friend
class
GUIMenuHeaderItemController
;
32
33
private
:
34
STATIC_DLL_IMPEXT
static
string
CONDITION_SELECTED
;
35
STATIC_DLL_IMPEXT
static
string
CONDITION_UNSELECTED
;
36
bool
selected
;
37
MutableString
value
;
38
GUIParentNode
*
menuHeaderItemNode
{
nullptr
};
39
40
/**
41
* Private constructor
42
* @param node node
43
*/
44
GUIMenuItemController
(
GUINode
*
node
);
45
46
/**
47
* @return is selected
48
*/
49
bool
isSelected
();
50
51
/**
52
* Select
53
*/
54
void
select
();
55
56
/**
57
* Unselect
58
*/
59
void
unselect
();
60
61
public
:
62
// overridden methods
63
void
initialize
()
override
;
64
void
postLayout
()
override
;
65
void
dispose
()
override
;
66
void
handleMouseEvent
(
GUINode
*
node
,
GUIMouseEvent
* event)
override
;
67
void
handleKeyboardEvent
(
GUIKeyboardEvent
* event)
override
;
68
void
tick
()
override
;
69
void
onFocusGained
()
override
;
70
void
onFocusLost
()
override
;
71
bool
hasValue
()
override
;
72
const
MutableString
&
getValue
()
override
;
73
void
setValue
(
const
MutableString
&
value
)
override
;
74
75
};
GUIElementController.h
MutableString.h
tdme::gui::elements::GUIMenuHeaderItemController
GUI menu header item controller.
Definition:
GUIMenuHeaderItemController.h:32
tdme::gui::elements::GUIMenuItemController
GUI menu item controller.
Definition:
GUIMenuItemController.h:29
tdme::gui::elements::GUIMenuItemController::onFocusGained
void onFocusGained() override
On focus gained.
Definition:
GUIMenuItemController.cpp:134
tdme::gui::elements::GUIMenuItemController::dispose
void dispose() override
Dispose controller.
Definition:
GUIMenuItemController.cpp:93
tdme::gui::elements::GUIMenuItemController::postLayout
void postLayout() override
Post layout event.
Definition:
GUIMenuItemController.cpp:89
tdme::gui::elements::GUIMenuItemController::menuHeaderItemNode
GUIParentNode * menuHeaderItemNode
Definition:
GUIMenuItemController.h:38
tdme::gui::elements::GUIMenuItemController::initialize
void initialize() override
Initialize controller after element has been created.
Definition:
GUIMenuItemController.cpp:68
tdme::gui::elements::GUIMenuItemController::handleKeyboardEvent
void handleKeyboardEvent(GUIKeyboardEvent *event) override
Handle keyboard event.
Definition:
GUIMenuItemController.cpp:113
tdme::gui::elements::GUIMenuItemController::isSelected
bool isSelected()
Definition:
GUIMenuItemController.cpp:47
tdme::gui::elements::GUIMenuItemController::onFocusLost
void onFocusLost() override
On focus lost.
Definition:
GUIMenuItemController.cpp:138
tdme::gui::elements::GUIMenuItemController::setValue
void setValue(const MutableString &value) override
Set value.
Definition:
GUIMenuItemController.cpp:152
tdme::gui::elements::GUIMenuItemController::handleMouseEvent
void handleMouseEvent(GUINode *node, GUIMouseEvent *event) override
Handle mouse event.
Definition:
GUIMenuItemController.cpp:98
tdme::gui::elements::GUIMenuItemController::tick
void tick() override
Tick method will be executed once per frame.
Definition:
GUIMenuItemController.cpp:129
tdme::gui::elements::GUIMenuItemController::unselect
void unselect()
Unselect.
Definition:
GUIMenuItemController.cpp:60
tdme::gui::elements::GUIMenuItemController::CONDITION_UNSELECTED
static STATIC_DLL_IMPEXT string CONDITION_UNSELECTED
Definition:
GUIMenuItemController.h:35
tdme::gui::elements::GUIMenuItemController::selected
bool selected
Definition:
GUIMenuItemController.h:36
tdme::gui::elements::GUIMenuItemController::value
MutableString value
Definition:
GUIMenuItemController.h:37
tdme::gui::elements::GUIMenuItemController::getValue
const MutableString & getValue() override
Definition:
GUIMenuItemController.cpp:147
tdme::gui::elements::GUIMenuItemController::hasValue
bool hasValue() override
Definition:
GUIMenuItemController.cpp:142
tdme::gui::elements::GUIMenuItemController::GUIMenuItemController
GUIMenuItemController(GUINode *node)
Private constructor.
Definition:
GUIMenuItemController.cpp:41
tdme::gui::elements::GUIMenuItemController::select
void select()
Select.
Definition:
GUIMenuItemController.cpp:52
tdme::gui::elements::GUIMenuItemController::CONDITION_SELECTED
static STATIC_DLL_IMPEXT string CONDITION_SELECTED
Definition:
GUIMenuItemController.h:34
tdme::gui::elements::GUIMenuItem
GUI menu item element.
Definition:
GUIMenuItem.h:28
tdme::gui::events::GUIKeyboardEvent
GUI keyboard event.
Definition:
GUIKeyboardEvent.h:13
tdme::gui::events::GUIMouseEvent
GUI mouse event.
Definition:
GUIMouseEvent.h:13
tdme::gui::nodes::GUIElementController
GUI element controller.
Definition:
GUIElementController.h:26
tdme::gui::nodes::GUINodeController
GUI node controller base class.
Definition:
GUINodeController.h:19
tdme::gui::nodes::GUINodeController::node
GUINode * node
Definition:
GUINodeController.h:21
tdme::gui::nodes::GUINode
GUI node base class.
Definition:
GUINode.h:63
tdme::gui::nodes::GUIParentNode
GUI parent node base class thats supporting child nodes.
Definition:
GUIParentNode.h:43
tdme::utilities::MutableString
Mutable string class.
Definition:
MutableString.h:16
fwd-tdme.h
fwd-tdme.h
fwd-tdme.h
tdme.h
STATIC_DLL_IMPEXT
#define STATIC_DLL_IMPEXT
Definition:
tdme.h:11
Generated by
1.9.3