a2dTemplateEvent Class Reference
[Objects in docview frame work.Events used in docview frame work.events in the wxDocview library]

event sent to a2dViewConnector More...

#include <docviewref.h>

Inheritance diagram for a2dTemplateEvent:

Inheritance graph
[legend]
Collaboration diagram for a2dTemplateEvent:

Collaboration graph
[legend]

List of all members.

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
a2dDocumentGetDocument ()
 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
a2dViewGetView ()
 Get the view created.
void SetView (a2dView *view)
 Set the view created.


Detailed Description

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 992 of file docviewref.h.


The documentation for this class was generated from the following file:
a2dTemplateEvent Class Reference -- Tue Aug 31 18:35:30 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation