16 #define GETTEXT_DOMAIN "wesnoth-lib" 29 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__ 30 #define LOG_HEADER LOG_SCOPE_HEADER + ':' 45 connect_signal<event::MOUSE_ENTER>(std::bind(
47 connect_signal<event::MOUSE_LEAVE>(std::bind(
50 connect_signal<event::LEFT_BUTTON_DOWN>(std::bind(
52 connect_signal<event::LEFT_BUTTON_UP>(std::bind(
66 connect_signal<event::LEFT_BUTTON_DOWN>(
signal);
72 disconnect_signal<event::LEFT_BUTTON_DOWN>(
signal);
138 [
this, window](
unsigned int) {
174 load_resolutions<resolution>(cfg);
182 state.emplace_back(cfg.
child(
"state_enabled"));
183 state.emplace_back(cfg.
child(
"state_disabled"));
184 state.emplace_back(cfg.
child(
"state_pressed"));
185 state.emplace_back(cfg.
child(
"state_focused"));
193 builder_repeating_button::builder_repeating_button(
const config& cfg)
200 auto widget = std::make_unique<repeating_button>(*this);
202 DBG_GUI_G <<
"Window builder: placed repeating button '" <<
id 203 <<
"' with definition '" <<
definition <<
"'.";
Define the common log macros for the gui toolkit.
Base class of a resolution, contains the common keys for a resolution.
config & child(config_key_type key, int n=0)
Returns the nth child with the given key, or a reference to an invalid config if there is none...
std::vector< state_definition > state
ui_event
The event sent to the dispatcher.
std::string sound_button_click
unsigned repeat_button_repeat_time
This file contains the settings handling of the widget library.
dispatcher_callback<> signal
Used for events in event_category::general.
Contains the gui2 timer routines.
std::size_t add_timer(const uint32_t interval, const std::function< void(std::size_t id)> &callback, const bool repeat)
Adds a new timer.
void mouse_capture(const bool capture=true)
void play_UI_sound(const std::string &files)
bool fire(const ui_event event, widget &target)
Fires an event which has no extra parameters.
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...
Contains the implementation details for lexical_cast and shouldn't be used directly.
bool remove_timer(const std::size_t id)
Removes a timer.