The Battle for Wesnoth  1.15.12+dev
Classes | Namespaces
distributor.hpp File Reference

Contains the event distributor. More...

#include "gui/core/event/dispatcher.hpp"
#include "gui/core/event/handler.hpp"
#include "sdl/point.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.


class  gui2::event::mouse_motion
struct  gui2::event::mouse_button_event_types
 Small helper metastruct to configure instances of mouse_button. More...
class  gui2::event::mouse_button
struct  gui2::event::mouse_button_left
 Three subclasses of mouse_button, so that the distributor class can inherit from them; C++ doesn't allow multiple inheritance to directly use more than one instance of a superclass. More...
struct  gui2::event::mouse_button_middle
struct  gui2::event::mouse_button_right
class  gui2::event::distributor
 The event handler class for the widget library. More...
class  gui2::event::distributor::layer


 Generic file dialog.

Detailed Description

Contains the event distributor.

The event distributor exists of several classes which are combined in one templated distributor 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 mouse_motion class handles the mouse motion and holds the owner of us since all classes virtually inherit us.

The mouse_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.

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