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