16 #define GETTEXT_DOMAIN "wesnoth-lib"
40 const auto conf = cast_config_to<vertical_scrollbar_definition>();
42 return conf->minimum_positioner_length;
47 const auto conf = cast_config_to<vertical_scrollbar_definition>();
49 return conf->maximum_positioner_length;
54 const auto conf = cast_config_to<vertical_scrollbar_definition>();
56 return conf->top_offset;
61 const auto conf = cast_config_to<vertical_scrollbar_definition>();
63 return conf->bottom_offset;
108 load_resolutions<resolution>(cfg);
113 , minimum_positioner_length(cfg[
"minimum_positioner_length"])
114 , maximum_positioner_length(cfg[
"maximum_positioner_length"])
115 , top_offset(cfg[
"top_offset"])
116 , bottom_offset(cfg[
"bottom_offset"])
120 "minimum_positioner_length"));
134 builder_vertical_scrollbar::builder_vertical_scrollbar(
const config& cfg)
141 auto widget = std::make_unique<vertical_scrollbar>(*
this);
146 <<
" placed vertical scrollbar '" <<
id <<
"' with definition '"
A config object defines a single node in a WML file, with access to child nodes.
static std::string _(const char *str)
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.
This file contains the settings handling of the widget library.
Base class of a resolution, contains the common keys for a resolution.
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_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.
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.