






Setting the cursor tool
TCanvasPolygonCreationTool is instrumental in interacting with TCanvasView, or the main canvas view of GrafEdit. The current cursor tool is typically "set" through a menu or tool palette. For instance, MarsPresenter.C contains the code that creates a polygon menu item and associates it with this tool:
popup = new TMomentaryMenuItem (new TCursorToolSelectionState(new TCanvasPolygonCreationTool()));
popup->AdoptLabel (new TTextLabel (TStandardText("Polygon")));
toolsMenu->AdoptLast (popup);
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.
Generated with WebMaker