Parent struct for objects that store multiple objects. More...
#include <Group.hpp>
Public Member Functions | |
| Group () | |
| Default constructor. More... | |
| Group (const Group ©) | |
| Copy constructor. More... | |
| virtual | ~Group () |
| Destructor. More... | |
| Group & | operator= (const Group &right) |
| Overload of assignment operator. More... | |
| template<typename T > | |
| T * | add (const sf::String &objectName="") |
| Creates and adds an object to the group. More... | |
| template<typename T > | |
| T * | get (const sf::String &objectName) const |
| Returns a pointer to an earlier created object. More... | |
| template<typename T > | |
| T * | copy (T *oldObject, const sf::String &newObjectName="") |
| Makes a copy of any existing object and returns the pointer to the new object. More... | |
| template<typename T > | |
| T * | copy (const sf::String &oldObjectName, const sf::String &newObjectName="") |
| Makes a copy of any existing object and returns the pointer to the new object. More... | |
| virtual bool | loadObjectsFromFile (const std::string &filename) |
| Loads a form from a file. More... | |
| virtual std::vector< OBJECT * > & | getObjects () |
| Returns a list of all the objects. More... | |
| virtual std::vector< sf::String > & | getObjectNames () |
| Returns a list of the names of all the objects. More... | |
| virtual void | remove (const sf::String &objectName) |
| Removes a single object that was added to the group. More... | |
| virtual void | remove (OBJECT *object) |
| Removes a single object that was added to the group. More... | |
| virtual void | removeAllObjects () |
| Removes all objects that were added to the group. More... | |
| virtual void | focusObject (OBJECT *const object) |
| Focuses an object. More... | |
| virtual void | unfocusObject (OBJECT *const object) |
| Unfocuses an object. More... | |
| virtual void | unfocusAllObjects () |
| Unfocuses all the objects. More... | |
| virtual void | uncheckRadioButtons () |
| Uncheck all the radio buttons. More... | |
| virtual void | addCallback (const Callback &callback)=0 |
| Adds a callback to the list in tgui::Window. More... | |
| virtual void | updateTime (const sf::Time &elapsedTime) |
| Update the internal clock to make animation possible. More... | |
| virtual void | moveObjectToFront (OBJECT *object) |
| Places an object before all other objects. More... | |
| virtual void | moveObjectToBack (OBJECT *object) |
| Places an object behind all other objects. More... | |
Public Attributes | |
| sf::Font | globalFont |
| The internal font, used by all objects by default. If not changed then this is the default SFML font. More... | |
Parent struct for objects that store multiple objects.
| tgui::Group::Group | ( | ) |
Default constructor.
| tgui::Group::Group | ( | const Group & | copy | ) |
Copy constructor.
|
virtual |
Destructor.
|
inline |
Creates and adds an object to the group.
| objectName | If you want to access the object later then you must do this with this name. |
Usage example:
|
pure virtual |
Adds a callback to the list in tgui::Window.
This callback can be obtained by calling the getCallback function of the window.
Implemented in tgui::Grid, tgui::Panel, tgui::Window, and tgui::Form.
|
inline |
Makes a copy of any existing object and returns the pointer to the new object.
| oldObject | A pointer to the old object. |
| newObjectName | If you want to access the object later then you must do this with this name. |
Usage example:
|
inline |
Makes a copy of any existing object and returns the pointer to the new object.
| oldObjectName | The name that was given to the object when it was added to the group. |
| newObjectName | If you want to access the copied object later then you must do this with this name. |
Usage example:
|
virtual |
Focuses an object.
The previously focused object will be unfocused.
| object | The object that has to be focused. |
|
inline |
Returns a pointer to an earlier created object.
| objectName | The name that was given to the object when it was added to the group. |
Usage example:
|
virtual |
Returns a list of the names of all the objects.
|
virtual |
Returns a list of all the objects.
|
virtual |
Loads a form from a file.
The objects will be loaded and added to the group. Note that even when this function fails, some objects might have been loaded already.
|
virtual |
Places an object behind all other objects.
|
virtual |
Places an object before all other objects.
|
virtual |
Removes a single object that was added to the group.
If there are multiple objects with the same name then only the first matching object will be removed.
|
virtual |
Removes a single object that was added to the group.
Reimplemented in tgui::Grid.
|
virtual |
Removes all objects that were added to the group.
Reimplemented in tgui::Grid.
|
virtual |
Uncheck all the radio buttons.
|
virtual |
Unfocuses all the objects.
|
virtual |
Unfocuses an object.
The next object will be focused.
| object | The object that has to be unfocused. |
|
virtual |
Update the internal clock to make animation possible.
| sf::Font tgui::Group::globalFont |
The internal font, used by all objects by default. If not changed then this is the default SFML font.
1.8.5