a2dEventDistributer Class Reference
[Event Managerevents in the wxDocview library]

class to spread events sent to it to other class instances that are registrated More...

#include <comevt.h>

Collaboration diagram for a2dEventDistributer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dEventDistributer ()
 constructor
 ~a2dEventDistributer ()
 destructor
bool ProcessEvent (wxEvent &event)
 process an event for the object, starting with the first eventhandler in the list.
a2dDistributedEventReceiverRegister (wxEvtHandler *handler)
 register a class instance
bool Unregister (wxEvtHandler *handler)
 UnRegister a class instance.
a2dDistributedEventReceiverRegister (a2dObject *handler)
 register a class instance
bool Unregister (a2dObject *handler)
 UnRegister a class instance.

Protected Attributes

wxEventHandlersList m_handlers
 list of registrated class instances.


Detailed Description

class to spread events sent to it to other class instances that are registrated

The events sent to this class or either directly sent to other classes that are registrated or in idle time. Registrated classes should be derived from wxEvtHandler.

The sending class calls

          ProcessEvent( wxEvent& event) or  AddPendingEvent( changed ).

The receiving class can use the standard way of receiving events in wxWindows.

        BEGIN_EVENT_TABLE(wxMyClass, wxMyClassBase)
            EVT_COM_EVENT( wxMyClass::OnComEvent )
        END_EVENT_TABLE()

In the docview classes, the a2dEventDistributer is used to sent events from documents to views and the wxCommandProcessorEvents class.

Definition at line 1666 of file comevt.h.


Member Function Documentation

bool a2dEventDistributer::ProcessEvent ( wxEvent &  event  ) 

process an event for the object, starting with the first eventhandler in the list.

Only wxEvtHandler instances that are registred and valid are getting the event. It is allowed to unregister any wxEvtHandler while the event distribution is in progress. This unregistered wxEvtHandler, will be flagged invalid, and therefore no event will be sent to it anymore. At the end of the event distribution the unregistered wxEvtHandler's are removed.

Definition at line 1299 of file comevt.cpp.


The documentation for this class was generated from the following files:
a2dEventDistributer Class Reference -- Tue Aug 31 18:26:37 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation