Class to save widgets to a text file.
More...
#include <TGUI/Loading/WidgetSaver.hpp>
|
static void | save (Container::Ptr widget, std::stringstream &stream) |
| Save a container and its child widgets to a stream. More...
|
|
static void | setSaveFunction (const std::string &type, const SaveFunction &saveFunction) |
| Change the save function for a certain widget type. More...
|
|
static const SaveFunction & | getSaveFunction (const std::string &type) |
| Retrieve the save function of a certain widget type. More...
|
|
Class to save widgets to a text file.
◆ getSaveFunction()
static const SaveFunction & tgui::WidgetSaver::getSaveFunction |
( |
const std::string & |
type | ) |
|
|
static |
Retrieve the save function of a certain widget type.
- Parameters
-
- Returns
- Function called to save the widget
◆ save()
static void tgui::WidgetSaver::save |
( |
Container::Ptr |
widget, |
|
|
std::stringstream & |
stream |
|
) |
| |
|
static |
Save a container and its child widgets to a stream.
- Parameters
-
widget | The container to save |
stream | Stream to which the widget file will be written to |
- Note
- You should use the saveWidgetsToFile or saveWidgetsToSteam functions in Gui and Container instead of calling this function directly.
◆ setSaveFunction()
static void tgui::WidgetSaver::setSaveFunction |
( |
const std::string & |
type, |
|
|
const SaveFunction & |
saveFunction |
|
) |
| |
|
static |
Change the save function for a certain widget type.
- Parameters
-
type | Type of the widget |
saveFunction | New save function |
The documentation for this class was generated from the following file: