#include "theme.hpp"#include "desktop/battery_info.hpp"#include "gettext.hpp"#include "hotkey/hotkey_command.hpp"#include "hotkey/hotkey_item.hpp"#include "log.hpp"#include "sdl/rect.hpp"#include "serialization/string_utils.hpp"#include "utils/charconv.hpp"#include "wml_exception.hpp"#include "game_config_view.hpp"#include <sstream>#include <utility>Go to the source code of this file.
Macros | |
| #define | DBG_DP LOG_STREAM(debug, log_display) |
| #define | LOG_DP LOG_STREAM(info, log_display) |
| #define | ERR_DP LOG_STREAM(err, log_display) |
Functions | |
| static int | parse_signed_string (std::string_view expr) |
| static std::size_t | compute (std::string expr, std::size_t ref1, std::size_t ref2=0) |
| static _rect | read_rect (const config &cfg) |
| static rect | read_sdl_rect (const config &cfg) |
| static std::string | resolve_rect (const std::string &rect_str) |
| static config & | find_ref (const std::string &id, config &cfg, bool remove=false) |
| static config | get_resolution (const config &resolutions, const std::string &id) |
| Returns a copy of the wanted resolution. More... | |
| static config | expand_partialresolution (const config &theme) |
| Returns a config with all partial resolutions of a theme expanded. More... | |
| static void | do_resolve_rects (const config &cfg, config &resolved_config, config *resol_cfg=nullptr) |
Variables | |
| static lg::log_domain | log_display ("display") |
| #define DBG_DP LOG_STREAM(debug, log_display) |
| #define ERR_DP LOG_STREAM(err, log_display) |
| #define LOG_DP LOG_STREAM(info, log_display) |
|
static |
Definition at line 60 of file theme.cpp.
References parse_signed_string().
Referenced by theme::object::modify_location(), and resolve_rect().
|
static |
Definition at line 256 of file theme.cpp.
References config::add_child(), config::all_children_view(), cfg, ERR_DP, find_ref(), config::merge_attributes(), read_rect(), and resolve_rect().
Referenced by theme::theme().
Returns a config with all partial resolutions of a theme expanded.
| theme | The original object, whose objects need to be expanded. |
Definition at line 216 of file theme.cpp.
References config::add_child(), cfg, find_ref(), get_resolution(), config::merge_attributes(), missing_mandatory_wml_key(), gui2::dialogs::tip::remove(), and VALIDATE.
Referenced by theme::theme().
Definition at line 137 of file theme.cpp.
References config::all_children_range(), c, cfg, config::erase(), i, and gui2::dialogs::tip::remove().
Referenced by do_resolve_rects(), expand_partialresolution(), and theme::refresh_title2().
Returns a copy of the wanted resolution.
The function returns a copy since our caller uses a copy of this resolution as base to expand a partial resolution.
| resolutions | A config object containing the expanded resolutions. |
| id | The id of the resolution to return. |
| config::error | If the id is not found. |
Definition at line 195 of file theme.cpp.
References config::child_range().
Referenced by expand_partialresolution().
|
static |
Definition at line 46 of file theme.cpp.
Referenced by compute(), and read_rect().
Definition at line 74 of file theme.cpp.
References cfg, parse_signed_string(), draw::rect(), and utils::split().
Referenced by do_resolve_rects(), and read_sdl_rect().
Definition at line 97 of file theme.cpp.
References cfg, and read_rect().
|
static |
Definition at line 109 of file theme.cpp.
References compute(), draw::rect(), and utils::split().
Referenced by do_resolve_rects().
|
static |