Class to load widgets from a text file.
More...
#include <TGUI/Loading/WidgetLoader.hpp>
|
static void | load (Container::Ptr parent, std::stringstream &stream) |
| Load a container and its child widgets from a stream containing a widget file. More...
|
|
static void | setLoadFunction (const std::string &type, const LoadFunction &loadFunction) |
| Change the load function for a certain widget type. More...
|
|
static const LoadFunction & | getLoadFunction (const std::string &type) |
| Retrieve the load function of a certain widget type. More...
|
|
Class to load widgets from a text file.
◆ getLoadFunction()
static const LoadFunction & tgui::WidgetLoader::getLoadFunction |
( |
const std::string & |
type | ) |
|
|
static |
Retrieve the load function of a certain widget type.
- Parameters
-
- Returns
- Function called to load the widget
◆ load()
static void tgui::WidgetLoader::load |
( |
Container::Ptr |
parent, |
|
|
std::stringstream & |
stream |
|
) |
| |
|
static |
Load a container and its child widgets from a stream containing a widget file.
- Parameters
-
parent | The parent container for the child widget |
stream | Stream containing the widget file |
- Note
- You should use the loadWidgetsFromFile or loadWidgetsFromSteam functions in Gui and Container instead of calling this function directly.
◆ setLoadFunction()
static void tgui::WidgetLoader::setLoadFunction |
( |
const std::string & |
type, |
|
|
const LoadFunction & |
loadFunction |
|
) |
| |
|
static |
Change the load function for a certain widget type.
- Parameters
-
type | Type of the widget |
loadFunction | New load function |
The documentation for this class was generated from the following file: