16 #define GETTEXT_DOMAIN "wesnoth-lib"
36 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
37 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
52 connect_signal<event::MOUSE_ENTER>(
54 connect_signal<event::MOUSE_LEAVE>(
57 connect_signal<event::LEFT_BUTTON_DOWN>(std::bind(
59 connect_signal<event::LEFT_BUTTON_UP>(
61 connect_signal<event::LEFT_BUTTON_CLICK>(std::bind(
157 load_resolutions<resolution>(cfg);
175 builder_button::builder_button(
const config& cfg)
177 , retval_id_(cfg[
"return_value_id"])
178 , retval_(cfg[
"return_value"])
184 auto widget = std::make_unique<button>(*
this);
188 DBG_GUI_G <<
"Window builder: placed button '" <<
id
189 <<
"' 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)
static std::string _(const char *str)
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
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)