Hi All,
We're trying to implement editing ability with wxArt2d, without using
the a2dEditorFrame, because we want the editor to be a part of our
application, not our whole application. We're currently attempting to
get a2dStToolContr working, but are not sure if that is the correct
solution. We want the user to be able to select tools and draw shapes
on the canvas, and then we need to be able to get information about the
shapes from the canvas.
Current problems with a2dStToolContr:
- we are unable to switch tools. Whatever is pushed last is the only
tool available. Have tried enabling a given tool and marking the
"disable all others" flag, but this has no effect. Have tried disabling
the only other tool that has been pushed to the tool control, this also
doesn't work.
- we cannot change from the default fill of black. Have tried to
SetDrawMode(a2dWIREFRAME) but this also doesn't do anything.
We've noticed that some editor examples came with wxArt2d, but have also
noticed that they call functions that don't exist. The code is incorrect
and does not work.
Also the documentation for the editor classes is incomplete, with large
chunks missing, and sometimes function prototype comments do not
actually match the function prototype.
All of this makes it very difficult to use the editing capabilities, and
we need a good solid example. The initialization code follows (note:
cnvsCamera is the a2dCanvas*)
void MyFrame::SetupEditor(void)
{
// Link an editor to the a2dCanvas.
m_ToolControl = new a2dStToolContr(cnvsCamera->GetCanvasView(), this);
m_RectDraw = new a2dDrawRectangleTool(m_ToolControl);
m_RectDraw->SetName(_T("Square"));
m_PolyDraw = new a2dDrawPolygonLTool(m_ToolControl);
m_PolyDraw->SetName(_T("poly"));
m_ToolControl->PushTool(m_RectDraw);
m_ToolControl->PushTool(m_PolyDraw);
m_ToolControl->EnableTool(m_RectDraw, true);
m_ToolControl->DisableTool(m_PolyDraw);
m_ToolControl->SetDrawMode(a2dWIREFRAME);
}
In this example, the result is that the editor tries to draw polygons
with a black background.
-Mike
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev