The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Namespaces | Typedefs
distributor.hpp File Reference

Contains the event distributor. More...

#include "gui/core/event/dispatcher.hpp"
#include "gui/core/event/handler.hpp"
#include "gui/core/point.hpp"
#include "serialization/unicode_types.hpp"
#include "video.hpp"
#include <string>
#include <vector>
Include dependency graph for distributor.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gui2::event::tmouse_motion
 
class  gui2::event::tmouse_button< sdl_button_down, sdl_button_up, button_down, button_up, button_click, button_double_click >
 
class  gui2::event::tdistributor
 The event handler class for the widget library. More...
 
class  gui2::event::tdistributor::layer
 

Namespaces

 gui2
 A class inherited from ttext_box that displays its input as stars.
 
 gui2::event
 

Typedefs

typedef tmouse_button
< SDL_LEFT_BUTTON_DOWN,
SDL_LEFT_BUTTON_UP,
LEFT_BUTTON_DOWN,
LEFT_BUTTON_UP,
LEFT_BUTTON_CLICK,
LEFT_BUTTON_DOUBLE_CLICK > 
gui2::event::tmouse_button_left
 
typedef tmouse_button
< SDL_MIDDLE_BUTTON_DOWN,
SDL_MIDDLE_BUTTON_UP,
MIDDLE_BUTTON_DOWN,
MIDDLE_BUTTON_UP,
MIDDLE_BUTTON_CLICK,
MIDDLE_BUTTON_DOUBLE_CLICK > 
gui2::event::tmouse_button_middle
 
typedef tmouse_button
< SDL_RIGHT_BUTTON_DOWN,
SDL_RIGHT_BUTTON_UP,
RIGHT_BUTTON_DOWN,
RIGHT_BUTTON_UP,
RIGHT_BUTTON_CLICK,
RIGHT_BUTTON_DOUBLE_CLICK > 
gui2::event::tmouse_button_right
 

Detailed Description

Contains the event distributor.

The event distributor exists of several classes which are combined in one templated tdistributor class. The classes are closely tight together.

All classes have direct access to each others members since they should act as one. (Since the buttons are a templated subclass it's not possible to use private subclasses.)

The tmouse_motion class handles the mouse motion and holds the owner of us since all classes virtually inherit us.

The tmouse_button classes are templated classes per mouse button, the template parameters are used to make the difference between the mouse buttons. Although it's easily possible to add more mouse buttons in the code several places only expect a left, middle and right button.

tdistributor is the main class to be used in the user code. This class contains the handling of the keyboard as well.

Definition in file distributor.hpp.