15 #ifndef GUI_WIDGETS_AUXILIARY_EVENT_DISTRIBUTOR_HPP_INCLUDED
16 #define GUI_WIDGETS_AUXILIARY_EVENT_DISTRIBUTOR_HPP_INCLUDED
75 const bool capture =
true);
141 const tpoint& coordinate);
145 const tpoint& coordinate);
149 const tpoint& coordinate);
154 template <
tevent sdl_button_down,
159 tevent button_double_click>
199 const tpoint& coordinate);
204 const tpoint& coordinate);
236 public tmouse_button_middle,
237 public tmouse_button_right
tmouse_button< SDL_RIGHT_BUTTON_DOWN, SDL_RIGHT_BUTTON_UP, RIGHT_BUTTON_DOWN, RIGHT_BUTTON_UP, RIGHT_BUTTON_CLICK, RIGHT_BUTTON_DOUBLE_CLICK > tmouse_button_right
twidget & owner_
The widget that owns us.
void stop_hover_timer()
Stops the current hover timer.
void capture_mouse(const bool capture=true)
Captures the mouse input.
draw_layering(const bool auto_join=true)
bool mouse_captured_
Did the current widget capture the focus_?
See LEFT_BUTTON_DOUBLE_CLICK.
The event handler class for the widget library.
virtual void handle_event(const SDL_Event &)
A SDL middle mouse button up event.
A left mouse button double click event for a widget.
void start_hover_timer(twidget *widget, const tpoint &coordinate)
Starts the hover timer.
void show_tooltip()
Called when the mouse wants the widget to show its tooltip.
void signal_handler_sdl_wheel(const event::tevent event, bool &handled, const tpoint &coordinate)
tmouse_button< SDL_MIDDLE_BUTTON_DOWN, SDL_MIDDLE_BUTTON_UP, MIDDLE_BUTTON_DOWN, MIDDLE_BUTTON_UP, MIDDLE_BUTTON_CLICK, MIDDLE_BUTTON_DOUBLE_CLICK > tmouse_button_middle
Base class for event handling.
A left mouse button down event for a widget.
void keyboard_add_to_chain(twidget *widget)
Adds the widget to the keyboard chain.
void signal_handler_sdl_key_down(const SDLKey key, const SDLMod modifier, const utf8::string &unicode)
Set of functions that handle certain events and sends them to the proper widget.
A left mouse button click event for a widget.
std::vector< twidget * > keyboard_focus_chain_
Fall back keyboard focus_ items.
void signal_handler_show_helptip(const event::tevent event, bool &handled, const tpoint &coordinate)
A class inherited from ttext_box that displays its input as stars.
void initialize_state()
Initializes the state of the keyboard and mouse.
See LEFT_BUTTON_DOUBLE_CLICK.
twidget * mouse_focus_
The widget that currently has the mouse focus_.
A SDL middle mouse button down event.
tpoint hover_position_
The anchor point of the hover event.
virtual void handle_window_event(const SDL_Event &)
size_t hover_timer_
The timer for the hover event.
tposition
The position where to add a new callback in the signal handler.
A SDL left mouse button up event.
void signal_handler_sdl_mouse_motion(const event::tevent event, bool &handled, const tpoint &coordinate)
tevent
The event send to the dispatcher.
void keyboard_capture(twidget *widget)
Captures the keyboard input.
A left mouse button up event for a widget.
bool hover_shown_
Has the hover been shown for the widget?
void mouse_enter(twidget *mouse_over)
Called when the mouse enters a widget.
A SDL left mouse button down event.
void keyboard_remove_from_chain(twidget *widget)
Remove the widget from the keyboard chain.
A SDL right mouse button down event.
void mouse_leave()
Called when the mouse leaves the current widget.
twidget * hover_widget_
The widget which should get the hover event.
twidget * keyboard_focus_
The widget that holds the keyboard focus_.
A SDL right mouse button up event.
tmouse_button< SDL_LEFT_BUTTON_DOWN, SDL_LEFT_BUTTON_UP, LEFT_BUTTON_DOWN, LEFT_BUTTON_UP, LEFT_BUTTON_CLICK, LEFT_BUTTON_DOUBLE_CLICK > tmouse_button_left
bool signal_handler_sdl_mouse_motion_entered_
tdistributor(twidget &owner, const tdispatcher::tposition queue_position)
void signal_handler_notify_removal(tdispatcher &widget, const tevent event)
void mouse_motion(twidget *mouse_over, const tpoint &coordinate)
Called when the mouse moves over a widget.
GLsizei const GLcharARB ** string
tmouse_motion(twidget &owner, const tdispatcher::tposition queue_position)