Crazy Eddies GUI System: CEGUI::GlobalEventSet Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Class List
- Alphabetical List
- Class Hierarchy
- Class Members

# CEGUI::GlobalEventSet Class Reference

The GlobalEventSet singleton allows you to subscribe to an event for all instances of a class. The GlobalEventSet effectively supports "late binding" to events; which means you can subscribe to some event that does not actually exist (yet). More...

Inheritance diagram for CEGUI::GlobalEventSet:

[legend]
Collaboration diagram for CEGUI::GlobalEventSet:

[legend]
List of all members.

## Public Member Functions
virtual Event::Connection | subscribeEvent (const String &name, Event::Subscriber subscriber)
| Subscribes the the named Event.
virtual Event::Connection | subscribeEvent (const String &name, Event::Group group, Event::Subscriber subscriber)
| Subscribes the the specified group of the named Event.
virtual void | fireEvent (const String &name, EventArgs &args, const String &eventNamespace="")
| Fires the named event passing the given EventArgs object.
## Static Public Member Functions
static GlobalEventSet & | getSingleton (void)
| Return singleton System object.
static GlobalEventSet * | getSingletonPtr (void)
| Return pointer to singleton System object.

## Detailed Description

The GlobalEventSet singleton allows you to subscribe to an event for all instances of a class. The GlobalEventSet effectively supports "late binding" to events; which means you can subscribe to some event that does not actually exist (yet).

## Member Function Documentation

void CEGUI::GlobalEventSet::fireEvent | ( | const String & | name,
|  | EventArgs & | args,
|  | const String & | eventNamespace = `""`
| ) | `[virtual]`

  | Fires the named event passing the given EventArgs object. Parameters:
  | 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 namespace prefix to use when firing the global event.
Returns: Nothing. Reimplemented from CEGUI::EventSet.

GlobalEventSet & CEGUI::GlobalEventSet::getSingleton | ( | void |  | ) | `[static]`

| Return singleton System object. Returns: Singleton System object

GlobalEventSet * CEGUI::GlobalEventSet::getSingletonPtr | ( | void |  | ) | `[static]`

| Return pointer to singleton System object. Returns: Pointer to singleton System object

Event::Connection CEGUI::GlobalEventSet::subscribeEvent | ( | const String & | name,
|  | Event::Group | group,
|  | Event::Subscriber | subscriber
| ) | `[virtual]`

  | Subscribes the the specified group of the named Event. /note If the named event does not exist it is added. Parameters:
  | name | String object containing the name of the Event to subscribe to.
  | group | Group which is to be subscribed to. Subscription groups are called in ascending order.
  | subscriber | Function or object that is to be subscribed to the Event.
Returns: Connection object that can be used to check the status of the Event connection and to disconnect (unsubscribe) from the Event. Reimplemented from CEGUI::EventSet.

Event::Connection CEGUI::GlobalEventSet::subscribeEvent | ( | const String & | name,
|  | Event::Subscriber | subscriber
| ) | `[virtual]`

  | Subscribes the the named Event. Note: If the named event does not exist it is added. Parameters:
  | name | String object containing the name of the Event to subscribe to.
  | subscriber | Function or object that is to be subscribed to the Event.
Returns: Connection object that can be used to check the status of the Event connection and to disconnect (unsubscribe) from the Event. Reimplemented from CEGUI::EventSet.