TDME2 1.9.121
GUISliderVController.h
Go to the documentation of this file.
1#pragma once
2
3#include <tdme/tdme.h>
9
15
16/**
17 * GUI vertical slider controller
18 * @author Andreas Drewke
19 * @version $Id$
20 */
22{
23 friend class GUISliderV;
24
25private:
26 GUINode* sliderNode { nullptr };
27 bool disabled { false };
28 float valueFloat { 0.0f };
30
31 /**
32 * Public constructor
33 * @param node node
34 */
36
37 /**
38 * Update slider
39 */
40 void updateSlider();
41
42public:
43 // overridden methods
44 bool isDisabled() override;
45 void setDisabled(bool disabled) override;
46 void initialize() override;
47 void dispose() override;
48 void postLayout() override;
49 void handleMouseEvent(GUINode* node, GUIMouseEvent* event) override;
50 void handleKeyboardEvent(GUIKeyboardEvent* event) override;
51 void tick() override;
52 void onFocusGained() override;
53 void onFocusLost() override;
54 bool hasValue() override;
55 const MutableString& getValue() override;
56 void setValue(const MutableString& value) override;
57
58};
GUISliderVController(GUINode *node)
Public constructor.
void onFocusGained() override
On focus gained.
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.
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.
void setDisabled(bool disabled) override
Set disabled.
const MutableString & getValue() override
GUI vertical slider element.
Definition: GUISliderV.h:29
GUI node base class.
Definition: GUINode.h:63
Mutable string class.
Definition: MutableString.h:16