wxArt2D
|
event sent to a2dViewConnector More...
#include <docviewref.h>
Public Member Functions | |
a2dTemplateEvent (a2dDocument *doc, wxEventType type, a2dDocumentFlagMask flags=a2dREFDOC_NON, int id=0) | |
constructor | |
a2dTemplateEvent (wxEventType type, a2dView *view, a2dDocumentFlagMask flags=a2dREFDOC_NON, int id=0) | |
constructor | |
a2dTemplateEvent (const a2dTemplateEvent &event) | |
constructor | |
a2dDocument * | GetDocument () |
the document created. | |
void | SetDocument (a2dDocument *doc) |
a2dDocumentFlagMask | GetFlags () |
the document flags as set by a2dDocumentTemplate::CreateDocument() | |
a2dTemplateFlagMask | GetTemplateMaskFlags () |
virtual wxEvent * | Clone () const |
clone the event | |
a2dView * | GetView () |
Get the view created. | |
void | SetView (a2dView *view) |
Set the view created. | |
![]() | |
a2dEvent (int id=0, wxEventType eventType=wxEVT_NULL) | |
void | SetIntTimeStamp () |
Additional Inherited Members | |
![]() | |
static long | ms_timestamp = 0 |
initialize timestamp | |
event sent to a2dViewConnector
The ::wxEVT_PRE_ADD_DOCUMENT is sent to a viewconnector, after a new document was created from a a2dDocumentTemplate, but before it is added to the a2dDocumentCommandProcessor. And also just before ::wxEVT_POST_CREATE_DOCUMENT is sent to the same connector. If wxEVT_PRE_ADD_DOCUMENT allows you to merge or copy a new created document with an already existing document. In that case the document will be closed in the event handler, and after return the ::wxEVT_POST_CREATE_DOCUMENT will not be sent. The ::wxEVT_PRE_ADD_DOCUMENT gets as input the newly created document, and if merged return in that the document used for merge, or NULL if document is just closed.
The two events are generated via this template class, when a2dDocumentCommandProcessor creates new documents.
The default handler a2dViewConnector::OnPostCreateDocument(), will select a a2dViewTemplate via the a2dDocumentCommandProcessor, and create the first view on the document using that template.
The ::wxEVT_POST_CREATE_DOCUMENT is sent to a viewconnector, after a new document was created from a a2dDocumentTemplate. The default handler a2dViewConnector::OnPostCreateDocument(), will select a a2dViewTemplate via the a2dDocumentCommandProcessor, and create the first view on the document using that template.
The ::wxEVT_POST_CREATE_VIEW is sent to the viewconnector, after a new view was created from a a2dViewTemplate The default handler a2dViewConnector::OnPostCreateView() will tell you that you need to intercept this event in a derived a2dViewConnector. The a2dViewConnector does not know how to connect new views into frames or windows etc. A derived a2dViewConnector should know!
The ::wxEVT_DISCONNECT_VIEW Is sent from a2dViews via a2dViewTemplate to a2dViewConnector, in order to disconnect a view.
Definition at line 870 of file docviewref.h.