The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
gui2::tevent_executor Class Reference

Event execution calls. More...

#include <event_executor.hpp>

Inheritance diagram for gui2::tevent_executor:
Inheritance graph

Public Member Functions

 tevent_executor ()
 
virtual ~tevent_executor ()
 
void set_wants_mouse_hover (const bool hover=true)
 
bool wants_mouse_hover () const
 
void set_wants_mouse_left_double_click (const bool click=true)
 
bool wants_mouse_left_double_click () const
 
void set_wants_mouse_middle_double_click (const bool click=true)
 
bool wants_mouse_middle_double_click () const
 
tevent_executorset_wants_mouse_right_double_click (const bool click=true)
 
bool wants_mouse_right_double_click () const
 

Private Attributes

bool wants_mouse_hover_
 Does the widget want a hover event? See mouse_hover. More...
 
bool wants_mouse_left_double_click_
 Does the widget want a left button double click? See mouse_left_button_double_click. More...
 
bool wants_mouse_middle_double_click_
 See wants_mouse_left_double_click_. More...
 
bool wants_mouse_right_double_click_
 See wants_mouse_left_double_click_. More...
 

Detailed Description

Event execution calls.

Base class with all possible events, most widgets can ignore most of these, but they are available. In order to use an event simply override the execution function and implement the wanted behavior. The default behavior defined here is to do nothing.

For more info about the event handling have a look at the tevent_handler class which 'translates' sdl events into 'widget' events.

Definition at line 34 of file event_executor.hpp.

Constructor & Destructor Documentation

gui2::tevent_executor::tevent_executor ( )
inline

Definition at line 37 of file event_executor.hpp.

virtual gui2::tevent_executor::~tevent_executor ( )
inlinevirtual

Definition at line 45 of file event_executor.hpp.

Member Function Documentation

void gui2::tevent_executor::set_wants_mouse_hover ( const bool  hover = true)
inline

Definition at line 51 of file event_executor.hpp.

References wants_mouse_hover_.

Referenced by gui2::tcontrol::set_tooltip().

void gui2::tevent_executor::set_wants_mouse_left_double_click ( const bool  click = true)
inline
void gui2::tevent_executor::set_wants_mouse_middle_double_click ( const bool  click = true)
inline

Definition at line 69 of file event_executor.hpp.

References tooltips::click(), and wants_mouse_middle_double_click_.

tevent_executor& gui2::tevent_executor::set_wants_mouse_right_double_click ( const bool  click = true)
inline

Definition at line 78 of file event_executor.hpp.

References tooltips::click(), and wants_mouse_right_double_click_.

bool gui2::tevent_executor::wants_mouse_hover ( ) const
inline

Definition at line 55 of file event_executor.hpp.

References wants_mouse_hover_.

Referenced by gui2::event::tmouse_motion::start_hover_timer().

bool gui2::tevent_executor::wants_mouse_left_double_click ( ) const
inline

Definition at line 64 of file event_executor.hpp.

References wants_mouse_left_double_click_.

Referenced by gui2::event::tdispatcher::fire().

bool gui2::tevent_executor::wants_mouse_middle_double_click ( ) const
inline

Definition at line 73 of file event_executor.hpp.

References wants_mouse_middle_double_click_.

Referenced by gui2::event::tdispatcher::fire().

bool gui2::tevent_executor::wants_mouse_right_double_click ( ) const
inline

Definition at line 83 of file event_executor.hpp.

References wants_mouse_right_double_click_.

Referenced by gui2::event::tdispatcher::fire().

Member Data Documentation

bool gui2::tevent_executor::wants_mouse_hover_
private

Does the widget want a hover event? See mouse_hover.

Definition at line 90 of file event_executor.hpp.

Referenced by set_wants_mouse_hover(), and wants_mouse_hover().

bool gui2::tevent_executor::wants_mouse_left_double_click_
private

Does the widget want a left button double click? See mouse_left_button_double_click.

Definition at line 96 of file event_executor.hpp.

Referenced by set_wants_mouse_left_double_click(), and wants_mouse_left_double_click().

bool gui2::tevent_executor::wants_mouse_middle_double_click_
private

See wants_mouse_left_double_click_.

Definition at line 99 of file event_executor.hpp.

Referenced by set_wants_mouse_middle_double_click(), and wants_mouse_middle_double_click().

bool gui2::tevent_executor::wants_mouse_right_double_click_
private

See wants_mouse_left_double_click_.

Definition at line 102 of file event_executor.hpp.

Referenced by set_wants_mouse_right_double_click(), and wants_mouse_right_double_click().


The documentation for this class was generated from the following file: