16 #define GETTEXT_DOMAIN "wesnoth-lib"
42 LOG_GUI_G <<
"Initializing UI subststem.";
57 read(cfg, *stream, &validator);
60 ERR_GUI_P <<
"Setting: could not read file 'data/gui/_main.cfg'.";
62 ERR_GUI_P <<
"Setting: could not read file 'data/schema/gui.cfg'.";
72 const std::string
id =
g[
"id"];
80 if(!current_theme.empty() &&
id == current_theme) {
87 if(current_theme.empty()) {
90 ERR_GUI_P <<
"Missing [gui] definition for '" << current_theme <<
"'";
A config object defines a single node in a WML file, with access to child nodes.
child_itors child_range(config_key_type key)
static config_cache & instance()
Get reference to the singleton object.
Realization of serialization/validator.hpp abstract validator.
Declarations for File-IO.
static std::string _(const char *str)
Define the common log macros for the gui toolkit.
std::string get_wml_location(const std::string &filename, const std::string ¤t_dir)
Returns a complete path to the actual WML file or directory or an empty string if the file isn't pres...
std::unique_ptr< std::istream > scoped_istream
void update_screen_size_variables()
Update the size of the screen variables in settings.
void init()
Initializes the GUI subsystems.
gui_theme_map_t guis
Map of all known GUIs.
gui_theme_map_t::iterator current_gui
Iterator pointing to the current GUI.
gui_theme_map_t::iterator default_gui
Iterator pointing to the default GUI.
filesystem::scoped_istream preprocess_file(const std::string &fname, preproc_map *defines)
Function to use the WML preprocessor on a file.
std::map< std::string, struct preproc_define > preproc_map
One of the realizations of serialization/validator.hpp abstract validator.
void read(config &cfg, std::istream &in, abstract_validator *validator)
This file contains the settings handling of the widget library.
Used to manage with not initialized validators Supposed to be thrown from the constructor.
Add a special kind of assert to validate whether the input from WML doesn't contain any problems that...
#define VALIDATE(cond, message)
The macro to use for the validation of WML.