TDME2 1.9.121
GUIContextMenuItemController.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
21
22/**
23 * GUI context menu item controller
24 * @author Andreas Drewke
25 * @version $Id$
26 */
29{
31 friend class GUIContextMenuItem;
32
33private:
39
40 /**
41 * Private constructor
42 * @param node node
43 */
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
61public:
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};
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.
GUI context menu item element.
GUI node controller base class.
GUI node base class.
Definition: GUINode.h:63
GUI parent node base class thats supporting child nodes.
Definition: GUIParentNode.h:43
Mutable string class.
Definition: MutableString.h:16
#define STATIC_DLL_IMPEXT
Definition: tdme.h:11