Laurent Veilleux wrote:
> Hi
>
> In the the editor exemple i don't see where is handled the creation of
> a new document
>   
which editor example?
In general new document are created in 
a2dDocumentCommandProcessor::CreateDocuments()
And this can be as a result of a command like e.g. a2dCommand_FileNew()
Just put a breakpoint there, and you see a file->new in say vdrawm bring 
you there via a command. (see stack)
Same for a2dCommand_FileOpen()

So all new documents creation is via CreateDocuments, which use document 
templates to create a documents and
from the templates the event are generated to get to a2dConnector classes.

Putting anothere break point at 
a2dEditorMultiFrameViewConnector::OnPostCreateDocument() in canedit.cpp,
will show that a template a2dDocumentTemplate asks its m_connector  to 
do what is needed whne a new document was created. And in this case its  
show  a list of possible views templates. Next the view template is 
asked to create a view, and from there 
a2dEditorMultiFrameViewConnector::OnPostCreateView() is called which 
will set via the same connector class the m_display for that new view. 
Which is done in this case by creating a a2dEditorFrame, which has a 
a2dCanvas inside, to which the view is attached.

Circle round:

for a new document a view is created in the way defined by a 
a2dViewConnector class defined to work for a Multi document/frame 
application. In vdraws simular things are done,  but here  the same 
frame is reused.

> (after the dialog box asking to choose a type) , how can i handle this ,
>
> how can I specifiy on which view it must be displayed (i have made my
> template so I guess it's automatic perhaps but if i have two views on
> wich one it will appear ???)
>   
read all in this topic,

http://195.241.223.125/twiki/bin/view/Main/DocviewModule

Like here:
 
http://195.241.223.125/twiki/bin/view/Main/DocviewModule#The_a2d_ViewConnector

Klaas



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Wxart2d-users_dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

Reply via email to