TDME2
1.9.121
src
tdme
tools
editor
controllers
ColorPickerImageController.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/events/fwd-tdme.h
>
7
#include <
tdme/gui/nodes/GUINodeController.h
>
8
#include <
tdme/tools/editor/controllers/fwd-tdme.h
>
9
#include <
tdme/utilities/MutableString.h
>
10
11
using
std::string;
12
13
using
tdme::gui::events::GUIKeyboardEvent
;
14
using
tdme::gui::events::GUIMouseEvent
;
15
using
tdme::gui::nodes::GUINode
;
16
using
tdme::gui::nodes::GUINodeController
;
17
using
tdme::tools::editor::controllers::ColorPickerScreenController
;
18
using
tdme::utilities::MutableString
;
19
20
/**
21
* Color picker image controller controller
22
* @author Andreas Drewke
23
* @version $Id$
24
*/
25
class
tdme::tools::editor::controllers::ColorPickerImageController
26
:
public
GUINodeController
27
{
28
friend
class
GUIElementNode
;
29
30
private
:
31
MutableString
value
;
32
ColorPickerScreenController
*
colorPickerScreenController
{
nullptr
};
33
34
public
:
35
/**
36
* Constructor
37
* @param node node
38
* @param colorPickerScreenController color picker screen controller
39
*/
40
ColorPickerImageController
(
GUINode
*
node
,
ColorPickerScreenController
*
colorPickerScreenController
);
41
42
// overridden methods
43
bool
isDisabled
()
override
;
44
void
setDisabled
(
bool
disabled)
override
;
45
void
initialize
()
override
;
46
void
dispose
()
override
;
47
void
postLayout
()
override
;
48
void
handleMouseEvent
(
GUINode
*
node
,
GUIMouseEvent
* event)
override
;
49
void
handleKeyboardEvent
(
GUIKeyboardEvent
* event)
override
;
50
void
tick
()
override
;
51
void
onFocusGained
()
override
;
52
void
onFocusLost
()
override
;
53
bool
hasValue
()
override
;
54
const
MutableString
&
getValue
()
override
;
55
void
setValue
(
const
MutableString
&
value
)
override
;
56
void
onSubTreeChange
()
override
;
57
};
GUINodeController.h
MutableString.h
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::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::tools::editor::controllers::ColorPickerImageController
Color picker image controller controller.
Definition:
ColorPickerImageController.h:27
tdme::tools::editor::controllers::ColorPickerImageController::onFocusGained
void onFocusGained() override
On focus gained.
Definition:
ColorPickerImageController.cpp:118
tdme::tools::editor::controllers::ColorPickerImageController::dispose
void dispose() override
Dispose controller.
Definition:
ColorPickerImageController.cpp:63
tdme::tools::editor::controllers::ColorPickerImageController::postLayout
void postLayout() override
Post layout event.
Definition:
ColorPickerImageController.cpp:67
tdme::tools::editor::controllers::ColorPickerImageController::initialize
void initialize() override
Initialize controller after element has been created.
Definition:
ColorPickerImageController.cpp:59
tdme::tools::editor::controllers::ColorPickerImageController::handleKeyboardEvent
void handleKeyboardEvent(GUIKeyboardEvent *event) override
Handle keyboard event.
Definition:
ColorPickerImageController.cpp:110
tdme::tools::editor::controllers::ColorPickerImageController::onFocusLost
void onFocusLost() override
On focus lost.
Definition:
ColorPickerImageController.cpp:122
tdme::tools::editor::controllers::ColorPickerImageController::setValue
void setValue(const MutableString &value) override
Set value.
Definition:
ColorPickerImageController.cpp:136
tdme::tools::editor::controllers::ColorPickerImageController::handleMouseEvent
void handleMouseEvent(GUINode *node, GUIMouseEvent *event) override
Handle mouse event.
Definition:
ColorPickerImageController.cpp:71
tdme::tools::editor::controllers::ColorPickerImageController::colorPickerScreenController
ColorPickerScreenController * colorPickerScreenController
Definition:
ColorPickerImageController.h:32
tdme::tools::editor::controllers::ColorPickerImageController::tick
void tick() override
Tick method will be executed once per frame.
Definition:
ColorPickerImageController.cpp:114
tdme::tools::editor::controllers::ColorPickerImageController::ColorPickerImageController
ColorPickerImageController(GUINode *node, ColorPickerScreenController *colorPickerScreenController)
Constructor.
Definition:
ColorPickerImageController.cpp:45
tdme::tools::editor::controllers::ColorPickerImageController::setDisabled
void setDisabled(bool disabled) override
Set disabled.
Definition:
ColorPickerImageController.cpp:55
tdme::tools::editor::controllers::ColorPickerImageController::value
MutableString value
Definition:
ColorPickerImageController.h:31
tdme::tools::editor::controllers::ColorPickerImageController::getValue
const MutableString & getValue() override
Definition:
ColorPickerImageController.cpp:131
tdme::tools::editor::controllers::ColorPickerImageController::isDisabled
bool isDisabled() override
Definition:
ColorPickerImageController.cpp:50
tdme::tools::editor::controllers::ColorPickerImageController::onSubTreeChange
void onSubTreeChange() override
On sub tree change.
Definition:
ColorPickerImageController.cpp:140
tdme::tools::editor::controllers::ColorPickerImageController::hasValue
bool hasValue() override
Definition:
ColorPickerImageController.cpp:126
tdme::tools::editor::controllers::ColorPickerImageController::GUIElementNode
friend class GUIElementNode
Definition:
ColorPickerImageController.h:28
tdme::tools::editor::controllers::ColorPickerScreenController
Color picker screen controller.
Definition:
ColorPickerScreenController.h:37
tdme::utilities::MutableString
Mutable string class.
Definition:
MutableString.h:16
fwd-tdme.h
tdme.h
fwd-tdme.h
Generated by
1.9.3