QuadUI 1.2.9 public beta
Run-time API for QuadUI

EventDispatcher Class Reference

Inheritance diagram for EventDispatcher:
ComplexComponent2D Element2D Screen2D Clock2D ResizableBar2D Toolbar2D InteractiveElement2D Sprite2D Button2D Repeater2D Toggle2D MultiStateSprite2D

List of all members.

Public Member Functions

virtual void AddEventListener (string type, EQEQEvent.EventHandler handler)
virtual void RemoveEventListener (string type, EQEQEvent.EventHandler handler)
bool HasEventListener (string type)
void DispatchEvent (EQEQEvent e)
int GetNumListenersOfType (string type)

Detailed Description

Base class which ties objects into the event system. Any class can listen for an event, but only classes which inherit from EventDispatcher can communicate events.


Member Function Documentation

virtual void EventDispatcher.AddEventListener ( string  type,
EQEQEvent.EventHandler  handler 
) [virtual]

Adds a delegate function (EQEQEvent.EventHandler handler) which will be called whenever this object dispatches the event (string type).

void EventDispatcher.DispatchEvent ( EQEQEvent  e)

Dispatches a new event object. If this object has any recorded listeners, those handler functions will be called.

int EventDispatcher.GetNumListenersOfType ( string  type)

Returns how many listeners this object has for a particular event type.

bool EventDispatcher.HasEventListener ( string  type)

Does this object have a listener for the specified type?

virtual void EventDispatcher.RemoveEventListener ( string  type,
EQEQEvent.EventHandler  handler 
) [virtual]

Removes the specified event listener.

 All Classes Functions Variables Enumerations Properties