Represents a GUI widgets container.
More...
#include <abstract_top_level_container.hpp>
|
virtual int | getWidth ()=0 |
|
virtual int | getHeight ()=0 |
|
Widget * | getWidget (const char *name) |
| This function returns a widget by name if that widget is found.
|
|
Widget * | getWidget (const int id) |
| This function returns a widget by irrlicht ID if that widget is found.
|
|
template<typename T > |
T * | getWidget (const char *name) |
| This function searches and returns a widget by name, cast as specified type, if that widget is found and the type is correct.
|
|
Widget * | getFirstWidget (PtrVector< Widget > *within_vector=NULL) |
| This function returns the first widget found in within_vector.
|
|
Widget * | getLastWidget (PtrVector< Widget > *within_vector=NULL) |
| This function returns the last widget found in within_vector.
|
|
void | elementsWereDeleted (PtrVector< Widget > *within_vector=NULL) |
| This function is called when screen is removed.
|
|
bool | isMyChild (Widget *widget) const |
| This function checks if a widget is a child of the container.
|
|
virtual bool | enableScreenPadding () const |
|
|
static Widget * | getWidget (const char *name, PtrVector< Widget > *within_vector) |
| This function returns a widget by name if that widget is found in within_vector.
|
|
static Widget * | getWidget (const int id, PtrVector< Widget > *within_vector) |
| This function returns a widget by irrlicht ID if that widget is found.
|
|
Represents a GUI widgets container.
Abstract base class for both Screen and ModalDialog.
◆ addWidgetsRecursively()
void AbstractTopLevelContainer::addWidgetsRecursively |
( |
PtrVector< Widget > & |
widgets, |
|
|
Widget * |
parent = NULL |
|
) |
| |
|
protected |
This function adds a list of widgets recursively, effectively creating the hierarchy of widgets.
- Parameters
-
widgets | The vector of widgets to add |
parent | The parent widget of the vector of widgets |
◆ elementsWereDeleted()
void AbstractTopLevelContainer::elementsWereDeleted |
( |
PtrVector< Widget > * |
within_vector = NULL | ) |
|
This function is called when screen is removed.
This means all irrlicht widgets this object has pointers to are now gone. All references are set to NULL to avoid problems.
- Parameters
-
within_vector | The vector of widgets to clear |
◆ getFirstWidget()
This function returns the first widget found in within_vector.
- Parameters
-
within_vector | The vector to look into |
- Returns
- The result of the search, or NULL if the object is not found
◆ getHeight()
virtual int GUIEngine::AbstractTopLevelContainer::getHeight |
( |
| ) |
|
|
pure virtual |
◆ getLastWidget()
This function returns the last widget found in within_vector.
- Parameters
-
within_vector | The vector to look into |
- Returns
- The result of the search, or NULL if the object is not found
◆ getWidget() [1/5]
Widget * AbstractTopLevelContainer::getWidget |
( |
const char * |
name | ) |
|
This function returns a widget by name if that widget is found.
- Returns
- an object by name, or NULL if not found
- Parameters
-
name | The name of the widget to find |
- Returns
- The result of the search, or NULL if the object is not found
◆ getWidget() [2/5]
template<typename T >
T * GUIEngine::AbstractTopLevelContainer::getWidget |
( |
const char * |
name | ) |
|
|
inline |
This function searches and returns a widget by name, cast as specified type, if that widget is found and the type is correct.
- Parameters
-
name | The name of the widget to find |
- Returns
- an object by name, casted to specified type, or NULL if not found/wrong type
◆ getWidget() [3/5]
This function returns a widget by name if that widget is found in within_vector.
- Parameters
-
name | The name of the widget to find |
within_vector | The vector of widgets to look in |
- Returns
- The result of the search, or NULL if the object is not found
◆ getWidget() [4/5]
Widget * AbstractTopLevelContainer::getWidget |
( |
const int |
id | ) |
|
This function returns a widget by irrlicht ID if that widget is found.
- Returns
- an object by irrlicht ID, or NULL if not found
- Parameters
-
id | The irrlicht ID of the widget to find |
- Returns
- The result of the search, or NULL if the object is not found
◆ getWidget() [5/5]
This function returns a widget by irrlicht ID if that widget is found.
- Parameters
-
id | The irrlicht ID of the widget to find |
within_vector | The vector to look into |
- Returns
- The result of the search, or NULL if the object is not found
◆ getWidth()
virtual int GUIEngine::AbstractTopLevelContainer::getWidth |
( |
| ) |
|
|
pure virtual |
◆ isMyChild()
bool AbstractTopLevelContainer::isMyChild |
( |
Widget * |
widget | ) |
const |
This function checks if a widget is a child of the container.
- Parameters
-
widget | The widget that needs to be checked if it is a child |
- Returns
- True if the widget is a child, false otherwise
◆ m_first_widget
Widget* GUIEngine::AbstractTopLevelContainer::m_first_widget |
|
protected |
AbstractTopLevelContainer is generally able to determine its first widget just fine, but in highly complex screens (e.g.
multiplayer kart selection) you can help it by providing the first widget manually.
◆ m_last_widget
Widget* GUIEngine::AbstractTopLevelContainer::m_last_widget |
|
protected |
AbstractTopLevelContainer is generally able to determine its last widget just fine, but in highly complex screens (e.g.
multiplayer kart selection) you can help it by providing the first widget manually.
The documentation for this class was generated from the following files: