16 #define GETTEXT_DOMAIN "wesnoth-lib"
32 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
33 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
50 values_.emplace_back(
"label", this->get_label());
52 connect_signal<event::MOUSE_ENTER>(
54 connect_signal<event::MOUSE_LEAVE>(
57 connect_signal<event::LEFT_BUTTON_DOWN>(
59 connect_signal<event::LEFT_BUTTON_UP>(
61 connect_signal<event::LEFT_BUTTON_CLICK>(
66 connect_signal<event::NOTIFY_MODIFIED>(
179 selected.back() =
VNGETTEXT(
"multimenu^$excess other",
"$excess others", excess, {{
"excess", std::to_string(excess)}});
187 for(
unsigned i = 0;
i <
values_.size();
i++) {
211 assert(option <
values_.size());
219 assert(states.size() ==
values_.size());
243 load_resolutions<resolution>(cfg);
261 builder_multimenu_button::builder_multimenu_button(
const config& cfg)
263 , max_shown_(cfg[
"maximum_shown"].to_unsigned(1))
266 for(
const auto& option : cfg.
child_range(
"option")) {
273 auto widget = std::make_unique<multimenu_button>(*
this);
280 DBG_GUI_G <<
"Window builder: placed multimenu_button '" <<
id
281 <<
"' with definition '" <<
definition <<
"'.";
A config object defines a single node in a WML file, with access to child nodes.
child_itors child_range(config_key_type key)
bool show(const unsigned auto_close_time=0)
Shows the window.
base class of top level items, the only item which needs to store the final canvases to draw on.
void mouse_capture(const bool capture=true)
static std::string _(const char *str)
Define the common log macros for the gui toolkit.
ui_event
The event sent to the dispatcher.
std::string sound_button_click
Contains the implementation details for lexical_cast and shouldn't be used directly.
void play_UI_sound(const std::string &files)
std::string format_conjunct_list(const t_string &empty, const std::vector< t_string > &elems)
Format a conjunctive list.
This file contains the settings handling of the widget library.
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)