26#ifndef TGUI_THEME_LOADER_HPP
27#define TGUI_THEME_LOADER_HPP
30#include <TGUI/Widget.hpp>
49 using PropertyValuePairs = std::map<std::string, std::string>;
70 virtual std::string
load(
const std::string& primary,
const std::string& secondary, PropertyValuePairs& properties) = 0;
100 std::string
load(
const std::string& filename,
const std::string& className, PropertyValuePairs& properties)
override;
123 virtual void readFile(
const std::string& filename, std::stringstream& contents)
const;
128 static std::map<std::string, std::map<std::string, PropertyValuePairs>> m_propertiesCache;
129 static std::map<std::string, std::map<std::string, std::string>> m_widgetTypeCache;
131 friend struct DefaultThemeLoaderTest;
Base class for theme loader implementations.
Definition: ThemeLoader.hpp:46
virtual ~BaseThemeLoader()=default
Virtual destructor.
virtual std::string load(const std::string &primary, const std::string &secondary, PropertyValuePairs &properties)=0
Load the property-value pairs from the theme.
Default implementation for theme loading.
Definition: ThemeLoader.hpp:84
std::string load(const std::string &filename, const std::string &className, PropertyValuePairs &properties) override
Load the property-value pairs from the theme file.
static void flushCache(const std::string &filename="")
Empty the caches and force files to be reloaded.
virtual void readFile(const std::string &filename, std::stringstream &contents) const
Reads and return the contents of the entire file.
Namespace that contains all TGUI functions and classes.
Definition: Animation.hpp:34