Class EventManager

Class Documentation

class EventManager

An Event dispatcher and registrar that also allows looking up registered events.

Public Functions

void defer(Function<void()> function)

Defer a singular function till the end of the frame.

void addBinder(EventBinderBase *binder)

Add an event binder which binds to several events per object. Does not need to be called externally.

void removeBinder(EventBinderBase *binder)
Variant returnCall(const Event &event) const

Publish an event. Returns the result of the first event handled.

Variant returnCall(const Event::Type &eventType, const Variant &data = 0) const
void call(const Event &event) const
void call(const Event::Type &eventType, const Variant &data = 0) const
void deferredCall(Ref<Event> event)

Publish an event that gets evaluated the end of the current frame.

void deferredCall(const Event::Type &eventType, const Variant &data = 0)
void dispatchDeferred()

Dispatch deferred events collected so far.

const HashMap<EventBinderBase *, bool> &getBinders() const

Public Static Functions

static EventManager *GetSingleton()