a2dDrawPolygonLToolFast Class Reference
[Objects used for interactive manipulation.]

Interactive drawing of a polygon. More...

#include <sttool2.h>

Inheritance diagram for a2dDrawPolygonLToolFast:

Inheritance graph
[legend]
Collaboration diagram for a2dDrawPolygonLToolFast:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dDrawPolygonLToolFast (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_DrawPolygonLFast
 push this tool on the tools stack
static const a2dCommandId COMID_PushTool_DrawPolygonLFast_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)
bool CreateToolObjects ()
 Create the editcopy and other tool objects (e.g. decorations).
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_spline
 spline polygons
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 409 of file sttool2.h.


Constructor & Destructor Documentation

a2dDrawPolygonLToolFast::a2dDrawPolygonLToolFast ( 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 1809 of file sttool2.cpp.


Member Function Documentation

void a2dDrawPolygonLToolFast::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 1830 of file sttool2.cpp.

bool a2dDrawPolygonLToolFast::CreateToolObjects (  )  [protected, virtual]

Create the editcopy and other tool objects (e.g. decorations).

m_original must be set before this function is called

Reimplemented from a2dStDrawToolFast.

Reimplemented in a2dDrawPolylineLToolFast.

Definition at line 2107 of file sttool2.cpp.

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

return the command group name for commands of a derived class

this defaults to the class name

Reimplemented from a2dBaseTool.

Definition at line 461 of file sttool2.h.


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