15 #define GETTEXT_DOMAIN "wesnoth-lib"
29 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
30 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
44 , callback_state_change_()
47 connect_signal<event::MOUSE_ENTER>(std::bind(
49 connect_signal<event::MOUSE_LEAVE>(std::bind(
52 connect_signal<event::LEFT_BUTTON_CLICK>(std::bind(
54 connect_signal<event::LEFT_BUTTON_DOUBLE_CLICK>(std::bind(
74 string_map::const_iterator
itor = data.find(
"icon");
75 if(itor != data.end()) {
106 for(
auto &
canvas : canvases)
201 DBG_GUI_P <<
"Parsing toggle button " <<
id <<
'\n';
203 load_resolutions<tresolution>(cfg);
279 tbuilder_toggle_button::tbuilder_toggle_button(
const config& cfg)
281 , icon_name_(cfg[
"icon"])
282 , retval_id_(cfg[
"return_value_id"])
283 , retval_(cfg[
"return_value"])
296 DBG_GUI_G <<
"Window builder: placed toggle button '" <<
id
297 <<
"' with definition '" <<
definition <<
"'.\n";
Define the common log macros for the gui toolkit.
child_itors child_range(const std::string &key)
Add a special kind of assert to validate whether the input from WML doesn't contain any problems that...
GLuint GLuint GLsizei GLenum type
tresolution_definition_ptr config()
int get_retval(const std::string &retval_id, const int retval, const std::string &id)
Returns the return value for a widget.
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
Base class of a resolution, contains the common keys for a resolution.
base class of top level items, the only item which needs to store the final canvases to draw on ...
A class inherited from ttext_box that displays its input as stars.
void init_control(tcontrol *control) const
std::string definition
Parameters for the control.
void set_retval(const int retval, const bool close_window=true)
Sets there return value of the window.
tevent
The event send to the dispatcher.
void set_wants_mouse_left_double_click(const bool click=true)
Contains the state info for a resolution.
std::map< std::string, t_string > string_map
virtual void update_canvas()
Updates the canvas(ses).
std::map< std::string, tfilter >::iterator itor
std::vector< tcanvas > & canvas()
Base class for all visible items.
std::vector< tstate_definition > state
virtual void set_members(const string_map &data)
Sets the members of the control.
void play_UI_sound(const std::string &files)
A config object defines a single node in a WML file, with access to child nodes.
std::string sound_toggle_button_click
GLsizei const GLcharARB ** string
Contains the implementation details for lexical_cast and shouldn't be used directly.