Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IGUISpinBox.hpp
1// Copyright (C) 2006-2012 Michael Zeilfelder
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in nirtcpp/nirtcpp.hpp
4
5#ifndef NIRT_I_GUI_SPIN_BOX_HPP_INCLUDED
6#define NIRT_I_GUI_SPIN_BOX_HPP_INCLUDED
7
8#include <nirtcpp/core/engine/IGUIElement.hpp>
9
10namespace nirt
11{
12namespace gui
13{
14 class IGUIEditBox;
15
29
30
32
35 class IGUISpinBox : public IGUIElement
36 {
37 public:
38
41 s32 id, core::rect<s32> rectangle)
42 : IGUIElement(EGUIET_SPIN_BOX, environment, parent, id, rectangle) {}
43
45 virtual IGUIEditBox* getEditBox() const = 0;
46
48
49 virtual void setValue(f32 val) = 0;
50
52 virtual f32 getValue() const = 0;
53
55
58 virtual f32 getValueFor(const wchar_t* text) const = 0;
59
61
63 virtual void setRange(f32 min, f32 max) = 0;
64
66 virtual f32 getMin() const = 0;
67
69 virtual f32 getMax() const = 0;
70
72
74 virtual void setStepSize(f32 step=1.f) = 0;
75
79
80 virtual void setDecimalPlaces(s32 places) = 0;
81
83 virtual f32 getStepSize() const = 0;
84
86
87 virtual void setValidateOn(u32 validateOn) = 0;
88
90
91 virtual u32 getValidateOn() const = 0;
92
94
97 virtual f32 getOldValue() const = 0;
98 };
99
100
101} // end namespace gui
102} // end namespace nirt
103
104#endif // NIRT_I_GUI_SPIN_BOX_HPP_INCLUDED
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
Single line edit box for editing simple text.
Definition IGUIEditBox.hpp:24
Base class of all GUI elements.
Definition IGUIElement.hpp:24
GUI Environment. Used as factory and manager of all other GUI elements.
Definition IGUIEnvironment.hpp:73
Single line edit box + spin buttons.
Definition IGUISpinBox.hpp:36
virtual void setValue(f32 val)=0
set the current value of the spinbox
virtual void setStepSize(f32 step=1.f)=0
Step size by which values are changed when pressing the spinbuttons.
virtual f32 getValueFor(const wchar_t *text) const =0
Get the value the spinbox would have for the given text.
virtual f32 getOldValue() const =0
Gets previous value in EGET_SPINBOX_CHANGED events.
virtual IGUIEditBox * getEditBox() const =0
Access the edit box used in the spin control.
virtual f32 getMin() const =0
get the minimum value which can be used in the spinbox
IGUISpinBox(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
constructor
Definition IGUISpinBox.hpp:40
virtual f32 getValue() const =0
Get the current value of the spinbox.
virtual f32 getStepSize() const =0
get the current step size
virtual u32 getValidateOn() const =0
Gets when the spinbox has to validate entered text.
virtual void setValidateOn(u32 validateOn)=0
Sets when the spinbox has to validate entered text.
virtual void setRange(f32 min, f32 max)=0
set the range of values which can be used in the spinbox
virtual void setDecimalPlaces(s32 places)=0
virtual f32 getMax() const =0
get the maximum value which can be used in the spinbox
@ EGUIET_SPIN_BOX
A spin box (IGUISpinBox)
Definition EGUIElementTypes.hpp:65
EGUI_SPINBOX_VALIDATION
Definition IGUISpinBox.hpp:19
@ EGUI_SBV_ENTER
Validate when enter was pressed.
Definition IGUISpinBox.hpp:25
@ EGUI_SBV_CHANGE
Validate on each change. Was default up to Nirtcpp 1.8.
Definition IGUISpinBox.hpp:23
@ EGUI_SBV_NEVER
Does not validate typed text, probably a bad idea setting this usually.
Definition IGUISpinBox.hpp:21
@ EGUI_SBV_LOSE_FOCUS
Validate when the editbox loses the focus.
Definition IGUISpinBox.hpp:27
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64
float f32
32 bit floating point variable.
Definition irrTypes.hpp:110

Nirtcpp    @cppfx.xyz

Utxcpp    utx::print