a2dDragTool Class Reference
[Objects used for interactive manipulation.]

Interactive drag an object. More...

#include <sttool.h>

Inheritance diagram for a2dDragTool:

Inheritance graph
[legend]
Collaboration diagram for a2dDragTool:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dDragTool (a2dStToolContr *controller)
 constructor
 ~a2dDragTool ()
 destructor
bool ZoomSave ()
 Is Zooming while the tool is busy Save.
void SetDeleteOnOutsideDrop (bool val)
 If set to true, the dragged object is deleted if dropped outside of the window.
void CaptureMouse ()
 redirect all mouse events for the canvas to this object
void ReleaseMouse ()
 release the mouse capture for this object
void Render ()
 implement rendering
virtual void AdjustShift (double *x, double *y)
 This is overriden by copy tools to have a minimum distance between original and copy.

Static Public Attributes

static const a2dCommandId COMID_PushTool_Drag
 push this tool on the tools stack

Protected Member Functions

void OnChar (wxKeyEvent &event)
 called on key events
void OnMouseEvent (wxMouseEvent &event)
 called on mouse events
virtual bool EnterBusyMode ()
 starts a new action (e.g drawing something ) in a tool that is already pushed.
virtual void FinishBusyMode (bool closeCommandGroup=true)
 Called when the user finishes editing a distinct object */.
virtual void AbortBusyMode ()
 Called when the user aborts editing a distinct object */.
virtual void DragAbsolute (double x, double y)
 called when dragging is in progress
virtual wxString GetCommandGroupName ()
 return the command group name for commands of a derived class
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

a2dAffineMatrix m_transform
 old transform
bool m_wasMayConnect
 allow connecting to other obejcts
bool m_lateconnect
 connect when released
bool m_mousecaptured
 is mouse captured during drag
bool m_deleteonoutsidedrop
 if true, the dragged object is deleted, if it is dropped outside of the window
double m_startObjectx
 hold start of drag
double m_startObjecty
 hold start of drag
double m_startMousex
 hold start of drag
double m_startMousey
 hold start of drag
a2dCanvasObjectList m_connectedwirecopies
 List of wires connected to the draged object.


Detailed Description

Interactive drag an object.

Uses the dragmode set for the controller.

Remarks:
Left Click and drag.

Key left right up down to move while draging active (Left Down)

See also:
a2dStToolContr

Definition at line 903 of file sttool.h.


Member Function Documentation

bool a2dDragTool::ZoomSave (  )  [inline, virtual]

Is Zooming while the tool is busy Save.

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

Implements a2dBaseTool.

Reimplemented in a2dDragNewTool, and a2dCopyTool.

Definition at line 917 of file sttool.h.

void a2dDragTool::Render (  )  [virtual]

implement rendering

in general is rendering for tools just to draw/render m_canvasobject when set.

Reimplemented from a2dStTool.

Definition at line 2642 of file sttool.cpp.

bool a2dDragTool::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.

Reimplemented in a2dDragNewTool.

Definition at line 2756 of file sttool.cpp.

void a2dDragTool::FinishBusyMode ( bool  closeCommandGroup = true  )  [protected, virtual]

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

See also:
EnterBusyMode,

GetActive You should call the base class (this) version at the END of your function

Reimplemented from a2dStTool.

Reimplemented in a2dDragNewTool.

Definition at line 2779 of file sttool.cpp.

void a2dDragTool::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 2842 of file sttool.cpp.

virtual wxString a2dDragTool::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 a2dDragNewTool, and a2dCopyTool.

Definition at line 945 of file sttool.h.

bool a2dDragTool::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.

Reimplemented in a2dCopyTool.

Definition at line 2903 of file sttool.cpp.


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