a2dSimpleEditPolygonTool Class Reference
[Objects used for interactive manipulation.]

Simple (handle-less) wire editing tool intended as sub-tool for master tools. More...

#include <mastertool.h>

Inheritance diagram for a2dSimpleEditPolygonTool:

Inheritance graph
[legend]
Collaboration diagram for a2dSimpleEditPolygonTool:

Collaboration graph
[legend]

List of all members.

Public Types

enum  Action { action_movevertex, action_movesegment, action_insertvertex }

Public Member Functions

 a2dSimpleEditPolygonTool (a2dStToolContr *controller, a2dCanvasObject *hit, int index, int count, Action action)

Protected Member Functions

virtual bool EnterBusyMode ()
 starts a new action (e.g drawing something ) in a tool that is already pushed.
virtual void FinishBusyMode ()
virtual void AbortBusyMode ()
 Called when the user aborts editing a distinct object */.
virtual void DoStopTool (bool abort)
 to do tool specific stuff to stop a tool. Called from StopTool().
virtual bool ZoomSave ()
 Is Zooming while the tool is busy Save.
virtual wxString GetCommandGroupName ()
 return the command group name for commands of a derived class
void OnChar (wxKeyEvent &event)
 called on key events
void OnMouseEvent (wxMouseEvent &event)
 called on mouse events
virtual bool CreateToolObjects ()
 Create the editcopy and other tool objects (e.g. decorations).
virtual void CleanupToolObjects ()
 Cleanup the editcopy other tool objects (e.g. decorations).

Protected Attributes

int m_index
 Index of vertex / segment, that is edited.
int m_count
 Number of vertices.
Action m_action
 what to edit (vertex, segment, ...)
a2dSmrtPtr< a2dPolyHandleLm_handle
bool m_preserve_select
 preserve the a2dCANVAS_SELECT flag after editing.
a2dCanvasObjectList m_connectedwirecopies
 list of connected wire objects


Detailed Description

Simple (handle-less) wire editing tool intended as sub-tool for master tools.

This tool supports the following actions:

Definition at line 121 of file mastertool.h.


Member Function Documentation

bool a2dSimpleEditPolygonTool::EnterBusyMode (  )  [protected, virtual]

starts a new action (e.g drawing something ) in a tool that is already pushed.

Opens a new a2dCommandGroup, which will be closed at the end of an action. This is normally in FinishBusyMode(), but might be delayed when other tools are pushed, like the edit tool to further edit the drawn figure. This should become part of the same command group.

Reimplemented from a2dStTool.

Definition at line 632 of file mastertool.cpp.

void a2dSimpleEditPolygonTool::AbortBusyMode (  )  [protected, virtual]

Called when the user aborts editing a distinct object */.

See also:
EnterBusyMode This is supposed to undo aeverything the tool did since entering busy mode

Reimplemented from a2dStTool.

Definition at line 668 of file mastertool.cpp.

virtual bool a2dSimpleEditPolygonTool::ZoomSave (  )  [inline, protected, virtual]

Is Zooming while the tool is busy Save.

If so, the active tool will redraw itself in the new Mapping state

Implements a2dBaseTool.

Definition at line 140 of file mastertool.h.

virtual wxString a2dSimpleEditPolygonTool::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 141 of file mastertool.h.

bool a2dSimpleEditPolygonTool::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 a2dStTool.

Definition at line 776 of file mastertool.cpp.


Member Data Documentation

this is used to simulate a handle attached to the object, by adding

Definition at line 165 of file mastertool.h.

preserve the a2dCANVAS_SELECT flag after editing.

selection is cleared in a2dCanvasObject::StartEdit

Definition at line 169 of file mastertool.h.


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