Hi Klaas, Am Mittwoch, 23. April 2008 schrieb klaas.holwerda: > > 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). > > > :-)) Not so magic, its code. But if you want to use a menu, how is it > > possible that you want to create two different new documents?? My description was a bit unclear. I don't want to create different documents in the sense of word and exel, but to have different grahics of the same kind on different windows.
> Any way, CreateDocuments() is your game. If you follow what happens (put > a breakpoint at a2dDpcument::OnNewDocument(), and look at the stack, you > will see it. Using CreateDocuments(), will have the same affect as > a2dCommand_FileNew(), only this time by your program. It will do the > same connector magic and all. Inspected this. > Oke, so its the tabframe sample in the docview samples to start with. ... > > 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? > > This is just very dedicated to your purpose, and it seams not very > interactive. Can all be done, but no sample except the ones i mentioned > above. Yup, you're right. At least for now no interaction is planned. The graphics shall not be stored on disk, they shall simply be displayed, generated by code. > The docview framework is all about having a user creating many documents > and views, changing them and closing them again. > That is a very common way of writing application which are user > interactive. (like VC Word etc. etc. ). > And many action are automated in that case. But if you need something in > the middle, its difficult to mention where the border is between all or > nothing automated. I meanwhile tried a lot of different things to get it work, but nothing worked. Looked at the tabframe vdrawas samples, looked into the the class doc etc., but it didn't enlight me. What I currently try to do is the following: - create a wxFrame with a tab control on it, the tab control having one tab with a wxPanel containing a wxScrolled window. - after that i want to create a canvasdoc and a view, do a view->SetDisplayWindow(scrolledwin) and want to see some graphics For Example with this code: Target* target = new (Target); //the canvas document a2dDocviewGlobals->GetDocviewCommandProcessor()->AddCreatedDocument( target, false); a2dView* view = a2dDocviewGlobals->GetDocviewCommandProcessor()->CreateView( target, wxT(""), a2dREFDOC_NON, a2dREFTEMPLATE_VISIBLE ); view->SetDisplayWindow(mLGpanel->mCanvas); But this leads to an assert: ASSERT INFO: /misc/wxArt2D/modules/docview/src/doccom.cpp(951): assert "foundtemplate" failed in AddCreatedDocument(): a2dDocumentCommandProcessor::AddCreatedDocument Document could not find template for document type name BACKTRACE: [1] a2dDocumentCommandProcessor::AddCreatedDocument(a2dDocument*, bool) /misc/wxArt2D/modules/docview/src/doccom.cpp:953 [2] SamFrame::CreateControls() /home/tz/projects/sam/samframe.cpp:159 [3] SamFrame::Create(wxFrame*, int, wxString const&, wxPoint const&, wxSize const&, long) /home/tz/projects/sam/samframe.cpp:86 [4] SamFrame() /home/tz/projects/sam/samframe.cpp:73 [5] SamDisplay::OnInit() /home/tz/projects/sam/samdisplay.cpp:146 I tested a lot of different variants, using CreateDocumets f.e., but nothing worked, mostly i got Asserts or at least saw nothing. So any help would be appreciated. Regards, Thomas > > > 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. > > Oke, thanks, > > Klaas > > > ------------------------------------------------------------------------- > 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/java >one _______________________________________________ > Wxart2d-users_dev mailing list > Wxart2d-users_dev@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev -- 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