16 #define GETTEXT_DOMAIN "wesnoth-lib"
34 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
35 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
50 connect_signal<event::MOUSE_ENTER>(
52 connect_signal<event::MOUSE_LEAVE>(
55 connect_signal<event::LEFT_BUTTON_DOWN>(std::bind(
57 connect_signal<event::LEFT_BUTTON_UP>(
59 connect_signal<event::LEFT_BUTTON_CLICK>(std::bind(
155 load_resolutions<resolution>(cfg);
173 builder_button::builder_button(
const config& cfg)
175 , retval_id_(cfg[
"return_value_id"])
176 , retval_(cfg[
"return_value"])
182 auto widget = std::make_unique<button>(*
this);
186 DBG_GUI_G <<
"Window builder: placed button '" <<
id
187 <<
"' with definition '" <<
definition <<
"'.";
A config object defines a single node in a WML file, with access to child nodes.
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.
Base class of a resolution, contains the common keys for a resolution.
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)