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

CEGUI::Event Class Reference

Defines an 'event' which can be subscribed to by interested parties. More...

#include <CEGUIEvent.h>

Collaboration diagram for CEGUI::Event:

Collaboration graph
[legend]
List of all members.

Public Types

typedef RefPtr< ConnectionInterfaceConnection
typedef SubscriberTemplate<
bool, const EventArgs & > 
Subscriber
typedef int Group

Public Member Functions

 Event (const String &name)
 Constructs a new Event object with the specified name.
virtual ~Event (void)
 Destructor for Event objects.
const StringgetName (void) const
 Return the name given to this Event object when it was created.
Connection subscribe (Subscriber subscriber)
 Subscribes some function / object to the Event.
Connection subscribe (Group group, Subscriber subscriber)
 Subscribes some function / object to the Event.
void operator() (EventArgs &args)

Friends

class ConnectionImpl

Detailed Description

Defines an 'event' which can be subscribed to by interested parties.

An Event can be subscribed by a function, a static member function, or a function object. Whichever option is taken, the function signature needs to be as follows

bool function_name(const EventArgs& args);
Note:
An Event object may not be copied.

Definition at line 199 of file CEGUIEvent.h.


Member Typedef Documentation

typedef RefPtr<ConnectionInterface> CEGUI::Event::Connection
 

Definition at line 207 of file CEGUIEvent.h.

Referenced by subscribe(), CEGUI::GlobalEventSet::subscribeEvent(), and CEGUI::EventSet::subscribeEvent().

typedef int CEGUI::Event::Group
 

Definition at line 219 of file CEGUIEvent.h.

typedef SubscriberTemplate<bool, const EventArgs&> CEGUI::Event::Subscriber
 

Definition at line 218 of file CEGUIEvent.h.

Referenced by CEGUI::TabControl::addButtonForTabContent(), CEGUI::TabControl::addTab(), CEGUI::ConnectionImpl::ConnectionImpl(), CEGUI::ListHeader::createInitialisedSegment(), CEGUI::StaticText::initialise(), CEGUI::Slider::initialise(), CEGUI::Scrollbar::initialise(), CEGUI::MultiColumnList::initialise(), CEGUI::FrameWindow::initialise(), CEGUI::Combobox::initialise(), subscribe(), CEGUI::GlobalEventSet::subscribeEvent(), and CEGUI::EventSet::subscribeEvent().


Constructor & Destructor Documentation

CEGUI::Event::Event const String name  ) 
 

Constructs a new Event object with the specified name.

Definition at line 70 of file CEGUIEvent.cpp.

CEGUI::Event::~Event void   )  [virtual]
 

Destructor for Event objects.

Definition at line 75 of file CEGUIEvent.cpp.


Member Function Documentation

const String& CEGUI::Event::getName void   )  const [inline]
 

Return the name given to this Event object when it was created.

Returns:
String object containing the name of the Event object.

Definition at line 244 of file CEGUIEvent.h.

void CEGUI::Event::operator() EventArgs args  ) 
 

Definition at line 97 of file CEGUIEvent.cpp.

References CEGUI::EventArgs::handled.

Event::Connection CEGUI::Event::subscribe Group  group,
Subscriber  subscriber
 

Subscribes some function / object to the Event.

Parameters:
group The Event group to subscribe to, subscription groups are called in ascending order, followed by subscriptions with no group. connections to the same group may be called in any order.
subscriber A function, static member function, or function object, with the signature void function_name(const EventArgs& args)
Returns:
A Connection which can be used to disconnect (unsubscribe) from the Event, and to check the connection state.

Definition at line 89 of file CEGUIEvent.cpp.

References Connection, ConnectionImpl, and Subscriber.

Connection CEGUI::Event::subscribe Subscriber  subscriber  )  [inline]
 

Subscribes some function / object to the Event.

Parameters:
subscriber A function, static member function, or function object, with the signature void function_name(const EventArgs& args)
Returns:
A Connection pointer which can be used to disconnect (unsubscribe) from the Event, and to check the connection state.

Definition at line 257 of file CEGUIEvent.h.


Friends And Related Function Documentation

friend class ConnectionImpl [friend]
 

Definition at line 333 of file CEGUIEvent.h.

Referenced by subscribe().


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