a2dDrawPolygonLTool Class Reference
[Objects used for interactive manipulation.]

Interactive drawing of a polygon. More...

#include <sttool.h>

Inheritance diagram for a2dDrawPolygonLTool:

Inheritance graph
[legend]
Collaboration diagram for a2dDrawPolygonLTool:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dDrawPolygonLTool (a2dStToolContr *controller, a2dPolygonL *templateObject=NULL)
 constructor
bool ZoomSave ()
 save to zoom while drawing
void SetMode (int mode)
 mode of drawing, can be swicthed with Tab key.
void SetSpline (bool spline)
 certain drawing tools like polygon drawing use this setting
bool GetSpline ()
 certain drawing tools like polygon drawing use this setting

Static Public Attributes

static const a2dCommandId COMID_PushTool_DrawPolygonL
 push this tool on the tools stack
static const a2dCommandId COMID_PushTool_DrawPolygonL_Splined
 push this tool on the tools stack

Protected Member Functions

void OnIdle (wxIdleEvent &event)
 handler for idle events
void OnChar (wxKeyEvent &event)
 called on key events
void OnMouseEvent (wxMouseEvent &event)
 called on mouse events
void OnUndoEvent (a2dCommandProcessorEvent &event)
 handler for Undo event
void OnRedoEvent (a2dCommandProcessorEvent &event)
void AddPoint (a2dLineSegment *point)
virtual wxString GetCommandGroupName ()
 return the command group name for commands of a derived class

Protected Attributes

a2dSmrtPtr< a2dPolygonLm_templateObject
 object to clone to use as start
double m_prev_x
 previous x
double m_prev_y
 previous y
a2dVertexListm_points
 points sofar
a2dLineSegmentm_point
 last point
bool m_reverse
 end to begin wire.


Detailed Description

Interactive drawing of a polygon.

Remarks:
Left Click to add points.

Space bar or Double click to end drawing.

Cursor keys to shift object.

Cursor keys + control to shift point.

Right Click to zoom.

See also:
a2dStToolContr

Definition at line 1575 of file sttool.h.


Constructor & Destructor Documentation

a2dDrawPolygonLTool::a2dDrawPolygonLTool ( a2dStToolContr controller,
a2dPolygonL templateObject = NULL 
)

constructor

Parameters:
controller tool controller one which this tool is pushed.
templateObject when not NULL, this object is cloned and used for the new drawn object.

Definition at line 3731 of file sttool.cpp.


Member Function Documentation

void a2dDrawPolygonLTool::SetSpline ( bool  spline  ) 

certain drawing tools like polygon drawing use this setting

You might want to reset m_newObjectsGetCommandProcStyle also. Otherwise the command processor will overwrite what you set here

Definition at line 3763 of file sttool.cpp.

virtual wxString a2dDrawPolygonLTool::GetCommandGroupName (  )  [inline, protected, virtual]

return the command group name for commands of a derived class

this defaults to the class name

Reimplemented from a2dBaseTool.

Reimplemented in a2dDrawWirePolylineLTool, and a2dMeasureTool.

Definition at line 1625 of file sttool.h.


The documentation for this class was generated from the following files:
a2dDrawPolygonLTool Class Reference -- Tue Aug 31 18:24:28 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation