29#include <TGUI/Loading/ThemeLoader.hpp>
30#include <TGUI/Renderers/WidgetRenderer.hpp>
44 typedef std::shared_ptr<Theme>
Ptr;
190 static std::shared_ptr<Theme> m_defaultTheme;
Wrapper class to store strings.
Definition String.hpp:79
This class can be used to manage the widget renderers.
Definition Theme.hpp:41
static std::shared_ptr< BaseThemeLoader > m_themeLoader
Theme loader which will do the actual loading.
Definition Theme.hpp:191
static std::shared_ptr< Theme > getDefault()
Returns a pointer to the theme class that widgets use by default.
std::map< String, std::shared_ptr< RendererData > > m_renderers
Maps ids to renderer datas.
Definition Theme.hpp:192
void load(const String &primary)
Changes the primary theme loader parameter.
std::shared_ptr< RendererData > getRenderer(const String &id)
Gets data for the renderers.
std::shared_ptr< Theme > Ptr
Shared widget pointer.
Definition Theme.hpp:44
static void setDefault(const String &primary="")
Sets the theme class that widgets use by default.
void addRenderer(const String &id, std::shared_ptr< RendererData > renderer)
Manually adds a renderer data to the theme.
static void setThemeLoader(std::shared_ptr< BaseThemeLoader > themeLoader)
Changes the function that will load the widget theme data.
static std::shared_ptr< BaseThemeLoader > getThemeLoader()
Returns the function that is currently being used to load the widget theme data.
const String & getPrimary() const
Returns the primary theme loader parameter.
static Theme::Ptr create(const String &primary="")
Constructs a new theme, with an optional theme file to load.
static void setDefault(std::shared_ptr< Theme > theme)
Sets the theme class that widgets use by default.
std::shared_ptr< RendererData > getRendererNoThrow(const String &id)
Gets data for the renderers.
bool removeRenderer(const String &id)
Manually removes a renderer to the theme.
static void setDefault(std::nullptr_t)
Resets the theme that widgets use by default.
Theme(const String &primary="")
Constructs the theme class, with an optional theme file to load.
std::shared_ptr< const Theme > ConstPtr
Shared constant widget pointer.
Definition Theme.hpp:45
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:36