TDME2
1.9.200
src
tdme
tools
editor
controllers
ProgressBarScreenController.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/events/GUIActionListener.h
>
8
#include <
tdme/gui/events/GUITooltipRequestListener.h
>
9
#include <
tdme/gui/nodes/fwd-tdme.h
>
10
#include <
tdme/tools/editor/controllers/fwd-tdme.h
>
11
#include <
tdme/tools/editor/controllers/ScreenController.h
>
12
#include <
tdme/tools/editor/misc/fwd-tdme.h
>
13
#include <
tdme/utilities/fwd-tdme.h
>
14
15
using
std::string;
16
17
using
tdme::gui::events::GUITooltipRequestListener
;
18
using
tdme::gui::nodes::GUIElementNode
;
19
using
tdme::gui::nodes::GUINode
;
20
using
tdme::gui::nodes::GUIScreenNode
;
21
using
tdme::gui::nodes::GUITextNode
;
22
using
tdme::tools::editor::controllers::ScreenController
;
23
using
tdme::tools::editor::misc::PopUps
;
24
using
tdme::utilities::MutableString
;
25
26
/**
27
* Progress bar screen controller
28
* @author Andreas Drewke
29
*/
30
class
tdme::tools::editor::controllers::ProgressBarScreenController
final
31
:
public
ScreenController
32
,
public
virtual
GUITooltipRequestListener
33
{
34
35
private
:
36
PopUps
*
popUps
{
nullptr
};
37
GUIScreenNode
*
screenNode
{
nullptr
};
38
GUIElementNode
*
progressBarNode
{
nullptr
};
39
GUIElementNode
*
progressBarParent
{
nullptr
};
40
GUITextNode
*
progressMessageNode
{
nullptr
};
41
42
public
:
43
// forbid class copy
44
FORBID_CLASS_COPY
(
ProgressBarScreenController
)
45
46
/**
47
* Public constructor
48
* @param popUps pop ups
49
*/
50
ProgressBarScreenController
(
PopUps
*
popUps
);
51
52
/**
53
* Destructor
54
*/
55
virtual
~ProgressBarScreenController
();
56
57
// overridden methods
58
GUIScreenNode
*
getScreenNode
()
override
;
59
void
initialize
()
override
;
60
void
dispose
()
override
;
61
void
onTooltipShowRequest
(
GUINode
* node,
int
mouseX,
int
mouseY)
override
;
62
void
onTooltipCloseRequest
()
override
;
63
64
/**
65
* Shows the pop up
66
* @param showProgressBar show progress bar
67
*/
68
void
show
(
const
string
& message,
bool
showProgressBar =
true
);
69
70
/**
71
* Show progress
72
* @param value value
73
*/
74
void
progress
(
float
value);
75
76
/**
77
* Show progress 2
78
* @param value value
79
*/
80
void
progress2
(
float
value);
81
82
/**
83
* Closes the pop up
84
*/
85
void
close
();
86
87
};
GUIActionListener.h
GUITooltipRequestListener.h
ScreenController.h
tdme::gui::nodes::GUIElementNode
GUI element node.
Definition:
GUIElementNode.h:37
tdme::gui::nodes::GUINode
GUI node base class.
Definition:
GUINode.h:64
tdme::gui::nodes::GUIScreenNode
GUI screen node that represents a screen that can be rendered via GUI system.
Definition:
GUIScreenNode.h:72
tdme::gui::nodes::GUITextNode
GUI text node.
Definition:
GUITextNode.h:41
tdme::tools::editor::controllers::ProgressBarScreenController
Progress bar screen controller.
Definition:
ProgressBarScreenController.h:33
tdme::tools::editor::controllers::ProgressBarScreenController::dispose
void dispose() override
Dispose.
Definition:
ProgressBarScreenController.cpp:67
tdme::tools::editor::controllers::ProgressBarScreenController::initialize
void initialize() override
Init.
Definition:
ProgressBarScreenController.cpp:53
tdme::tools::editor::controllers::ProgressBarScreenController::progress
void progress(float value)
Show progress.
Definition:
ProgressBarScreenController.cpp:84
tdme::tools::editor::controllers::ProgressBarScreenController::getScreenNode
GUIScreenNode * getScreenNode() override
Definition:
ProgressBarScreenController.cpp:48
tdme::tools::editor::controllers::ProgressBarScreenController::close
void close()
Closes the pop up.
Definition:
ProgressBarScreenController.cpp:96
tdme::tools::editor::controllers::ProgressBarScreenController::show
void show(const string &message, bool showProgressBar=true)
Shows the pop up.
Definition:
ProgressBarScreenController.cpp:72
tdme::tools::editor::controllers::ProgressBarScreenController::onTooltipCloseRequest
void onTooltipCloseRequest() override
On tooltip close request.
Definition:
ProgressBarScreenController.cpp:105
tdme::tools::editor::controllers::ProgressBarScreenController::progressMessageNode
GUITextNode * progressMessageNode
Definition:
ProgressBarScreenController.h:40
tdme::tools::editor::controllers::ProgressBarScreenController::progressBarParent
GUIElementNode * progressBarParent
Definition:
ProgressBarScreenController.h:39
tdme::tools::editor::controllers::ProgressBarScreenController::screenNode
GUIScreenNode * screenNode
Definition:
ProgressBarScreenController.h:37
tdme::tools::editor::controllers::ProgressBarScreenController::progress2
void progress2(float value)
Show progress 2.
Definition:
ProgressBarScreenController.cpp:92
tdme::tools::editor::controllers::ProgressBarScreenController::progressBarNode
GUIElementNode * progressBarNode
Definition:
ProgressBarScreenController.h:38
tdme::tools::editor::controllers::ProgressBarScreenController::popUps
PopUps * popUps
Definition:
ProgressBarScreenController.h:36
tdme::tools::editor::controllers::ProgressBarScreenController::ProgressBarScreenController
ProgressBarScreenController(PopUps *popUps)
Public constructor.
Definition:
ProgressBarScreenController.cpp:41
tdme::tools::editor::controllers::ProgressBarScreenController::~ProgressBarScreenController
virtual ~ProgressBarScreenController()
Destructor.
Definition:
ProgressBarScreenController.cpp:45
tdme::tools::editor::controllers::ProgressBarScreenController::onTooltipShowRequest
void onTooltipShowRequest(GUINode *node, int mouseX, int mouseY) override
On tooltip show request.
Definition:
ProgressBarScreenController.cpp:101
tdme::tools::editor::misc::PopUps
Pop ups controller accessor class.
Definition:
PopUps.h:29
tdme::utilities::MutableString
Mutable utf8 aware string class.
Definition:
MutableString.h:23
fwd-tdme.h
fwd-tdme.h
tdme::gui::events::GUITooltipRequestListener
GUI tooltip request listener.
Definition:
GUITooltipRequestListener.h:14
tdme::tools::editor::controllers::ScreenController
Screen controller, which connects GUI screen definition with code.
Definition:
ScreenController.h:14
tdme.h
FORBID_CLASS_COPY
#define FORBID_CLASS_COPY(CLASS)
Definition:
tdme.h:6
fwd-tdme.h
fwd-tdme.h
fwd-tdme.h
Generated by
1.9.1