#include <sttool.h>


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. | |
Uses the dragmode set for the controller.
Key left right up down to move while draging active (Left Down)
Definition at line 903 of file sttool.h.
| 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.
| 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 */.
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 */.
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.
| 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.