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

Public Member Functions

 LoadingBar ()
 Default constructor. More...
 
 LoadingBar (const LoadingBar &copy)
 Copy constructor. More...
 
virtual ~LoadingBar ()
 Destructor. More...
 
LoadingBaroperator= (const LoadingBar &right)
 Overload of assignment operator. More...
 
virtual bool load (const std::string &pathname)
 Loads the loading bar images. More...
 
virtual void setSize (float width, float height)
 Changes the size of the loading bar. More...
 
virtual Vector2u getSize () const
 Returns the size of the loading bar, unaffected by scaling. More...
 
virtual Vector2f getScaledSize () const
 Returns the size of the loading bar, after the scaling transformation. More...
 
virtual std::string getLoadedPathname () const
 Returns the pathname that was used to load the loading bar. 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...
 
virtual unsigned int incrementValue ()
 Increment the value. More...
 
virtual void setText (const sf::String &text)
 Changes the caption of the loading bar. More...
 
virtual sf::String getText () const
 Returns the caption of the loading bar. More...
 
virtual void setTextFont (const sf::Font &font)
 Changes the font of the text. More...
 
virtual const sf::Font * getTextFont () const
 Returns the font of the text. More...
 
virtual void setTextColor (const sf::Color &color)
 Changes the color of the text. More...
 
virtual const sf::Color & getTextColor () const
 Returns the color of the text. More...
 
virtual void setTextSize (unsigned int size)
 Changes the character size of the text. More...
 
virtual unsigned int getTextSize () const
 Returns the character size of the text. 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...
 

Constructor & Destructor Documentation

tgui::LoadingBar::LoadingBar ( )

Default constructor.

tgui::LoadingBar::LoadingBar ( const LoadingBar copy)

Copy constructor.

virtual tgui::LoadingBar::~LoadingBar ( )
virtual

Destructor.

Member Function Documentation

virtual std::string tgui::LoadingBar::getLoadedPathname ( ) const
virtual

Returns the pathname that was used to load the loading bar.

When the loading bar has not been loaded yet then this function will return an empty string.

virtual unsigned int tgui::LoadingBar::getMaximum ( ) const
virtual

Returns the maximum value.

The default maximum value is 100.

virtual unsigned int tgui::LoadingBar::getMinimum ( ) const
virtual

Returns the minimum value.

The default minimum value is 0.

virtual Vector2f tgui::LoadingBar::getScaledSize ( ) const
virtual

Returns the size of the loading bar, after the scaling transformation.

Implements tgui::OBJECT.

virtual Vector2u tgui::LoadingBar::getSize ( ) const
virtual

Returns the size of the loading bar, unaffected by scaling.

Implements tgui::OBJECT.

virtual sf::String tgui::LoadingBar::getText ( ) const
virtual

Returns the caption of the loading bar.

virtual const sf::Color& tgui::LoadingBar::getTextColor ( ) const
virtual

Returns the color of the text.

virtual const sf::Font* tgui::LoadingBar::getTextFont ( ) const
virtual

Returns the font of the text.

virtual unsigned int tgui::LoadingBar::getTextSize ( ) const
virtual

Returns the character size of the text.

virtual unsigned int tgui::LoadingBar::getValue ( ) const
virtual

Returns the current value.

virtual unsigned int tgui::LoadingBar::incrementValue ( )
virtual

Increment the value.

The value can never exceed the maximum.

Returns
the new value
virtual bool tgui::LoadingBar::load ( const std::string &  pathname)
virtual

Loads the loading bar images.

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 loading bar.
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
LoadingBar& tgui::LoadingBar::operator= ( const LoadingBar right)

Overload of assignment operator.

virtual void tgui::LoadingBar::setMaximum ( unsigned int  maximum)
virtual

Sets a maximum value.

When the value is too big then it will be changed to this maximum. The default maximum value is 100.

virtual void tgui::LoadingBar::setMinimum ( unsigned int  minimum)
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 void tgui::LoadingBar::setSize ( float  width,
float  height 
)
virtual

Changes the size of the loading bar.

Implements tgui::OBJECT.

virtual void tgui::LoadingBar::setText ( const sf::String &  text)
virtual

Changes the caption of the loading bar.

This text will be centered in the loading bar. It could e.g. contain the progress.

virtual void tgui::LoadingBar::setTextColor ( const sf::Color &  color)
virtual

Changes the color of the text.

virtual void tgui::LoadingBar::setTextFont ( const sf::Font &  font)
virtual

Changes the font of the text.

When you don't call this function then the global font will be use. This global font can be changed by changing gloabalFont from the parent.

virtual void tgui::LoadingBar::setTextSize ( unsigned int  size)
virtual

Changes the character size of the text.

If the size is 0 (default) then the text will be scaled to fit inside the loading bar.

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

Changes the current value.

It can't be smaller than the minimum or bigger than the maximum.


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