Classes | Namespaces | Defines | Functions

gui/auxiliary/event/dispatcher_private.hpp File Reference

#include "gui/auxiliary/event/dispatcher.hpp"
#include "gui/widgets/widget.hpp"
#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

namespace  gui2
 

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


namespace  gui2::event
namespace  gui2::event::implementation
 

Contains the implementation details of the find function.


Defines

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

Functions

template<typename sequence , typename E , typename F >
bool gui2::event::find (E event, F functor)
 Tests whether an event handler is available.
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.
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.
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.
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.
template<class T , class F >
bool gui2::event::fire_event (const tevent event, twidget *dispatcher, twidget *widget, F functor)
 Fires an event.
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)

Define 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:
SET The set in which the event type needs to be eg the gui2::event::tset_event or a similar set defined in that header.
FUNCTION The function signature to validate the implementation function SFINAE against eg the gui2::event::tsignal_function or another one in that header.
QUEUE The queue in which the event is slotted.

Definition at line 45 of file dispatcher_private.hpp.

#define IMPLEMENT_EVENT_SIGNAL_WRAPPER (   TYPE  ) 
Value:
IMPLEMENT_EVENT_SIGNAL(tset_event_##TYPE                                  \
            , tsignal_##TYPE##_function                                       \
            , signal_##TYPE##_queue_)                                         \

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:
TYPE The type to wrap for IMPLEMENT_EVENT_SIGNAL.

Definition at line 80 of file dispatcher_private.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:04:45 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs