The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Private Attributes | List of all members
gui2::event_executor Class Reference

Event execution calls. More...

#include <event_executor.hpp>

Inheritance diagram for gui2::event_executor:

Public Member Functions

 event_executor ()
 
virtual ~event_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
 
event_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 event_handler class which 'translates' sdl events into 'widget' events.

Definition at line 34 of file event_executor.hpp.

Constructor & Destructor Documentation

◆ event_executor()

gui2::event_executor::event_executor ( )
inline

Definition at line 37 of file event_executor.hpp.

◆ ~event_executor()

virtual gui2::event_executor::~event_executor ( )
inlinevirtual

Definition at line 45 of file event_executor.hpp.

Member Function Documentation

◆ set_wants_mouse_hover()

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

◆ set_wants_mouse_left_double_click()

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

◆ set_wants_mouse_middle_double_click()

void gui2::event_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_.

◆ set_wants_mouse_right_double_click()

event_executor& gui2::event_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_.

◆ wants_mouse_hover()

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

Definition at line 55 of file event_executor.hpp.

References wants_mouse_hover_.

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

◆ wants_mouse_left_double_click()

bool gui2::event_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::dispatcher::fire().

◆ wants_mouse_middle_double_click()

bool gui2::event_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::dispatcher::fire().

◆ wants_mouse_right_double_click()

bool gui2::event_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::dispatcher::fire().

Member Data Documentation

◆ wants_mouse_hover_

bool gui2::event_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().

◆ wants_mouse_left_double_click_

bool gui2::event_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().

◆ wants_mouse_middle_double_click_

bool gui2::event_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().

◆ wants_mouse_right_double_click_

bool gui2::event_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: