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

Public Member Functions

 Picture ()
 Default constructor. More...
 
 Picture (const Picture &copy)
 Copy constructor. More...
 
virtual ~Picture ()
 Destructor. More...
 
Pictureoperator= (const Picture &right)
 Overload of assignment operator. More...
 
virtual bool load (const std::string &filename)
 Load an image from a file. More...
 
virtual void setSize (float width, float height)
 Changes the size of the picture. More...
 
virtual Vector2u getSize () const
 Returns the size of the picture, unaffected by scaling. More...
 
virtual Vector2f getScaledSize () const
 Returns the size of the picture, after the scaling transformation. More...
 
virtual std::string getLoadedFilename () const
 Returns the filename that was used to load the picture. 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::Picture::Picture ( )

Default constructor.

tgui::Picture::Picture ( const Picture copy)

Copy constructor.

virtual tgui::Picture::~Picture ( )
virtual

Destructor.

Member Function Documentation

virtual std::string tgui::Picture::getLoadedFilename ( ) const
virtual

Returns the filename that was used to load the picture.

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

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

Returns the size of the picture, after the scaling transformation.

Implements tgui::OBJECT.

Reimplemented in tgui::SpriteSheet.

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

Returns the size of the picture, unaffected by scaling.

Implements tgui::OBJECT.

Reimplemented in tgui::SpriteSheet.

virtual bool tgui::Picture::load ( const std::string &  filename)
virtual

Load an image from a file.

Parameters
filenameThe absolute or relative filename of the picture that should be loaded.
Returns
  • true on success
  • false when the filename was empty
  • false when the image couldn't be loaded (probalby not found)
Picture& tgui::Picture::operator= ( const Picture right)

Overload of assignment operator.

virtual void tgui::Picture::setSize ( float  width,
float  height 
)
virtual

Changes the size of the picture.

Parameters
widthThe new width of the picture
heightThe new height of the picture

Implements tgui::OBJECT.

Reimplemented in tgui::SpriteSheet.


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