#include <comevt.h>

Public Member Functions | |
| a2dComEvent (wxObject *sender, const wxEventType *id) | |
| for sending just an event id, m_property is not set | |
| a2dComEvent (a2dPropObject *sender, const a2dPropertyId *id, const wxEventType *eventid=&sm_changedProperty) | |
| sent a property id ( in order to get property on sender object ) | |
| a2dComEvent (wxObject *sender, a2dNamedProperty *property, const wxEventType *id=&sm_changedProperty, bool ownProp=false) | |
| sent a property | |
| a2dComEvent (wxObject *sender, const a2dNamedProperty &property, const wxEventType *eventid=&sm_changedProperty) | |
| sent a property by reference | |
| a2dComEvent (wxObject *sender, a2dObject *refObject, const wxEventType *eventid=&sm_changedRefObject) | |
| sent a property generated from a a2dObject. | |
| a2dComEvent (wxObject *sender, const a2dPropertyIdRefObject *id, a2dObject *refObject, const wxEventType *eventid=&sm_changedProperty) | |
| sent a property id ( in order to get property on sender object ) | |
| a2dComEvent (wxObject *sender, const a2dPropertyIdBool *id, bool propertyValue, const wxEventType *eventid=&sm_changedProperty) | |
| sent a property generated from a bool. | |
| a2dComEvent (wxObject *sender, const a2dPropertyIdUint16 *id, wxUint16 propertyValue, const wxEventType *eventid=&sm_changedProperty) | |
| sent a property generated from a wxUint16. | |
| a2dComEvent (wxObject *sender, const a2dPropertyIdInt32 *id, wxInt32 propertyValue, const wxEventType *eventid=&sm_changedProperty) | |
| sent a property generated from a wxInt32. | |
| a2dComEvent (wxObject *sender, const a2dPropertyIdDouble *id, double propertyValue, const wxEventType *eventid=&sm_changedProperty) | |
| sent a property generated from a double. | |
| a2dComEvent (wxObject *sender, const a2dPropertyIdString *id, const wxString &propertyValue, const wxEventType *eventid=&sm_changedProperty) | |
| sent a property generated from a wxString. | |
| a2dComEvent (const a2dComEvent &other) | |
| wxEvent * | Clone (void) const |
| a2dNamedProperty * | GetProperty () |
| const wxEventType * | GetEventComId () |
| const wxEventType * | GetEventComIdReturn () |
| wxObject * | GetHandler () |
| if required the event should be sent to this object. | |
| void | SetHandler (wxObject *sentTo) |
| object to which event will be sent if needed. | |
Static Public Attributes | |
| static const wxEventType | sm_changedProperty |
| static const wxEventType | sm_changedRefObject |
| static const wxEventType | sm_non |
Friends | |
| class | a2dSmrtPtrBase |
special event for communicating between a2dObject's and GUI objects and Command processors.
Used for communicating and distributing events which change e.g. a2dPropObject's Often this event is distributed via a2dGeneralGlobals->GetEventDistributer(), so all registrated classes in a2dEventDistributer will receive the event.
The information that is sent around is stored in a a2dNamedProperty.
To intercept this event ( when sent to an object ), use the next event table entries:
event id's for Change events used for specifying which type of information is communicated via a a2dComEvent event.
The idea is to add static members like this to a class you wnat to sent an event from. Like in a2dCanvasObject we have in the header file:
const static a2dComEvent::wxEventType sm_changedLayer;
and in the cpp file do initilize the static member:
const a2dComEvent::wxEventType a2dCanvasObject::sm_changedLayer;
and in the cpp file do sent an event from member function:
a2dComEvent changedlayer( this, PROPID_layer, layer, &sm_changedLayer ); a2dGeneralGlobals->GetEventDistributer()->ProcessEvent( changedlayer );
BEGIN_EVENT_TABLE( anyclass, wxWindow )
EVT_COM_EVENT( anyclass::OnComEvent )
END_EVENT_TABLE()
void anyclass::OnComEvent( a2dComEvent& event )
{
if ( event.GetEventComId() == &sm_changedLayer )
{
DoIt();
}
}
Definition at line 2262 of file comevt.h.
| a2dComEvent::a2dComEvent | ( | a2dPropObject * | sender, | |
| const a2dPropertyId * | id, | |||
| const wxEventType * | eventid = &sm_changedProperty | |||
| ) |
sent a property id ( in order to get property on sender object )
| sender | the object which did sent this event. | |
| id | id of the property in the sender object | |
| eventid | eventid is to further specify the nature of the event. |
Definition at line 1759 of file comevt.cpp.
| a2dComEvent::a2dComEvent | ( | wxObject * | sender, | |
| a2dNamedProperty * | property, | |||
| const wxEventType * | id = &sm_changedProperty, |
|||
| bool | ownProp = false | |||
| ) |
sent a property
| sender | the object which did sent this event. | |
| property | the property to sent | |
| id | eventid is to further specify the nature of the event. | |
| ownProp | when true the property will be cloned and deleted here |
Definition at line 1771 of file comevt.cpp.
| a2dComEvent::a2dComEvent | ( | wxObject * | sender, | |
| const a2dNamedProperty & | property, | |||
| const wxEventType * | eventid = &sm_changedProperty | |||
| ) |
sent a property by reference
| sender | the object which did sent this event. | |
| property | the property to sent | |
| eventid | eventid is to further specify the nature of the event. |
Definition at line 1786 of file comevt.cpp.
| a2dComEvent::a2dComEvent | ( | wxObject * | sender, | |
| a2dObject * | refObject, | |||
| const wxEventType * | eventid = &sm_changedRefObject | |||
| ) |
sent a property generated from a a2dObject.
Creates a wxRefObjectPtrProperty internal.
| sender | the object which did sent this event. | |
| refObject | the a2dObject | |
| eventid | eventid is to further specify the nature of the event. |
Definition at line 1798 of file comevt.cpp.
| a2dComEvent::a2dComEvent | ( | wxObject * | sender, | |
| const a2dPropertyIdRefObject * | id, | |||
| a2dObject * | refObject, | |||
| const wxEventType * | eventid = &sm_changedProperty | |||
| ) |
sent a property id ( in order to get property on sender object )
| sender | the object which did sent this event. | |
| id | id of the property in the sender object | |
| eventid | eventid is to further specify the nature of the event. sent a property generated from a a2dObject. |
Definition at line 1810 of file comevt.cpp.
| void a2dComEvent::SetHandler | ( | wxObject * | sentTo | ) | [inline] |