#include <distributor.hpp>


Public Member Functions | |
| tmouse_motion (twidget &owner, const tdispatcher::tposition queue_position) | |
| ~tmouse_motion () | |
| void | capture_mouse (const bool capture=true) |
| Captures the mouse input. | |
Protected Member Functions | |
| void | start_hover_timer (twidget *widget, const tpoint &coordinate) |
| Starts the hover timer. | |
| void | stop_hover_timer () |
| Stops the current hover timer. | |
| void | mouse_enter (twidget *mouse_over) |
| Called when the mouse enters a widget. | |
| void | mouse_leave () |
| Called when the mouse leaves the current widget. | |
Protected Attributes | |
| twidget * | mouse_focus_ |
| The widget that currently has the mouse focus_. | |
| bool | mouse_captured_ |
| Did the current widget capture the focus_? | |
| twidget & | owner_ |
| The widget that owns us. | |
| unsigned long | hover_timer_ |
| The timer for the hover event. | |
| twidget * | hover_widget_ |
| The widget which should get the hover event. | |
| tpoint | hover_position_ |
| The anchor point of the hover event. | |
| bool | hover_shown_ |
| Has the hover been shown for the widget? | |
Private Member Functions | |
| void | mouse_motion (twidget *mouse_over, const tpoint &coordinate) |
| Called when the mouse moves over a widget. | |
| void | show_tooltip () |
| Called when the mouse wants the widget to show its tooltip. | |
| void | signal_handler_sdl_mouse_motion (const event::tevent event, bool &handled, const tpoint &coordinate) |
| void | signal_handler_sdl_wheel (const event::tevent event, bool &handled, const tpoint &coordinate) |
| void | signal_handler_show_helptip (const event::tevent event, bool &handled, const tpoint &coordinate) |
Private Attributes | |
| bool | signal_handler_sdl_mouse_motion_entered_ |
Definition at line 54 of file distributor.hpp.
| gui2::event::tmouse_motion::tmouse_motion | ( | twidget & | owner, | |
| const tdispatcher::tposition | queue_position | |||
| ) |
Definition at line 103 of file distributor.cpp.
| gui2::event::tmouse_motion::~tmouse_motion | ( | ) |
Definition at line 142 of file distributor.cpp.
| void gui2::event::tmouse_motion::capture_mouse | ( | const bool | capture = true |
) |
Captures the mouse input.
When capturing the widget that has the mouse focus_ does the capturing.
| capture | Set or release the capturing. |
Definition at line 147 of file distributor.cpp.
Referenced by gui2::twindow::mouse_capture().

| void gui2::event::tmouse_motion::mouse_enter | ( | twidget * | mouse_over | ) | [protected] |
Called when the mouse enters a widget.
| mouse_over | The widget that should receive the event. |
Definition at line 242 of file distributor.cpp.
| void gui2::event::tmouse_motion::mouse_leave | ( | ) | [protected] |
Called when the mouse leaves the current widget.
Definition at line 298 of file distributor.cpp.
| void gui2::event::tmouse_motion::mouse_motion | ( | twidget * | mouse_over, | |
| const tpoint & | coordinate | |||
| ) | [private] |
Called when the mouse moves over a widget.
| mouse_over | The widget that should receive the event. | |
| coordinate | The current screen coordinate of the mouse. |
Definition at line 255 of file distributor.cpp.
| void gui2::event::tmouse_motion::show_tooltip | ( | ) | [private] |
Called when the mouse wants the widget to show its tooltip.
Definition at line 273 of file distributor.cpp.
References start_hover_timer(), and stop_hover_timer().

| void gui2::event::tmouse_motion::signal_handler_sdl_mouse_motion | ( | const event::tevent | event, | |
| bool & | handled, | |||
| const tpoint & | coordinate | |||
| ) | [private] |
Definition at line 154 of file distributor.cpp.
References mouse_captured_, and mouse_focus_.
| void gui2::event::tmouse_motion::signal_handler_sdl_wheel | ( | const event::tevent | event, | |
| bool & | handled, | |||
| const tpoint & | coordinate | |||
| ) | [private] |
Definition at line 197 of file distributor.cpp.
| void gui2::event::tmouse_motion::signal_handler_show_helptip | ( | const event::tevent | event, | |
| bool & | handled, | |||
| const tpoint & | coordinate | |||
| ) | [private] |
Definition at line 216 of file distributor.cpp.
References gui2::event::tdispatcher::fire(), and owner_.

| void gui2::event::tmouse_motion::start_hover_timer | ( | twidget * | widget, | |
| const tpoint & | coordinate | |||
| ) | [protected] |
Starts the hover timer.
| widget | The widget that wants the tooltip. | |
| coordinate | The anchor coordinate. |
Definition at line 314 of file distributor.cpp.
Referenced by show_tooltip().

| void gui2::event::tmouse_motion::stop_hover_timer | ( | ) | [protected] |
Stops the current hover timer.
Definition at line 338 of file distributor.cpp.
References hover_position_, and hover_widget_.
Referenced by show_tooltip().

tpoint gui2::event::tmouse_motion::hover_position_ [protected] |
The anchor point of the hover event.
Definition at line 89 of file distributor.hpp.
Referenced by stop_hover_timer().
bool gui2::event::tmouse_motion::hover_shown_ [protected] |
Has the hover been shown for the widget?
A widget won't get a second hover event after the tooltip has been triggered. Only after (shortly) entering another widget it will be shown again for this widget.
Definition at line 98 of file distributor.hpp.
unsigned long gui2::event::tmouse_motion::hover_timer_ [protected] |
The timer for the hover event.
Definition at line 83 of file distributor.hpp.
twidget* gui2::event::tmouse_motion::hover_widget_ [protected] |
The widget which should get the hover event.
Definition at line 86 of file distributor.hpp.
Referenced by stop_hover_timer().
bool gui2::event::tmouse_motion::mouse_captured_ [protected] |
Did the current widget capture the focus_?
Definition at line 77 of file distributor.hpp.
Referenced by signal_handler_sdl_mouse_motion().
twidget* gui2::event::tmouse_motion::mouse_focus_ [protected] |
The widget that currently has the mouse focus_.
Definition at line 74 of file distributor.hpp.
Referenced by signal_handler_sdl_mouse_motion().
twidget& gui2::event::tmouse_motion::owner_ [protected] |
The widget that owns us.
Definition at line 80 of file distributor.hpp.
Referenced by gui2::event::tdistributor::keyboard_add_to_chain(), signal_handler_show_helptip(), and gui2::event::tdistributor::tdistributor().
Definition at line 134 of file distributor.hpp.
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:23:59 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |