15 #define GETTEXT_DOMAIN "wesnoth-lib"
19 #include "../../image.hpp"
29 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
30 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
39 tpoint timage::calculate_best_size()
const
45 return get_config_default_size();
48 const tpoint minimum = get_config_default_size();
49 const tpoint maximum = get_config_maximum_size();
53 if(minimum.
x > 0 && result.
x < minimum.
x) {
56 }
else if(maximum.
x > 0 && result.
x > maximum.
x) {
61 if(minimum.
y > 0 && result.
y < minimum.
y) {
64 }
else if(maximum.
y > 0 && result.
y > maximum.
y) {
73 void timage::set_active(
const bool )
78 bool timage::get_active()
const
83 unsigned timage::get_state()
const
88 bool timage::disable_click_dismiss()
const
104 DBG_GUI_P <<
"Parsing image " <<
id <<
'\n';
106 load_resolutions<tresolution>(cfg);
171 timage* widget =
new timage();
175 DBG_GUI_G <<
"Window builder: placed image '" <<
id <<
"' with definition '"
Define the common log macros for the gui toolkit.
surface get_image(const image::locator &i_locator, TYPE type)
function to get the surface corresponding to an image.
GLuint GLuint GLsizei GLenum type
GLenum GLsizei GLenum GLenum const GLvoid * image
tresolution(const config &cfg)
Base class of a resolution, contains the common keys for a resolution.
A class inherited from ttext_box that displays its input as stars.
void init_control(tcontrol *control) const
std::string definition
Parameters for the control.
timage_definition(const config &cfg)
Contains the state info for a resolution.
std::vector< tstate_definition > state
config & child(const std::string &key, int n=0)
Returns the nth child with the given key, or a reference to an invalid config if there is none...
this module manages the cache of images.
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string
Contains the implementation details for lexical_cast and shouldn't be used directly.