16 #define GETTEXT_DOMAIN "wesnoth-lib"
28 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
29 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
47 if(image_size.x == 0 || image_size.y == 0) {
55 point result {image_size.x, image_size.y};
57 if(minimum.x > 0 && result.x < minimum.x) {
60 }
else if(maximum.x > 0 && result.x > maximum.x) {
65 if(minimum.y > 0 && result.y < minimum.y) {
68 }
else if(maximum.y > 0 && result.y > maximum.y) {
104 load_resolutions<resolution>(cfg);
125 auto widget = std::make_unique<image>(*
this);
127 DBG_GUI_G <<
"Window builder: placed image '" <<
id <<
"' with definition '"
A config object defines a single node in a WML file, with access to child nodes.
virtual void set_active(const bool active) override
See styled_widget::set_active.
virtual bool get_active() const override
See styled_widget::get_active.
virtual point calculate_best_size() const override
See widget::calculate_best_size.
bool disable_click_dismiss() const override
See widget::disable_click_dismiss.
virtual unsigned get_state() const override
See styled_widget::get_state.
Generic locator abstracting the location of an image.
Define the common log macros for the gui toolkit.
Functions to load and save images from/to disk.
point get_size(const locator &i_locator, bool skip_cache)
Returns the width and height of an image.
Contains the implementation details for lexical_cast and shouldn't be used directly.
resolution(const config &cfg)
image_definition(const config &cfg)
virtual std::unique_ptr< widget > build() const override
std::vector< state_definition > state
std::string missing_mandatory_wml_tag(const std::string §ion, const std::string &tag)
Returns a standard message for a missing wml child (tag).
Add a special kind of assert to validate whether the input from WML doesn't contain any problems that...
#define VALIDATE_WML_CHILD(cfg, key, message)