The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Namespaces | Macros | Functions
dispatcher_private.hpp File Reference
#include "gui/core/event/dispatcher.hpp"
#include "gui/widgets/widget.hpp"
#include <SDL_events.h>
#include <boost/mpl/for_each.hpp>
Include dependency graph for dispatcher_private.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  gui2::event::tdispatcher_implementation
 
class  gui2::event::tdispatcher_implementation::thas_handler
 A helper class to find out whether dispatcher has an handler for a certain event. More...
 
struct  gui2::event::implementation::find< done >
 Specialized class when itor == end. More...
 
struct  gui2::event::implementation::find< false >
 Specialized class when itor != end. More...
 

Namespaces

 gui2
 A class inherited from ttext_box that displays its input as stars.
 
 gui2::event
 
 gui2::event::implementation
 Contains the implementation details of the find function.
 

Macros

#define IMPLEMENT_EVENT_SIGNAL(SET, FUNCTION, QUEUE)
 Helper macro to implement the various event_signal functions. More...
 
#define IMPLEMENT_EVENT_SIGNAL_WRAPPER(TYPE)
 Small helper macro to wrap IMPLEMENT_EVENT_SIGNAL. More...
 

Functions

template<typename sequence , typename E , typename F >
bool gui2::event::find (E event, F functor)
 Tests whether an event handler is available. More...
 
template<class T >
std::vector< std::pair
< twidget *, tevent > > 
gui2::event::implementation::build_event_chain (const tevent event, twidget *dispatcher, twidget *widget)
 Build the event chain. More...
 
template<>
std::vector< std::pair
< twidget *, tevent > > 
gui2::event::implementation::build_event_chain< tsignal_notification_function > (const tevent event, twidget *dispatcher, twidget *widget)
 Build the event chain for tsignal_notification_function. More...
 
template<>
std::vector< std::pair
< twidget *, tevent > > 
gui2::event::implementation::build_event_chain< tsignal_message_function > (const tevent event, twidget *dispatcher, twidget *widget)
 Build the event chain for tsignal_message_function. More...
 
template<class T , class F >
bool gui2::event::implementation::fire_event (const tevent event, std::vector< std::pair< twidget *, tevent > > &event_chain, twidget *dispatcher, twidget *widget, F functor)
 Helper function for fire_event. More...
 
template<class T , class F >
bool gui2::event::fire_event (const tevent event, twidget *dispatcher, twidget *widget, F functor)
 Fires an event. More...
 
template<tevent click, tevent double_click, bool(tevent_executor::*)() const wants_double_click, class T , class F >
bool gui2::event::fire_event_double_click (twidget *dispatcher, twidget *widget, F functor)
 

Macro Definition Documentation

#define IMPLEMENT_EVENT_SIGNAL (   SET,
  FUNCTION,
  QUEUE 
)

Helper macro to implement the various event_signal functions.

Implements two helper functions as documented in the macro.

Parameters
SETThe set in which the event type needs to be eg the gui2::event::tset_event or a similar set defined in that header.
FUNCTIONThe function signature to validate the implementation function SFINAE against eg the gui2::event::tsignal_function or another one in that header.
QUEUEThe queue in which the event is slotted.

Definition at line 48 of file dispatcher_private.hpp.

#define IMPLEMENT_EVENT_SIGNAL_WRAPPER (   TYPE)
Value:
tsignal_##TYPE##_function, \
signal_##TYPE##_queue_)
TYPE
UNSCALED : image will be drawn "as is" without changing size, even in case of redraw SCALED_TO_ZOOM :...
Definition: image.hpp:208
#define IMPLEMENT_EVENT_SIGNAL(SET, FUNCTION, QUEUE)
Helper macro to implement the various event_signal functions.

Small helper macro to wrap IMPLEMENT_EVENT_SIGNAL.

Since the parameters to IMPLEMENT_EVENT_SIGNAL use the same parameters with a slight difference per type this macro wraps the function by its type.

Parameters
TYPEThe type to wrap for IMPLEMENT_EVENT_SIGNAL.

Definition at line 103 of file dispatcher_private.hpp.