25 struct builder_toggle_panel;
79 void set_child_members(
80 const std::map<std::string /* widget id */, string_map>& data);
86 const bool must_be_active)
override;
89 virtual const widget* find_at(
const point& coordinate,
90 const bool must_be_active)
const override;
93 virtual void set_active(
const bool active)
override;
96 virtual bool get_active()
const override;
99 virtual unsigned get_state()
const override;
108 virtual SDL_Rect get_client_rect()
const override;
117 virtual point border_space()
const override;
129 virtual unsigned num_states()
const override;
133 void set_retval(
const int retval);
151 void set_state(
const state_t state);
178 virtual void impl_draw_background(
surface& frame_buffer,
180 int y_offset)
override;
183 virtual void impl_draw_foreground(
surface& frame_buffer,
185 int y_offset)
override;
189 static const std::string&
type();
193 virtual const std::string& get_control_type()
const override;
197 void signal_handler_mouse_enter(
const event::ui_event event,
bool& handled);
199 void signal_handler_mouse_leave(
const event::ui_event event,
bool& handled);
201 void signal_handler_pre_left_button_click(
const event::ui_event event);
206 void signal_handler_left_button_double_click(
const event::ui_event event,
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...
A panel is a visible container to hold multiple widgets.
state_t state_
Current state of the widget.
int retval_
The return value of the button.
bool fire_event(const ui_event event, std::vector< std::pair< widget *, ui_event >> &event_chain, widget *dispatcher, widget *w, F &&... params)
Helper function for fire_event.
state_t
Possible states of the widget.
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.
std::shared_ptr< builder_grid > builder_grid_ptr
Contains the implementation details for lexical_cast and shouldn't be used directly.
ui_event
The event send to the dispatcher.