Class MoveTool
Interactive tool for moving nodes on a diagram.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Windows.dll
Syntax
public class MoveTool : Tool, IDisposable
Remarks
Constructors
MoveTool(DiagramController, Tool, Node)
Initializes a new instance of the MoveTool class.
Declaration
public MoveTool(DiagramController controller, Tool toolPrevious, Node nodeAdded)
Parameters
Type | Name | Description |
---|---|---|
DiagramController | controller | The controller. |
Tool | toolPrevious | The tool previous. |
Node | nodeAdded | The node added. |
Fields
m_currentOffset
Offset of current mouse position from the original mouse position in client coordinates.
Declaration
protected SizeF m_currentOffset
Field Value
Type |
---|
System.Drawing.SizeF |
Properties
DragCopyOffset
Gets or sets offset to clone moved node with using Ctrl key.
Declaration
public float DragCopyOffset { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The drag copy offset. |
Moved
Gets a value indicating whether move tool has moved nodes it is operating with.
Declaration
public bool Moved { get; }
Property Value
Type |
---|
System.Boolean |
NodesToMove
Gets node collection to move on mouse up.
Declaration
protected NodeCollection NodesToMove { get; }
Property Value
Type |
---|
NodeCollection |
Snapshots
Gets the snapshots hashtable where key is control node and value - image cache.
Declaration
protected Hashtable Snapshots { get; }
Property Value
Type | Description |
---|---|
System.Collections.Hashtable | The snapshots. |
Methods
Abort()
Aborts tool actions.
Declaration
public override Tool Abort()
Returns
Type | Description |
---|---|
Tool | The tool to abort. |
Overrides
CanMove()
Checks whether move command can be performed.
Declaration
protected virtual bool CanMove()
Returns
Type | Description |
---|---|
System.Boolean | true, if can move. |
DeactivateTool()
Deactivates the tool.
Declaration
public override void DeactivateTool()
Overrides
Dispose()
Declaration
public override void Dispose()
Overrides
Draw(Graphics)
Draws the specified graphics.
Declaration
public override void Draw(Graphics gfx)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Graphics to draw on. |
Overrides
GetAllowedNodes(NodeCollection)
Returns a collection of nodes that are allowed to move.
Declaration
protected NodeCollection GetAllowedNodes(NodeCollection nodesIn)
Parameters
Type | Name | Description |
---|---|---|
NodeCollection | nodesIn | Nodes to test. |
Returns
Type | Description |
---|---|
NodeCollection | Collection of nodes that can move. |
GetCurrentOffset()
Get move offset with origin offsets in client coordinates.
Declaration
protected virtual SizeF GetCurrentOffset()
Returns
Type | Description |
---|---|
System.Drawing.SizeF | Current move offset with origin offsets. |
MoveNodes()
Move the nodes to current offset.
Declaration
protected virtual void MoveNodes()
OnOriginChanged(ViewOriginEventArgs)
Raise the origin changed event.
Declaration
protected override void OnOriginChanged(ViewOriginEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
ViewOriginEventArgs | evtArgs | The ViewOriginEventArgs instance containing the event data. |
Overrides
ProcessDoubleClick(MouseEventArgs)
Processes the double click.
Declaration
public override Tool ProcessDoubleClick(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs | The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Tool | The tool. |
Overrides
ProcessMouseDown(MouseEventArgs)
Processes the mouse down.
Declaration
public override Tool ProcessMouseDown(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs | The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Tool | The tool. |
Overrides
ProcessMouseMove(MouseEventArgs)
Processes the mouse move.
Declaration
public override Tool ProcessMouseMove(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs | The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Tool | The tool. |
Overrides
ProcessMouseUp(MouseEventArgs)
Processes the mouse up.
Declaration
public override Tool ProcessMouseUp(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs | The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Tool | The tool. |
Overrides
UpdateMoveOffset(Node, SizeF)
Updates the move offset.
Declaration
protected SizeF UpdateMoveOffset(Node nodeMoving, SizeF szMovingOffset)
Parameters
Type | Name | Description |
---|---|---|
Node | nodeMoving | The moving node. |
System.Drawing.SizeF | szMovingOffset | The offset. |
Returns
Type | Description |
---|---|
System.Drawing.SizeF | The size of the offset. |