TGUI  0.8.9
tgui::BaseThemeLoader Class Referenceabstract

Base class for theme loader implementations. More...

#include <TGUI/Loading/ThemeLoader.hpp>

Inheritance diagram for tgui::BaseThemeLoader:
tgui::DefaultThemeLoader

Public Member Functions

virtual ~BaseThemeLoader ()=default
 Virtual destructor.
 
virtual void preload (const std::string &primary)
 Optionally already do some work when only the primary parameter is known yet. More...
 
virtual const std::map< sf::String, sf::String > & load (const std::string &primary, const std::string &secondary)=0
 Loads the property-value pairs from the theme. More...
 
virtual bool canLoad (const std::string &primary, const std::string &secondary)=0
 Check if the requested property-value pairs are available. More...
 

Detailed Description

Base class for theme loader implementations.

Member Function Documentation

◆ canLoad()

virtual bool tgui::BaseThemeLoader::canLoad ( const std::string &  primary,
const std::string &  secondary 
)
pure virtual

Check if the requested property-value pairs are available.

Parameters
primaryPrimary parameter of the loader
secondarySecondary parameter of the loader

For the default loader, the primary parameter is the filename while the secondary parameter is the section name.

Returns
Whether a map op property-value pairs is available

Implemented in tgui::DefaultThemeLoader.

◆ load()

virtual const std::map< sf::String, sf::String > & tgui::BaseThemeLoader::load ( const std::string &  primary,
const std::string &  secondary 
)
pure virtual

Loads the property-value pairs from the theme.

Parameters
primaryPrimary parameter of the loader
secondarySecondary parameter of the loader

For the default loader, the primary parameter is the filename while the secondary parameter is the section name.

Returns
Map op property-value pairs

Implemented in tgui::DefaultThemeLoader.

◆ preload()

virtual void tgui::BaseThemeLoader::preload ( const std::string &  primary)
virtual

Optionally already do some work when only the primary parameter is known yet.

Parameters
primaryPrimary parameter of the loader (filename of the theme file in DefaultThemeLoader)

Reimplemented in tgui::DefaultThemeLoader.


The documentation for this class was generated from the following file: