Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

gui2::event::tmouse_motion Class Reference

#include <distributor.hpp>

Inheritance diagram for gui2::event::tmouse_motion:
Inheritance graph
[legend]
Collaboration diagram for gui2::event::tmouse_motion:
Collaboration graph
[legend]

List of all members.

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

twidgetmouse_focus_
 The widget that currently has the mouse focus_.
bool mouse_captured_
 Did the current widget capture the focus_?
twidgetowner_
 The widget that owns us.
unsigned long hover_timer_
 The timer for the hover event.
twidgethover_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_

Detailed Description

Definition at line 54 of file distributor.hpp.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
capture Set or release the capturing.

Definition at line 147 of file distributor.cpp.

Referenced by gui2::twindow::mouse_capture().

Here is the caller graph for this function:

void gui2::event::tmouse_motion::mouse_enter ( twidget mouse_over  )  [protected]

Called when the mouse enters a widget.

Parameters:
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.

Parameters:
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().

Here is the call graph for this function:

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_.

Here is the call graph for this function:

void gui2::event::tmouse_motion::start_hover_timer ( twidget widget,
const tpoint coordinate 
) [protected]

Starts the hover timer.

Parameters:
widget The widget that wants the tooltip.
coordinate The anchor coordinate.

Definition at line 314 of file distributor.cpp.

Referenced by show_tooltip().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:


Member Data Documentation

The anchor point of the hover event.

Definition at line 89 of file distributor.hpp.

Referenced by stop_hover_timer().

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.

The widget which should get the hover event.

Definition at line 86 of file distributor.hpp.

Referenced by stop_hover_timer().

Did the current widget capture the focus_?

Definition at line 77 of file distributor.hpp.

Referenced by signal_handler_sdl_mouse_motion().

The widget that currently has the mouse focus_.

Definition at line 74 of file distributor.hpp.

Referenced by signal_handler_sdl_mouse_motion().

Definition at line 134 of file distributor.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:23:59 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs