Base class for the Theme classes.
More...
#include <TGUI/Loading/Theme.hpp>
|
virtual | ~BaseTheme ()=default |
| Virtual destructor.
|
|
virtual void | widgetAttached (Widget *widget) |
| Virtual function that gets called when a widget is connected to this theme. More...
|
|
virtual void | widgetDetached (Widget *widget) |
| Virtual function that gets called when a widget is disconnected from this theme. More...
|
|
virtual WidgetConverter | internalLoad (const std::string &primary, const std::string &secondary)=0 |
| This function can be used inside a widget to load other widgets without access to the derived theme class. More...
|
|
virtual void | initWidget (Widget *widget, std::string primary, std::string secondary)=0 |
| Virtual function called by the widget to finish its initialization. More...
|
|
|
static std::map< std::string, std::function< Widget::Ptr()> > | m_constructors |
| Widget creator functions.
|
|
static std::shared_ptr< BaseThemeLoader > | m_themeLoader |
| Theme loading functions, they read the theme file.
|
|
Base class for the Theme classes.
◆ initWidget()
virtual void tgui::BaseTheme::initWidget |
( |
Widget * |
widget, |
|
|
std::string |
primary, |
|
|
std::string |
secondary |
|
) |
| |
|
pure virtual |
Virtual function called by the widget to finish its initialization.
- Parameters
-
widget | The widget that needs to be initialized |
primary | Primary parameter of the loader |
secondary | Secondary parameter of the loader |
Implemented in tgui::Theme.
◆ internalLoad()
virtual WidgetConverter tgui::BaseTheme::internalLoad |
( |
const std::string & |
primary, |
|
|
const std::string & |
secondary |
|
) |
| |
|
pure virtual |
This function can be used inside a widget to load other widgets without access to the derived theme class.
- Parameters
-
primary | Primary parameter of the loader |
secondary | Secondary parameter of the loader |
Implemented in tgui::Theme.
◆ setConstructFunction()
static void tgui::BaseTheme::setConstructFunction |
( |
const std::string & |
type, |
|
|
const std::function< Widget::Ptr()> & |
constructor |
|
) |
| |
|
static |
Changes the construct function of a specific widget type.
- Parameters
-
type | Type of the widget which will cause this construct function to be used |
constructor | New function to be called when this type of widget is being loaded |
◆ setThemeLoader()
static void tgui::BaseTheme::setThemeLoader |
( |
const std::shared_ptr< BaseThemeLoader > & |
themeLoader | ) |
|
|
static |
Change the function that will load the widget theme data.
- Parameters
-
themeLoader | Pointer to the new loader |
◆ widgetAttached()
virtual void tgui::BaseTheme::widgetAttached |
( |
Widget * |
widget | ) |
|
|
virtual |
Virtual function that gets called when a widget is connected to this theme.
- Parameters
-
widget | The widget that was attached to this theme |
◆ widgetDetached()
virtual void tgui::BaseTheme::widgetDetached |
( |
Widget * |
widget | ) |
|
|
virtual |
Virtual function that gets called when a widget is disconnected from this theme.
- Parameters
-
widget | The widget that was detached from this theme |
Reimplemented in tgui::Theme.
The documentation for this class was generated from the following file: