16 #define GETTEXT_DOMAIN "wesnoth-lib"
34 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
35 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
51 connect_signal<event::MOUSE_ENTER>(
53 connect_signal<event::MOUSE_LEAVE>(
56 connect_signal<event::LEFT_BUTTON_DOWN>(std::bind(
58 connect_signal<event::LEFT_BUTTON_UP>(
60 connect_signal<event::LEFT_BUTTON_CLICK>(std::bind(
167 load_resolutions<resolution>(cfg);
190 builder_button::builder_button(
const config& cfg)
192 , retval_id_(cfg[
"return_value_id"])
193 , retval_(cfg[
"return_value"].to_int())
199 auto widget = std::make_unique<button>(*
this);
203 DBG_GUI_G <<
"Window builder: placed button '" <<
id
204 <<
"' with definition '" <<
definition <<
"'.";
A config object defines a single node in a WML file, with access to child nodes.
config & mandatory_child(config_key_type key, int n=0)
Returns the nth child with the given key, or throws an error if there is none.
optional_config_impl< config > optional_child(config_key_type key, int n=0)
Equivalent to mandatory_child, but returns an empty optional if the nth child was not found.
base class of top level items, the only item which needs to store the final canvases to draw on.
void set_retval(const int retval, const bool close_window=true)
Sets there return value of the window.
void mouse_capture(const bool capture=true)
Define the common log macros for the gui toolkit.
ui_event
The event sent to the dispatcher.
int get_retval(const std::string &retval_id, const int retval, const std::string &id)
Returns the return value for a widget.
std::string sound_button_click
retval
Default window/dialog return values.
@ NONE
Default, unset return value.
Contains the implementation details for lexical_cast and shouldn't be used directly.
void play_UI_sound(const std::string &files)
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)