16 #define GETTEXT_DOMAIN "wesnoth-lib" 30 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__ 31 #define LOG_HEADER LOG_SCOPE_HEADER + ':' 57 point result {image->w, image->h};
59 if(minimum.
x > 0 && result.x < minimum.
x) {
62 }
else if(maximum.
x > 0 && result.x > maximum.
x) {
67 if(minimum.
y > 0 && result.y < minimum.
y) {
70 }
else if(maximum.
y > 0 && result.y > maximum.
y) {
104 DBG_GUI_P <<
"Parsing image " <<
id <<
'\n';
106 load_resolutions<resolution>(cfg);
113 state.emplace_back(cfg.
child(
"state_enabled"));
127 auto widget = std::make_unique<image>(*this);
129 DBG_GUI_G <<
"Window builder: placed image '" <<
id <<
"' with definition '" Define the common log macros for the gui toolkit.
Base class of a resolution, contains the common keys for a resolution.
config & child(config_key_type key, int n=0)
Returns the nth child with the given key, or a reference to an invalid config if there is none...
std::vector< state_definition > state
t_string get_image() const
Wrapper for label.
virtual void set_active(const bool active) override
See styled_widget::set_active.
virtual unsigned get_state() const override
See styled_widget::get_state.
This file contains the settings handling of the widget library.
Generic locator abstracting the location of an image.
image_definition(const config &cfg)
resolution(const config &cfg)
virtual bool get_active() const override
See styled_widget::get_active.
virtual std::unique_ptr< widget > build() const override
Functions to load and save images from/to disk.
virtual point calculate_best_size() const override
See widget::calculate_best_size.
image(const implementation::builder_image &builder)
A config object defines a single node in a WML file, with access to child nodes.
Contains the implementation details for lexical_cast and shouldn't be used directly.
bool disable_click_dismiss() const override
See widget::disable_click_dismiss.