Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CEGUI::GlobalEventSet Class Reference

#include <CEGUIGlobalEventSet.h>

Inheritance diagram for CEGUI::GlobalEventSet:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::GlobalEventSet:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ConstBaseIterator<
EventMap
EventIterator

Public Member Functions

 GlobalEventSet ()
 ~GlobalEventSet ()
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.
void addEvent (const String &name)
 Add a new Event to the EventSet with the given name.
void removeEvent (const String &name)
 Removes the Event with the given name. All connections to the event are disconnected.
void removeAllEvents (void)
 Remove all Event objects from the EventSet.
bool isEventPresent (const String &name)
 Checks to see if an Event with the given name is present in the EventSet.
bool isMuted (void) const
 Return whether the EventSet is muted or not.
void setMutedState (bool setting)
 Set the mute state for this EventSet.
EventIterator getIterator (void) const
 Return a EventSet::EventIterator object to iterate over the available events.

Static Public Member Functions

GlobalEventSetgetSingleton (void)
 Return singleton System object.
GlobalEventSetgetSingletonPtr (void)
 Return pointer to singleton System object.

Protected Types

typedef std::map< String,
Event * > 
EventMap

Protected Attributes

EventMap d_events
bool d_muted
 true if events for this EventSet have been muted.

Static Protected Attributes

GlobalEventSetms_Singleton = NULL

Member Typedef Documentation

typedef ConstBaseIterator<EventMap> CEGUI::EventSet::EventIterator [inherited]
 

Definition at line 216 of file CEGUIEventSet.h.

Referenced by CEGUI::EventSet::getIterator().

typedef std::map<String, Event*> CEGUI::EventSet::EventMap [protected, inherited]
 

Definition at line 207 of file CEGUIEventSet.h.


Constructor & Destructor Documentation

CEGUI::GlobalEventSet::GlobalEventSet  ) 
 

Definition at line 40 of file CEGUIGlobalEventSet.cpp.

CEGUI::GlobalEventSet::~GlobalEventSet  ) 
 

Definition at line 48 of file CEGUIGlobalEventSet.cpp.


Member Function Documentation

void CEGUI::EventSet::addEvent const String name  )  [inherited]
 

Add a new Event to the EventSet with the given name.

Parameters:
name String object containing the name to give the new Event. The name must be unique for the EventSet.
Returns:
Nothing
Exceptions:
AlreadyExistsException Thrown if an Event already exists named name.

Definition at line 54 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_events, and CEGUI::EventSet::isEventPresent().

Referenced by CEGUI::Checkbox::addCheckboxEvents(), CEGUI::Combobox::addComboboxEvents(), CEGUI::ComboDropList::addComboDropListEvents(), CEGUI::Editbox::addEditboxEvents(), CEGUI::FrameWindow::addFrameWindowEvents(), CEGUI::ListHeaderSegment::addHeaderSegmentEvents(), CEGUI::Listbox::addListboxEvents(), CEGUI::ListHeader::addListHeaderEvents(), CEGUI::MouseCursor::addMouseCursorEvents(), CEGUI::MultiColumnList::addMultiColumnListboxEvents(), CEGUI::MultiLineEditbox::addMultiLineEditboxEvents(), CEGUI::ProgressBar::addProgressBarEvents(), CEGUI::PushButton::addPushButtonEvents(), CEGUI::RadioButton::addRadioButtonEvents(), CEGUI::Scrollbar::addScrollbarEvents(), CEGUI::Slider::addSliderEvents(), CEGUI::Window::addStandardEvents(), CEGUI::TabButton::addTabButtonEvents(), CEGUI::TabControl::addTabControlEvents(), CEGUI::Thumb::addThumbEvents(), CEGUI::Renderer::Renderer(), and subscribeEvent().

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.

Definition at line 109 of file CEGUIGlobalEventSet.cpp.

EventSet::EventIterator CEGUI::EventSet::getIterator void   )  const [inherited]
 

Return a EventSet::EventIterator object to iterate over the available events.

Definition at line 183 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_events, and CEGUI::EventSet::EventIterator.

GlobalEventSet & CEGUI::GlobalEventSet::getSingleton void   )  [static]
 

Return singleton System object.

Returns:
Singleton System object

Reimplemented from CEGUI::Singleton< GlobalEventSet >.

Definition at line 56 of file CEGUIGlobalEventSet.cpp.

GlobalEventSet * CEGUI::GlobalEventSet::getSingletonPtr void   )  [static]
 

Return pointer to singleton System object.

Returns:
Pointer to singleton System object

Reimplemented from CEGUI::Singleton< GlobalEventSet >.

Definition at line 64 of file CEGUIGlobalEventSet.cpp.

bool CEGUI::EventSet::isEventPresent const String name  )  [inherited]
 

Checks to see if an Event with the given name is present in the EventSet.

Returns:
true if an Event named name was found, or false if the Event was not found

Definition at line 101 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_events.

Referenced by CEGUI::EventSet::addEvent().

bool CEGUI::EventSet::isMuted void   )  const [inherited]
 

Return whether the EventSet is muted or not.

Returns:
  • true if the EventSet is muted. All requests to fire events will be ignored.
  • false if the EventSet is not muted. All requests to fire events are processed as normal.

Definition at line 164 of file CEGUIEventSet.cpp.

void CEGUI::EventSet::removeAllEvents void   )  [inherited]
 

Remove all Event objects from the EventSet.

Returns:
Nothing

Definition at line 84 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_events.

Referenced by CEGUI::EventSet::~EventSet().

void CEGUI::EventSet::removeEvent const String name  )  [inherited]
 

Removes the Event with the given name. All connections to the event are disconnected.

Parameters:
name String object containing the name of the Event to remove. If no such Event exists, nothing happens.
Returns:
Nothing.

Definition at line 68 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_events.

void CEGUI::EventSet::setMutedState bool  setting  )  [inherited]
 

Set the mute state for this EventSet.

Parameters:
setting 
  • true if the EventSet is to be muted (no further event firing requests will be honoured until EventSet is unmuted).
  • false if the EventSet is not to be muted and all events should fired as requested.
Returns:
Nothing.

Definition at line 173 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_muted.

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.

Definition at line 91 of file CEGUIGlobalEventSet.cpp.

References CEGUI::EventSet::addEvent(), CEGUI::Event::Connection, and CEGUI::Event::Subscriber.

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.

Definition at line 72 of file CEGUIGlobalEventSet.cpp.

References CEGUI::EventSet::addEvent(), CEGUI::Event::Connection, CEGUI::Informative, and CEGUI::Event::Subscriber.


Member Data Documentation

EventMap CEGUI::EventSet::d_events [protected, inherited]
 

Definition at line 208 of file CEGUIEventSet.h.

Referenced by CEGUI::EventSet::addEvent(), CEGUI::EventSet::fireEvent(), CEGUI::EventSet::getIterator(), CEGUI::EventSet::isEventPresent(), CEGUI::EventSet::removeAllEvents(), CEGUI::EventSet::removeEvent(), and CEGUI::EventSet::subscribeEvent().

bool CEGUI::EventSet::d_muted [protected, inherited]
 

true if events for this EventSet have been muted.

Definition at line 210 of file CEGUIEventSet.h.

Referenced by CEGUI::EventSet::setMutedState().

GlobalEventSet * CEGUI::Singleton< GlobalEventSet >::ms_Singleton = NULL [static, protected, inherited]
 

Definition at line 35 of file CEGUIGlobalEventSet.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Feb 16 12:41:10 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1