The parent struct for every object. More...
#include <Objects.hpp>
Public Member Functions | |
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 | 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... | |
The parent struct for every object.
tgui::OBJECT::OBJECT | ( | ) |
Default constructor.
tgui::OBJECT::OBJECT | ( | const OBJECT & | copy | ) |
Copy constructor.
|
virtual |
Destructor.
|
virtual |
Disables the object.
The object will no longer receive events and it will thus no longer send callbacks.
|
virtual |
Enables the object.
The object will receive events and send callbacks again.
void tgui::OBJECT::focus | ( | ) |
void tgui::OBJECT::focusNextObject | ( | ) |
|
virtual |
Returns the type of the object.
|
pure virtual |
Returns the size of the object, after the scaling transformation.
Implemented in tgui::EditBox, tgui::Grid, tgui::Tab, tgui::ChatBox, tgui::TextBox, tgui::ComboBox, tgui::ListBox, tgui::AnimatedButton, tgui::AnimatedPicture, tgui::Button, tgui::Checkbox, tgui::Slider2D, tgui::Slider, tgui::LoadingBar, tgui::SpinButton, tgui::Panel, tgui::Picture, tgui::Label, and tgui::SpriteSheet.
|
pure virtual |
Returns the size of the object, unaffected by scaling.
Implemented in tgui::EditBox, tgui::Grid, tgui::Tab, tgui::ChatBox, tgui::TextBox, tgui::ComboBox, tgui::ListBox, tgui::AnimatedButton, tgui::AnimatedPicture, tgui::Button, tgui::Checkbox, tgui::Slider2D, tgui::Slider, tgui::LoadingBar, tgui::SpinButton, tgui::Panel, tgui::Picture, tgui::Label, and tgui::SpriteSheet.
|
virtual |
Hides the object.
The object won't receive events nor will it be drawn when hidden. The object is visible by default.
|
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 |
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 |
Returns true when the object is focused and false otherwise.
|
virtual |
Returns true when the object is loaded successfully.
When an object is not loaded correctly then it will not be drawn.
|
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 |
Places the object behind all other objects.
|
virtual |
Places the object before all other objects.
|
pure virtual |
Changes the size of an object.
Implemented in tgui::EditBox, tgui::Grid, tgui::Tab, tgui::ChatBox, tgui::TextBox, tgui::ComboBox, tgui::ListBox, tgui::AnimatedButton, tgui::AnimatedPicture, tgui::Button, tgui::Checkbox, tgui::Slider2D, tgui::Slider, tgui::LoadingBar, tgui::SpinButton, tgui::Panel, tgui::Picture, tgui::Label, and tgui::SpriteSheet.
|
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.