TGUI  v0.5.2
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Public Member Functions | List of all members
tgui::OBJECT Struct Referenceabstract

The parent struct for every object. More...

#include <Objects.hpp>

Inheritance diagram for tgui::OBJECT:
tgui::AnimatedButton tgui::AnimatedPicture tgui::Button tgui::ChatBox tgui::Checkbox tgui::ComboBox tgui::EditBox tgui::GroupObject tgui::Label tgui::ListBox tgui::LoadingBar tgui::Picture tgui::Slider tgui::Slider2D tgui::SpinButton tgui::Tab tgui::TextBox

Public Member Functions

 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 setSize (float width, float height)=0
 Changes the size of an object. More...
 
virtual Vector2u getSize () const =0
 Returns the size of the object, unaffected by scaling. More...
 
virtual Vector2f getScaledSize () const =0
 Returns the size of the object, after the scaling transformation. 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...
 

Detailed Description

The parent struct for every object.

Constructor & Destructor Documentation

tgui::OBJECT::OBJECT ( )

Default constructor.

tgui::OBJECT::OBJECT ( const OBJECT copy)

Copy constructor.

virtual tgui::OBJECT::~OBJECT ( )
virtual

Destructor.

Member Function Documentation

virtual void tgui::OBJECT::disable ( )
virtual

Disables the object.

The object will no longer receive events and it will thus no longer send callbacks.

virtual void tgui::OBJECT::enable ( )
virtual

Enables the object.

The object will receive events and send callbacks again.

void tgui::OBJECT::focus ( )

Focus the object.

The previously focused object will be unfocused.

See Also
unfocus
focusNextObject
void tgui::OBJECT::focusNextObject ( )

Focuses the next object.

Similar to unfocus, but another object will gain the focus.

See Also
focus
unfocus
virtual ObjectTypes tgui::OBJECT::getObjectType ( ) const
virtual

Returns the type of the object.

virtual Vector2f tgui::OBJECT::getScaledSize ( ) const
pure virtual
virtual Vector2u tgui::OBJECT::getSize ( ) const
pure virtual
virtual void tgui::OBJECT::hide ( )
virtual

Hides the object.

The object won't receive events nor will it be drawn when hidden. The object is visible by default.

virtual bool tgui::OBJECT::isDisabled ( ) const
virtual

Returns true when the object is disabled.

This means that the object will longer receive events and it will thus no longer send callbacks.

virtual bool tgui::OBJECT::isEnabled ( ) const
virtual

Returns true when the object is enabled.

If this function returns false then the object is disabled and will longer receive events and it will thus no longer send callbacks. All objects are enabled by default.

virtual bool tgui::OBJECT::isFocused ( ) const
virtual

Returns true when the object is focused and false otherwise.

virtual bool tgui::OBJECT::isLoaded ( ) const
virtual

Returns true when the object is loaded successfully.

When an object is not loaded correctly then it will not be drawn.

virtual bool tgui::OBJECT::isVisible ( ) const
virtual

Returns true when the object is visible.

If this function returns false then the object is hidden, which means that it won't receive events and it won't be drawn. All objects are visible by default.

virtual void tgui::OBJECT::moveToBack ( )
virtual

Places the object behind all other objects.

virtual void tgui::OBJECT::moveToFront ( )
virtual

Places the object before all other objects.

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

Overload of assignment operator.

virtual void tgui::OBJECT::setSize ( float  width,
float  height 
)
pure virtual
virtual void tgui::OBJECT::show ( )
virtual

Shows the object.

The object won't receive events nor will it be drawn when hidden. The object is visible by default.

void tgui::OBJECT::unfocus ( )

Unfocus the object.

See Also
focus
focusNextObject

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