TGUI  v0.5.2
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Public Member Functions | Public Attributes | List of all members
tgui::Scrollbar Struct Reference
Inheritance diagram for tgui::Scrollbar:
tgui::Slider tgui::OBJECT

Public Member Functions

 Scrollbar ()
 Default constructor. More...
 
 Scrollbar (const Scrollbar &copy)
 Copy constructor. More...
 
virtual ~Scrollbar ()
 Destructor. More...
 
Scrollbaroperator= (const Scrollbar &right)
 Overload of assignment operator. More...
 
virtual bool load (const std::string &pathname)
 Loads the scrollbar images. More...
 
virtual void setMinimum (unsigned int minimum)
 Does nothing. More...
 
virtual void setValue (unsigned int value)
 Changes the current value. More...
 
virtual void setLowValue (unsigned int lowValue)
 Changes the 'low value'. More...
 
virtual unsigned int getLowValue () const
 Returns the low value. More...
 
- Public Member Functions inherited from tgui::Slider
 Slider ()
 Default constructor. More...
 
 Slider (const Slider &copy)
 Copy constructor. More...
 
virtual ~Slider ()
 Destructor. More...
 
Slideroperator= (const Slider &right)
 Overload of assignment operator. More...
 
virtual void setSize (float width, float height)
 Changes the size of the slider. More...
 
virtual Vector2u getSize () const
 Returns the size of the slider, unaffected by scaling. More...
 
virtual Vector2f getScaledSize () const
 Returns the size of the slider, after the scaling transformation. More...
 
virtual std::string getLoadedPathname () const
 Returns the pathname that was used to load the slider. More...
 
virtual void setMaximum (unsigned int maximum)
 Sets a maximum value. More...
 
virtual void setVerticalScroll (bool verticallScroll)
 Changes whether the slider lies vertical or horizontal. 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...
 
virtual bool getVerticalScroll ()
 Returns whether the slider lies vertical or horizontal. More...
 
- Public Member Functions inherited from tgui::OBJECT
 OBJECT ()
 Default constructor. More...
 
 OBJECT (const OBJECT &copy)
 Copy constructor. More...
 
virtual ~OBJECT ()
 Destructor. More...
 
OBJECToperator= (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 autoHide
 When true (default), the scrollbar will not be drawn when the maximum is below the low value. More...
 

Constructor & Destructor Documentation

tgui::Scrollbar::Scrollbar ( )

Default constructor.

tgui::Scrollbar::Scrollbar ( const Scrollbar copy)

Copy constructor.

virtual tgui::Scrollbar::~Scrollbar ( )
virtual

Destructor.

Member Function Documentation

virtual unsigned int tgui::Scrollbar::getLowValue ( ) const
virtual

Returns the low value.

Until the maximum is bigger than this value, no scrollbar will be drawn while autoHide to true.

virtual bool tgui::Scrollbar::load ( const std::string &  pathname)
virtual

Loads the scrollbar images.

The verticalScroll member might be changed in this function. If you want to change it then do it afterwards.

Parameters
pathnameThe path to the folder that contains the images. The folder must also contain an info.txt file, which will give more information about the scrollbar.
Returns
  • true on success
  • false when the pathname is empty
  • false when the info.txt file was not found
  • false when the images couldn't be loaded

Reimplemented from tgui::Slider.

Scrollbar& tgui::Scrollbar::operator= ( const Scrollbar right)

Overload of assignment operator.

virtual void tgui::Scrollbar::setLowValue ( unsigned int  lowValue)
virtual

Changes the 'low value'.

Until the maximum is bigger than this value, no scrollbar will be drawn. You can however choose to always draw the scrollbar by setting autoHide to false. In e.g. a list box, this value is the amount of items that fit inside the list box.

virtual void tgui::Scrollbar::setMinimum ( unsigned int  minimum)
virtual

Does nothing.

This function is overridden from Slider so that the minimum can't be changed. The minimum will always stay 0.

Reimplemented from tgui::Slider.

virtual void tgui::Scrollbar::setValue ( unsigned int  value)
virtual

Changes the current value.

The value has to be smaller than maximum - low value.

Reimplemented from tgui::Slider.

Member Data Documentation

bool tgui::Scrollbar::autoHide

When true (default), the scrollbar will not be drawn when the maximum is below the low value.


The documentation for this struct was generated from the following file: