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

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.
virtual Event::Connection subscribeScriptedEvent (const String &name, const String &subscriber_name)
 Subscribes the named Event to a scripted funtion.
virtual Event::Connection subscribeScriptedEvent (const String &name, Event::Group group, const String &subscriber_name)
 Subscribes the specified group of the named Event to a scripted funtion.
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.
 Singleton (void)

Static Public Member Functions

static GlobalEventSetgetSingleton (void)
 Return singleton System object.
static 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

static GlobalEventSetms_Singleton = NULL

Detailed Description

Definition at line 40 of file CEGUIGlobalEventSet.h.


Member Typedef Documentation

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

Definition at line 255 of file CEGUIEventSet.h.

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

Definition at line 246 of file CEGUIEventSet.h.


Constructor & Destructor Documentation

CEGUI::GlobalEventSet::GlobalEventSet  ) 
 

Definition at line 40 of file CEGUIGlobalEventSet.cpp.

References CEGUI::Logger::getSingleton(), and CEGUI::Logger::logEvent().

CEGUI::GlobalEventSet::~GlobalEventSet  ) 
 

Definition at line 48 of file CEGUIGlobalEventSet.cpp.

References CEGUI::Logger::getSingleton(), and CEGUI::Logger::logEvent().


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 55 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::DragContainer::addDragContainerEvents(), CEGUI::Editbox::addEditboxEvents(), CEGUI::FrameWindow::addFrameWindowEvents(), CEGUI::ListHeaderSegment::addHeaderSegmentEvents(), CEGUI::ItemListBase::addItemListBaseEvents(), CEGUI::Listbox::addListboxEvents(), CEGUI::ListHeader::addListHeaderEvents(), CEGUI::MenuBase::addMenuBaseEvents(), CEGUI::MenuItem::addMenuItemEvents(), CEGUI::MouseCursor::addMouseCursorEvents(), CEGUI::MultiColumnList::addMultiColumnListboxEvents(), CEGUI::MultiLineEditbox::addMultiLineEditboxEvents(), CEGUI::ProgressBar::addProgressBarEvents(), CEGUI::PushButton::addPushButtonEvents(), CEGUI::RadioButton::addRadioButtonEvents(), CEGUI::ScrollablePane::addScrollablePaneEvents(), CEGUI::Scrollbar::addScrollbarEvents(), CEGUI::ScrolledContainer::addScrolledContainerEvents(), CEGUI::Slider::addSliderEvents(), CEGUI::Spinner::addSpinnerEvents(), CEGUI::Window::addStandardEvents(), CEGUI::TabButton::addTabButtonEvents(), CEGUI::TabControl::addTabControlEvents(), CEGUI::Thumb::addThumbEvents(), CEGUI::Tooltip::addTooltipEvents(), 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.

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

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

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

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

Definition at line 203 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_events.

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.

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

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.

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

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 102 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 184 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_muted.

Referenced by CEGUI::Spinner::onTextInputModeChanged(), and CEGUI::Spinner::onValueChanged().

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

Remove all Event objects from the EventSet.

Returns:
Nothing

Definition at line 85 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 69 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 193 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_muted.

Referenced by CEGUI::Spinner::onTextInputModeChanged(), and CEGUI::Spinner::onValueChanged().

CEGUI::Singleton< GlobalEventSet >::Singleton void   )  [inline, inherited]
 

Definition at line 58 of file CEGUISingleton.h.

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(), and CEGUI::EventSet::d_events.

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::EventSet::d_events, CEGUI::Logger::getSingleton(), CEGUI::Informative, and CEGUI::Logger::logEvent().

Event::Connection CEGUI::EventSet::subscribeScriptedEvent const String name,
Event::Group  group,
const String subscriber_name
[virtual, inherited]
 

Subscribes the specified group of the named Event to a scripted funtion.

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_name String object containing the name of the script funtion 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.
Exceptions:
UnknownObjectException Thrown if an Event named name is not in the EventSet

Definition at line 120 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::subscribeEvent().

Event::Connection CEGUI::EventSet::subscribeScriptedEvent const String name,
const String subscriber_name
[virtual, inherited]
 

Subscribes the named Event to a scripted funtion.

Parameters:
name String object containing the name of the Event to subscribe to.
subscriber_name String object containing the name of the script funtion 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.
Exceptions:
UnknownObjectException Thrown if an Event named name is not in the EventSet

Definition at line 111 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::subscribeEvent().


Member Data Documentation

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

Definition at line 247 of file CEGUIEventSet.h.

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

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

true if events for this EventSet have been muted.

Definition at line 249 of file CEGUIEventSet.h.

Referenced by fireEvent(), CEGUI::EventSet::fireEvent(), CEGUI::EventSet::isMuted(), and 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 Sep 7 10:06:13 2005 for Crazy Eddies GUI System by  doxygen 1.4.3