Laurent Veilleux wrote:
>>
> At the moment i can display a a2dcanvasim and use polyline tool on him
> but zoom seems to bug (perhaps it's about what you was explaining)
Exactly, because the tool controller or tools gets a pointer from a2dCanvasView
assuming that m_display is a a2dCanvas.
This is a hard cast. Now that m_display is a2dCanvasSim, and not a a2dCanvas,
as the tools etc. want and assume it is,
one calls member functions of a2dCanvas which do not exist in a2dCanvasSim,
and even if they would exist it would stil
be illegal to do it.
So tools and tool controller assume that there is a a2dCanvas as m_display.
I am investigating if it would be enough to have only a wxWindow*
In theory tools and toolcontroller should have enough on a view it seems, but
practice is often different.
>
> Well if I use a2dCanvas my canvas won't be "scrollable" anymore I guess
> ??? :/
It will be scrollable, but in a very different way.
>
> Another question :-)
> If i made 2 canvas i have to make two toolController one for each no?
Yes.
> and how to get the controller from view I searsch in the doxygen api doc
> but didn't found a straight way to make it
bool a2dCanvasView::SetCanvasToolContr( a2dToolContr* controller );
a2dToolContr* a2dCanvasView::GetCanvasToolContr() { return
m_toolcontroller; }
They are not on a a2dView, because an a2dView has nothing to do with drawing,
it is like an abstract class to define
your own views. The Docview samples show you how to make simple derived View
classes for a specific goal.
a2dCanvasView is just a complicated one, special designed to view a part of an
a2dCanvasDocument.
As you see the docview framework is at the basis of the a2dCanvas and
a2dCanvasDocument and what not.
This makes it complex, but is what makes wxArt2D much more powerfull then just
a single canvas window with objects.
Klaas
--
Unclassified
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wxart2d-users_dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev