26 struct builder_toggle_panel;
51 const bool must_be_active)
override;
55 const bool must_be_active)
const override;
58 virtual void set_active(
const bool active)
override;
64 virtual unsigned get_state()
const override;
150 static const std::string&
type();
200 virtual std::unique_ptr<widget>
build()
const override;
A config object defines a single node in a WML file, with access to child nodes.
Small abstract helper class.
void signal_handler_left_button_double_click(const event::ui_event event, bool &handled)
unsigned state_num_
Usually 1 for selected and 0 for not selected, can also have higher values in tristate buttons.
virtual bool impl_draw_foreground() override
See widget::impl_draw_foreground.
virtual bool impl_draw_background() override
See widget::impl_draw_background.
void signal_handler_mouse_enter(const event::ui_event event, bool &handled)
void set_state(const state_t state)
virtual widget * find_at(const point &coordinate, const bool must_be_active) override
See widget::find_at.
void set_child_members(const widget_data &data)
Sets the members of the child controls.
virtual unsigned get_state() const override
See styled_widget::get_state.
virtual void set_active(const bool active) override
See styled_widget::set_active.
int retval_
The return value of the button.
void set_retval(const int retval)
static const std::string & type()
Static type getter that does not rely on the widget being constructed.
virtual unsigned get_value() const override
Inherited from selectable_item.
void signal_handler_left_button_click(const event::ui_event event, bool &handled)
virtual point border_space() const override
See container_base::border_space.
virtual bool get_active() const override
See styled_widget::get_active.
virtual void set_value(unsigned selected, bool fire_event=false) override
Inherited from selectable_item.
void signal_handler_mouse_leave(const event::ui_event event, bool &handled)
toggle_panel(const implementation::builder_toggle_panel &builder)
state_t state_
Current state of the widget.
virtual unsigned num_states() const override
Inherited from selectable_item.
void signal_handler_pre_left_button_click(const event::ui_event event)
state_t
Possible states of the widget.
virtual const std::string & get_control_type() const override
Inherited from styled_widget, implemented by REGISTER_WIDGET.
virtual SDL_Rect get_client_rect() const override
See container_base::get_client_rect.
std::function< void(widget &)> callback_mouse_left_double_click_
Mouse left double click callback.
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.
ui_event
The event sent to the dispatcher.
std::shared_ptr< builder_grid > builder_grid_ptr
std::map< std::string, widget_item > widget_data
retval
Default window/dialog return values.
Contains the implementation details for lexical_cast and shouldn't be used directly.
map_location coordinate
Contains an x and y coordinate used for starting positions in maps.
builder_toggle_panel(const config &cfg)
virtual std::unique_ptr< widget > build() const override
resolution(const config &cfg)
toggle_panel_definition(const config &cfg)