Class that collects together a set of Event objects. More...
Inherited by GUI::GlobalEventSet, GUI::MouseCursor, GUI::Renderer, GUI::System, and GUI::Window.
Public Member Functions | |
void | addEvent (string name) |
Add a new Event to the EventSet with the given name. | |
void | removeEvent (string name) |
Removes the Event with the given name. All connections to the event are disconnected. | |
void | removeAllEvents () |
Remove all Event objects from the EventSet. | |
bool | isEventPresent (string name) |
Checks to see if an Event with the given name is present in the EventSet. | |
EventConnection | subscribeEvent (string name, string subscriber_name) |
Subscribes the named Event to a scripted funtion. | |
void | fireEvent (string name, EventArgs args, string eventNamespace="") |
Fires the named event passing the given EventArgs object. | |
bool | isMuted () |
Return whether the EventSet is muted or not. | |
void | setMutedState (bool setting) |
Set the mute state for this EventSet. |
Qualified Iterators | |
Event | Event |
Can be used to iterate over the events currently added to the EventSet. |
Class that collects together a set of Event objects.
The EventSet is a means for code to attach a handler function to some named event, and later, for that event to be fired and the subscribed handler(s) called.
Events are added to the set as they are first used; that is, the first time a handler is subscribed to an event for a given EventSet, an Event object is created and added to the EventSet.
void GUI::EventSet::addEvent | ( | string | name | ) |
void GUI::EventSet::removeEvent | ( | string | name | ) |
bool GUI::EventSet::isEventPresent | ( | string | name | ) |
EventConnection GUI::EventSet::subscribeEvent | ( | string | name, |
string | subscriber_name | ||
) |
void GUI::EventSet::fireEvent | ( | string | name, |
EventArgs | args, | ||
string | eventNamespace = "" |
||
) |
Fires the named event passing the given EventArgs object.
name | String object holding the name of the Event that is to be fired (triggered) |
args | The EventArgs (or derived) object that is to be bassed to each subscriber of the Event. Once all subscribers have been called the 'handled' field of the event is updated appropriately. |
eventNamespace | String object describing the global event namespace prefix for this event. |
Reimplemented in GUI::GlobalEventSet.
bool GUI::EventSet::isMuted | ( | ) |
void GUI::EventSet::setMutedState | ( | bool | setting | ) |
Event GUI::EventSet::Event |