gui2::tevent_executor Class Reference

Base class with all possible events, most widgets can ignore most of these, but they are available. More...

#include <widget.hpp>

Inheritance diagram for gui2::tevent_executor:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 tevent_executor ()
virtual ~tevent_executor ()
virtual void mouse_enter (tevent_handler &)
virtual void mouse_move (tevent_handler &)
virtual void mouse_hover (tevent_handler &)
virtual void mouse_leave (tevent_handler &)
virtual void mouse_left_button_down (tevent_handler &)
virtual void mouse_left_button_up (tevent_handler &)
virtual void mouse_left_button_click (tevent_handler &)
virtual void mouse_left_button_double_click (tevent_handler &)
virtual void mouse_middle_button_down (tevent_handler &)
virtual void mouse_middle_button_up (tevent_handler &)
virtual void mouse_middle_button_click (tevent_handler &)
virtual void mouse_middle_button_double_click (tevent_handler &)
virtual void mouse_right_button_down (tevent_handler &)
virtual void mouse_right_button_up (tevent_handler &)
virtual void mouse_right_button_click (tevent_handler &)
virtual void mouse_right_button_double_click (tevent_handler &)
virtual void key_press (tevent_handler &, bool &, SDLKey, SDLMod, Uint16)
 Handled, if there's a keyboard focus it will get the change to handle the key first, if not done it's send to the window.
virtual void window_resize (tevent_handler &, const unsigned, const unsigned)
virtual void help_key (tevent_handler &)
 When F1 is pressed this event is triggered.
bool wants_mouse_hover () const
bool wants_mouse_left_double_click () const
bool wants_mouse_middle_double_click () const
bool wants_mouse_right_double_click () const
tevent_executorset_wants_mouse_hover (const bool hover=true)
tevent_executorset_wants_mouse_left_double_click (const bool click=true)
tevent_executorset_wants_mouse_middle_double_click (const bool click=true)
tevent_executorset_wants_mouse_right_double_click (const bool click=true)

Private Attributes

bool wants_mouse_hover_
 If a widget doesn't want a double click we need to send a second click instead of double click.
bool wants_mouse_left_double_click_
bool wants_mouse_middle_double_click_
bool wants_mouse_right_double_click_


Detailed Description

Base class with all possible events, most widgets can ignore most of these, but they are available.

Definition at line 31 of file gui/widgets/widget.hpp.


Constructor & Destructor Documentation

gui2::tevent_executor::tevent_executor (  )  [inline]

Definition at line 34 of file gui/widgets/widget.hpp.

virtual gui2::tevent_executor::~tevent_executor (  )  [inline, virtual]

Definition at line 40 of file gui/widgets/widget.hpp.


Member Function Documentation

virtual void gui2::tevent_executor::mouse_enter ( tevent_handler  )  [inline, virtual]

Reimplemented in gui2::tbutton, gui2::tscrollbar_, and gui2::ttoggle_button.

Definition at line 53 of file gui/widgets/widget.hpp.

Referenced by gui2::tevent_handler::mouse_enter().

virtual void gui2::tevent_executor::mouse_move ( tevent_handler  )  [inline, virtual]

Reimplemented in gui2::tscrollbar_, gui2::ttext_, and gui2::ttext_box.

Definition at line 54 of file gui/widgets/widget.hpp.

Referenced by gui2::tevent_handler::mouse_move().

virtual void gui2::tevent_executor::mouse_hover ( tevent_handler  )  [inline, virtual]

Reimplemented in gui2::tcontrol.

Definition at line 55 of file gui/widgets/widget.hpp.

Referenced by gui2::tevent_handler::mouse_hover().

virtual void gui2::tevent_executor::mouse_leave ( tevent_handler  )  [inline, virtual]

Reimplemented in gui2::tbutton, gui2::tscrollbar_, and gui2::ttoggle_button.

Definition at line 56 of file gui/widgets/widget.hpp.

Referenced by gui2::tevent_handler::mouse_leave().

virtual void gui2::tevent_executor::mouse_left_button_down ( tevent_handler  )  [inline, virtual]

Reimplemented in gui2::tbutton, gui2::tscrollbar_, gui2::ttext_, and gui2::ttext_box.

Definition at line 58 of file gui/widgets/widget.hpp.

virtual void gui2::tevent_executor::mouse_left_button_up ( tevent_handler  )  [inline, virtual]

Reimplemented in gui2::tbutton, gui2::tscrollbar_, gui2::ttext_, and gui2::ttext_box.

Definition at line 59 of file gui/widgets/widget.hpp.

virtual void gui2::tevent_executor::mouse_left_button_click ( tevent_handler  )  [inline, virtual]

Reimplemented in gui2::tbutton, and gui2::ttoggle_button.

Definition at line 60 of file gui/widgets/widget.hpp.

virtual void gui2::tevent_executor::mouse_left_button_double_click ( tevent_handler  )  [inline, virtual]

Reimplemented in gui2::ttext_, and gui2::ttext_box.

Definition at line 61 of file gui/widgets/widget.hpp.

virtual void gui2::tevent_executor::mouse_middle_button_down ( tevent_handler  )  [inline, virtual]

Definition at line 63 of file gui/widgets/widget.hpp.

virtual void gui2::tevent_executor::mouse_middle_button_up ( tevent_handler  )  [inline, virtual]

Definition at line 64 of file gui/widgets/widget.hpp.

virtual void gui2::tevent_executor::mouse_middle_button_click ( tevent_handler  )  [inline, virtual]

Reimplemented in gui2::ttext_.

Definition at line 65 of file gui/widgets/widget.hpp.

virtual void gui2::tevent_executor::mouse_middle_button_double_click ( tevent_handler  )  [inline, virtual]

Definition at line 66 of file gui/widgets/widget.hpp.

virtual void gui2::tevent_executor::mouse_right_button_down ( tevent_handler  )  [inline, virtual]

Definition at line 68 of file gui/widgets/widget.hpp.

virtual void gui2::tevent_executor::mouse_right_button_up ( tevent_handler  )  [inline, virtual]

Definition at line 69 of file gui/widgets/widget.hpp.

virtual void gui2::tevent_executor::mouse_right_button_click ( tevent_handler  )  [inline, virtual]

Definition at line 70 of file gui/widgets/widget.hpp.

virtual void gui2::tevent_executor::mouse_right_button_double_click ( tevent_handler  )  [inline, virtual]

Definition at line 71 of file gui/widgets/widget.hpp.

virtual void gui2::tevent_executor::key_press ( tevent_handler ,
bool &  ,
SDLKey  ,
SDLMod  ,
Uint16   
) [inline, virtual]

Handled, if there's a keyboard focus it will get the change to handle the key first, if not done it's send to the window.

SDLKey the sdl key code needed for special keys SDLMod the keyboard modifiers at moment of pressing Unit16 the unicode for the pressed key

Reimplemented in gui2::ttext_.

Definition at line 78 of file gui/widgets/widget.hpp.

Referenced by gui2::tevent_handler::key_down().

virtual void gui2::tevent_executor::window_resize ( tevent_handler ,
const   unsigned,
const   unsigned 
) [inline, virtual]

Reimplemented in gui2::twindow.

Definition at line 80 of file gui/widgets/widget.hpp.

virtual void gui2::tevent_executor::help_key ( tevent_handler  )  [inline, virtual]

When F1 is pressed this event is triggered.

Reimplemented in gui2::tcontrol.

Definition at line 84 of file gui/widgets/widget.hpp.

Referenced by gui2::tevent_handler::key_down().

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

Definition at line 86 of file gui/widgets/widget.hpp.

References wants_mouse_hover_.

Referenced by gui2::tevent_handler::set_hover().

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

Definition at line 88 of file gui/widgets/widget.hpp.

References wants_mouse_left_double_click_.

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

Definition at line 89 of file gui/widgets/widget.hpp.

References wants_mouse_middle_double_click_.

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

Definition at line 90 of file gui/widgets/widget.hpp.

References wants_mouse_right_double_click_.

tevent_executor& gui2::tevent_executor::set_wants_mouse_hover ( const bool  hover = true  )  [inline]

Definition at line 92 of file gui/widgets/widget.hpp.

References wants_mouse_hover_.

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

tevent_executor& gui2::tevent_executor::set_wants_mouse_left_double_click ( const bool  click = true  )  [inline]

Definition at line 95 of file gui/widgets/widget.hpp.

References wants_mouse_left_double_click_.

Referenced by gui2::ttext_box::ttext_box().

tevent_executor& gui2::tevent_executor::set_wants_mouse_middle_double_click ( const bool  click = true  )  [inline]

Definition at line 98 of file gui/widgets/widget.hpp.

References wants_mouse_middle_double_click_.

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

Definition at line 101 of file gui/widgets/widget.hpp.

References wants_mouse_right_double_click_.


Member Data Documentation

If a widget doesn't want a double click we need to send a second click instead of double click.

Definition at line 107 of file gui/widgets/widget.hpp.

Referenced by set_wants_mouse_hover(), and wants_mouse_hover().


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs