26 struct builder_toggle_panel;
80 void set_child_members(
81 const std::map<std::string /* widget id */, string_map>& data);
87 const bool must_be_active)
override;
90 virtual const widget* find_at(
const point& coordinate,
91 const bool must_be_active)
const override;
94 virtual void set_active(
const bool active)
override;
97 virtual bool get_active()
const override;
100 virtual unsigned get_state()
const override;
109 virtual SDL_Rect get_client_rect()
const override;
118 virtual point border_space()
const override;
130 virtual unsigned num_states()
const override;
134 void set_retval(
const int retval);
152 void set_state(
const state_t state);
179 virtual void impl_draw_background(
int x_offset,
int y_offset)
override;
182 virtual void impl_draw_foreground(
int x_offset,
int y_offset)
override;
186 static const std::string&
type();
190 virtual const std::string& get_control_type()
const override;
194 void signal_handler_mouse_enter(
const event::ui_event event,
bool& handled);
196 void signal_handler_mouse_leave(
const event::ui_event event,
bool& handled);
198 void signal_handler_pre_left_button_click(
const event::ui_event event);
203 void signal_handler_left_button_double_click(
const event::ui_event event,
236 virtual std::unique_ptr<widget>
build()
const override;
Base class of a resolution, contains the common keys for a resolution.
Class for a toggle button.
Small abstract helper class.
unsigned state_num_
Usually 1 for selected and 0 for not selected, can also have higher values in tristate buttons...
ui_event
The event sent to the dispatcher.
A panel is a visible container to hold multiple widgets.
bool fire_event(const ui_event event, const std::vector< std::pair< widget *, ui_event >> &event_chain, widget *dispatcher, widget *w, F &&... params)
Helper function for fire_event.
state_t state_
Current state of the widget.
int retval_
The return value of the button.
state_t
Possible states of the widget.
std::shared_ptr< builder_grid > builder_grid_ptr
retval
Default window/dialog return values.
std::unique_ptr< window > build(const builder_window::window_resolution &definition)
Builds a window.
map_location coordinate
Contains an x and y coordinate used for starting positions in maps.
A config object defines a single node in a WML file, with access to child nodes.
virtual unsigned get_value() const override
Inherited from selectable_item.
std::function< void(widget &)> callback_mouse_left_double_click_
Mouse left double click callback.
Contains the implementation details for lexical_cast and shouldn't be used directly.