Hi Klaas,

maybe that's getting a lengthy question, but i'm loosing the direction how to 
use wxa2d.

Currently i have a running app based using an a2dDocumentMDIParentFrame and an 
a2dDocumentMDIChildFrame (subclassed by me) . I've subclassed an 
a2dCanvasDocument, and in its OnNewDocument() method some basic objects are 
created (and of course there is some glue like connectors). This app works, 
but i don't really know why an how to cusomize it further. Therefore i have 
some basic questions.

In the parent frame i added this line:
AddCommandToMenu( file_menu, _("&LG Scheibe"), _("LG Scheibe"), new 
a2dCommand_FileNew() ); 
When i select this menu item, the MDIchild is opened and the predefined 
a2dCanvasDocument content is displayed. 
If i would like to have a second kind of a2dCanvasDocument in my app, how can 
i tell the frame to make a new one of this kind? (in the above statement 
there is not mentioned which kind of document has to be made new, it's just 
magic, that the MDIchild is shown at all).

As i don't really want to use an MDI, but would prefer a simple frame having a 
tab control in it, and every tab shall contain a canvas showing a (slightly) 
different graphic. The frame shall decide, in wich tab which graphic is 
displayed, and if new data is available, the frame shall dispatch it to one 
of the canvases or better their documents.
As i found out, i should be able to take an a2dCanvas as a child to a tab 
control and can use the a2dCanvasDocument contained in it to draw the data. 
But what if i would like to use my predefined a2dCanvasDocuments? Could i 
simply substitute the doc in the canvas by my doc? Is a program seqeuence 
like the following one legal?
...
MyCanvasDocument* doc1 = new MyCanvasDocument(iversion2);
a2dCanvas* canvas1 = new a2dCanvas();
canvas1->SetCanvasDocument(doc1);
MyCanvasDocument* doc2 = new MyCanvasDocument(version2);
a2dCanvas* canvas2 = new a2dCanvas();
canvas->SetCanvasDocument(doc2);
...

Would the event procedure
MyCanvasDocument::OnNewDocument(a2dDocumentEvent& event)
by executed?

The app has a given number of different graphical displays to manage 
(currently three). It reads the data to be displayed from a serial line 
automatically in a thread in a background and shall dispatch it to one of the 
three canvases (or better the documents and their object tree). Which one of 
your samples come closest to what i want to do?

BTW, your tool seems to be excellent, maybe a bit hared to set up. If i'm 
done, i'll send you screenshots and put it on my homepage.

Regards,
Thomas


-- 
Dipl.-Ing. Thomas Zehbe
Kuhweide 6
31552 Apelern

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

Reply via email to