#include "gui/core/event/dispatcher.hpp"
#include "gui/widgets/widget.hpp"
#include <SDL_events.h>
#include <boost/mpl/for_each.hpp>
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) |
#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.
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 48 of file dispatcher_private.hpp.
#define IMPLEMENT_EVENT_SIGNAL_WRAPPER | ( | TYPE | ) |
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.
TYPE | The type to wrap for IMPLEMENT_EVENT_SIGNAL. |
Definition at line 103 of file dispatcher_private.hpp.