Irrlicht 3D Engine
IGUISpinBox.h
Go to the documentation of this file.
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 irrlicht.h
4 
5 #ifndef __I_GUI_SPIN_BOX_H_INCLUDED__
6 #define __I_GUI_SPIN_BOX_H_INCLUDED__
7 
8 #include "IGUIElement.h"
9 
10 namespace irr
11 {
12 namespace gui
13 {
14  class IGUIEditBox;
15 
19  {
28  };
29 
30 
32 
35  class IGUISpinBox : public IGUIElement
36  {
37  public:
38 
40  IGUISpinBox(IGUIEnvironment* environment, IGUIElement* parent,
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 
57  virtual void setRange(f32 min, f32 max) = 0;
58 
60  virtual f32 getMin() const = 0;
61 
63  virtual f32 getMax() const = 0;
64 
66 
68  virtual void setStepSize(f32 step=1.f) = 0;
69 
72 
73  virtual void setDecimalPlaces(s32 places) = 0;
74 
76  virtual f32 getStepSize() const = 0;
77 
79 
80  virtual void setValidateOn(u32 validateOn) = 0;
81 
83 
84  virtual u32 getValidateOn() const = 0;
85  };
86 
87 
88 } // end namespace gui
89 } // end namespace irr
90 
91 #endif // __I_GUI_SPIN_BOX_H_INCLUDED__
92 
virtual f32 getStepSize() const =0
get the current step size
Does not validate typed text, probably a bad idea setting this usually.
Definition: IGUISpinBox.h:21
Single line edit box + spin buttons.
Definition: IGUISpinBox.h:35
float f32
32 bit floating point variable.
Definition: irrTypes.h:108
Validate when enter was pressed.
Definition: IGUISpinBox.h:25
virtual void setRange(f32 min, f32 max)=0
set the range of values which can be used in the spinbox
Everything in the Irrlicht Engine can be found in this namespace.
Definition: aabbox3d.h:12
virtual IGUIEditBox * getEditBox() const =0
Access the edit box used in the spin control.
Validate on each change. Was default up to Irrlicht 1.8.
Definition: IGUISpinBox.h:23
GUI Environment. Used as factory and manager of all other GUI elements.
A spin box (IGUISpinBox)
IGUISpinBox(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
constructor
Definition: IGUISpinBox.h:40
signed int s32
32 bit signed variable.
Definition: irrTypes.h:70
virtual u32 getValidateOn() const =0
Gets when the spinbox has to validate entered text.
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:62
Base class of all GUI elements.
Definition: IGUIElement.h:23
virtual void setStepSize(f32 step=1.f)=0
Step size by which values are changed when pressing the spinbuttons.
Validate when the editbox loses the focus.
Definition: IGUISpinBox.h:27
virtual void setValue(f32 val)=0
set the current value of the spinbox
virtual void setDecimalPlaces(s32 places)=0
Single line edit box for editing simple text.
Definition: IGUIEditBox.h:23
virtual void setValidateOn(u32 validateOn)=0
Sets when the spinbox has to validate entered text.
EGUI_SPINBOX_VALIDATION
Definition: IGUISpinBox.h:18
virtual f32 getValue() const =0
Get the current value of the spinbox.
virtual f32 getMin() const =0
get the minimum value which can be used in the spinbox
virtual f32 getMax() const =0
get the maximum value which can be used in the spinbox