16 #define GETTEXT_DOMAIN "wesnoth-lib"
39 const auto conf = cast_config_to<horizontal_scrollbar_definition>();
42 return conf->minimum_positioner_length;
47 const auto conf = cast_config_to<horizontal_scrollbar_definition>();
50 return conf->maximum_positioner_length;
55 const auto conf = cast_config_to<horizontal_scrollbar_definition>();
58 return conf->left_offset;
63 const auto conf = cast_config_to<horizontal_scrollbar_definition>();
66 return conf->right_offset;
110 DBG_GUI_P <<
"Parsing horizontal scrollbar " <<
id;
112 load_resolutions<resolution>(cfg);
117 , minimum_positioner_length(cfg[
"minimum_positioner_length"].to_unsigned())
118 , maximum_positioner_length(cfg[
"maximum_positioner_length"].to_unsigned())
119 , left_offset(cfg[
"left_offset"].to_unsigned())
120 , right_offset(cfg[
"right_offset"].to_unsigned())
124 "minimum_positioner_length"));
138 builder_horizontal_scrollbar::builder_horizontal_scrollbar(
const config& cfg)
145 auto widget = std::make_unique<horizontal_scrollbar>(*
this);
150 <<
" placed horizontal scrollbar '" <<
id <<
"' with definition '"
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.
map_location coordinate
Contains an x and y coordinate used for starting positions in maps.
std::vector< state_definition > state
An abstract description of a rectangle with integer coordinates.
bool contains(int x, int y) const
Whether the given point lies within the rectangle.
std::string missing_mandatory_wml_tag(const std::string §ion, const std::string &tag)
Returns a standard message for a missing wml child (tag).
std::string missing_mandatory_wml_key(const std::string §ion, const std::string &key, const std::string &primary_key, const std::string &primary_value)
Returns a standard message for a missing wml key (attribute).
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)
#define VALIDATE(cond, message)
The macro to use for the validation of WML.