Public Member Functions | |
SpinButton () | |
Default constructor. More... | |
SpinButton (const SpinButton ©) | |
Copy constructor. More... | |
virtual | ~SpinButton () |
Destructor. More... | |
SpinButton & | operator= (const SpinButton &right) |
Overload of assignment operator. More... | |
virtual bool | load (const std::string &pathname) |
Loads the spin button images. More... | |
virtual void | setSize (float width, float height) |
Changes the size of the spin button. More... | |
virtual Vector2u | getSize () const |
Returns the size of the spin button, unaffected by scaling. More... | |
virtual Vector2f | getScaledSize () const |
Returns the size of the spin button, after the scaling transformation. More... | |
virtual std::string | getLoadedPathname () const |
Returns the pathname that was used to load the spin button. More... | |
virtual void | setMinimum (unsigned int minimum) |
Sets a minimum value. More... | |
virtual void | setMaximum (unsigned int maximum) |
Sets a maximum value. More... | |
virtual void | setValue (unsigned int value) |
Changes the current value. More... | |
virtual unsigned int | getMinimum () const |
Returns the minimum value. More... | |
virtual unsigned int | getMaximum () const |
Returns the maximum value. More... | |
virtual unsigned int | getValue () const |
Returns the current value. More... | |
Public Member Functions inherited from tgui::OBJECT | |
OBJECT () | |
Default constructor. More... | |
OBJECT (const OBJECT ©) | |
Copy constructor. More... | |
virtual | ~OBJECT () |
Destructor. More... | |
OBJECT & | operator= (const OBJECT &right) |
Overload of assignment operator. More... | |
virtual void | show () |
Shows the object. More... | |
virtual void | hide () |
Hides the object. More... | |
virtual bool | isVisible () const |
Returns true when the object is visible. More... | |
virtual void | enable () |
Enables the object. More... | |
virtual void | disable () |
Disables the object. More... | |
virtual bool | isEnabled () const |
Returns true when the object is enabled. More... | |
virtual bool | isDisabled () const |
Returns true when the object is disabled. More... | |
virtual bool | isLoaded () const |
Returns true when the object is loaded successfully. More... | |
void | focus () |
Focus the object. More... | |
void | unfocus () |
Unfocus the object. More... | |
void | focusNextObject () |
Focuses the next object. More... | |
virtual bool | isFocused () const |
Returns true when the object is focused and false otherwise. More... | |
virtual ObjectTypes | getObjectType () const |
Returns the type of the object. More... | |
virtual void | moveToFront () |
Places the object before all other objects. More... | |
virtual void | moveToBack () |
Places the object behind all other objects. More... | |
Public Attributes | |
bool | verticalScroll |
tgui::SpinButton::SpinButton | ( | ) |
Default constructor.
tgui::SpinButton::SpinButton | ( | const SpinButton & | copy | ) |
Copy constructor.
|
virtual |
Destructor.
|
virtual |
Returns the pathname that was used to load the spin button.
When the spin button has not been loaded yet then this function will return an empty string.
|
virtual |
Returns the maximum value.
The default maximum value 10.
|
virtual |
Returns the minimum value.
The default minimum value 0.
|
virtual |
Returns the size of the spin button, after the scaling transformation.
Implements tgui::OBJECT.
|
virtual |
Returns the size of the spin button, unaffected by scaling.
Implements tgui::OBJECT.
|
virtual |
Returns the current value.
|
virtual |
Loads the spin button images.
The verticalScroll member might be changed in this function. If you want to change it then do it afterwards.
pathname | The path to the folder that contains the images. The folder must also contain an info.txt file, which will give more information about the spin button. |
SpinButton& tgui::SpinButton::operator= | ( | const SpinButton & | right | ) |
Overload of assignment operator.
|
virtual |
Sets a maximum value.
When the value is too big then it will be changed to this maximum. The default maximum value is 10.
|
virtual |
Sets a minimum value.
When the value is too small then it will be changed to this minimum. The default minimum value is 0.
|
virtual |
Changes the size of the spin button.
width | The new width of the spin button |
height | The new height of the spin button |
Implements tgui::OBJECT.
|
virtual |
Changes the current value.
It can't be smaller than the minimum or bigger than the maximum.
bool tgui::SpinButton::verticalScroll |
Is the spin button draw vertically (arrows on top of each other)? Set this boolean to false when the spin button should lie horizontal (arrows next to each other).