147 template<std::
size_t I>
159 void initialize_state(int32_t button_state);
219 void initialize_state();
236 void keyboard_add_to_chain(widget* widget);
243 void keyboard_remove_from_chain(widget* widget);
248 widget* keyboard_focus()
const;
271 void signal_handler_sdl_key_down(
const SDL_Keycode key,
272 const SDL_Keymod modifier,
273 const std::string& unicode);
275 void signal_handler_sdl_text_input(
const std::string& unicode, int32_t
start, int32_t len);
276 void signal_handler_sdl_text_editing(
const std::string& unicode, int32_t
start, int32_t len);
278 template<
typename Fcn,
typename P1,
typename P2,
typename P3>
279 void signal_handler_keyboard_internal(
event::ui_event evt, P1&& p1, P2&& p2, P3&& p3);
bool signal_handler_sdl_mouse_motion_entered_
bool hover_shown_
Has the hover been shown for the widget?
void signal_handler_sdl_touch_motion(const event::ui_event event, bool &handled, const point &coordinate, const point &distance)
std::vector< widget * > keyboard_focus_chain_
Fall back keyboard focus_ items.
ui_event
The event sent to the dispatcher.
Base class for event handling.
void signal_handler_sdl_wheel(const event::ui_event event, bool &handled, const point &coordinate)
void mouse_hover(widget *mouse_over, const point &coordinate)
Called when the mouse moves over a widget.
void signal_handler_show_helptip(const event::ui_event event, bool &handled, const point &coordinate)
The event handler class for the widget library.
widget & owner_
The widget that owns us.
EXIT_STATUS start(const std::string &filename, bool take_screenshot, const std::string &screenshot_filename)
Main interface for launching the editor from the title screen.
widget * keyboard_focus_
The widget that holds the keyboard focus_.
void start_hover_timer(widget *widget, const point &coordinate)
Starts the hover timer.
point hover_position_
The anchor point of the hover event.
void mouse_enter(widget *mouse_over)
Called when the mouse enters a widget.
void capture_mouse(const bool capture=true)
Captures the mouse input.
widget * mouse_focus_
The widget that currently has the mouse focus_.
std::size_t hover_timer_
The timer for the hover event.
void mouse_leave()
Called when the mouse leaves the current widget.
void signal_handler_sdl_mouse_motion(const event::ui_event event, bool &handled, const point &coordinate)
queue_position
The position where to add a new callback in the signal handler.
bool mouse_captured_
Did the current widget capture the focus_?
mouse_motion(widget &owner, const dispatcher::queue_position queue_position)
void stop_hover_timer()
Stops the current hover timer.
void show_tooltip()
Called when the mouse wants the widget to show its tooltip.
widget * hover_widget_
The widget which should get the hover event.
map_location coordinate
Contains an x and y coordinate used for starting positions in maps.