Gel2D - The free/open source game creation suite

Static Public Member Functions
gel::GelEventDispatcher Class Reference

Event dispatcher. More...

#include <gelEvent.h>

List of all members.

Static Public Member Functions

static int addReceiver (GelEventReceiver *receiver)
 Registers a receiver.
static void removeReceiver (int index)
 Removes a receiver.
static void sendEvent (GelEvent *event)
 Sends an event to all registered receivers.

Detailed Description

Event dispatcher.

The event dispatcher is responsible for registering receivers and sending events to them.


Member Function Documentation

static int gel::GelEventDispatcher::addReceiver ( GelEventReceiver receiver) [static]

Registers a receiver.

The receiver will be added to a list where it can be sent events along with all other receivers.

Parameters:
receiver: Pointer to the receiver to register.
static void gel::GelEventDispatcher::removeReceiver ( int  index) [static]

Removes a receiver.

Sets the receiver at the given index to NULL.

Parameters:
index: index of the receiver to remove.
static void gel::GelEventDispatcher::sendEvent ( GelEvent event) [static]

Sends an event to all registered receivers.

Parameters:
event: Pointer to the event to be sent.

The documentation for this class was generated from the following file: