Class UITool
The UITool is an abstract class, which is used to implement the interactive actions of users like move, resize, rotate, and more for an object in the Diagram control.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Windows.dll
Syntax
public abstract class UITool : Tool, IDisposable
Constructors
UITool(DiagramController, String)
Initializes a new instance of the UITool class.
Declaration
public UITool(DiagramController controller, string name)
Parameters
Type | Name | Description |
---|---|---|
DiagramController | controller | The controller. |
System.String | name | The name. |
Properties
ToolToActivate
Gets or sets the tool to activate.
Declaration
protected SingleActionTools ToolToActivate { get; set; }
Property Value
Type | Description |
---|---|
SingleActionTools | The tool to activate. |
Methods
CanActivateControlPointMoveTools(PointF)
Determines whether this control point move tool can be activate on specified point.
Declaration
protected virtual bool CanActivateControlPointMoveTools(PointF ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF | ptCurrent | The current point. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateEndPointMoveTools(PointF)
Determines whether this end point tool can be activate on specified point.
Declaration
protected virtual bool CanActivateEndPointMoveTools(PointF ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF | ptCurrent | The current point. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateLineSegmentTool(PathNode, PointF)
Determines whether this line segment tool can be activate on given point.
Declaration
protected virtual bool CanActivateLineSegmentTool(PathNode nodeHit, PointF ptLocation)
Parameters
Type | Name | Description |
---|---|---|
PathNode | nodeHit | The node under mouse. |
System.Drawing.PointF | ptLocation | The current point. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateMoveTool(PointF)
Determines whether this move tool can be activate on on specified nodeHit.
Declaration
protected virtual bool CanActivateMoveTool(PointF ptMouseLocation)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF | ptMouseLocation | The current mouse location. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivatePinMoveTool(Point)
Determines whether this pin move tool can be activate on given point.
Declaration
[Obsolete("Use CanActivatePinMoveTool() method with one PointF parameter from more accuracy.")]
protected virtual bool CanActivatePinMoveTool(Point ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | ptCurrent | The current point. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivatePinMoveTool(PointF)
Determines whether this pin move tool can be activate on given point.
Declaration
protected virtual bool CanActivatePinMoveTool(PointF ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF | ptCurrent | The current point. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateResizeTool(Point)
Determines whether this resize tool can be activate on on specified nodeHit.
Declaration
[Obsolete("Use CanActivateResizeTool() method with one PointF parameter from more accuracy.")]
protected virtual bool CanActivateResizeTool(Point ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | ptCurrent | The current mouse location. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateResizeTool(PointF)
Determines whether this resize tool can be activate on on specified nodeHit.
Declaration
protected virtual bool CanActivateResizeTool(PointF ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF | ptCurrent | The current mouse location. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateRotateTool(Point)
Determines whether this rotate tool can be activate on given point.
Declaration
[Obsolete("Use CanActivateRotateTool() method with one PointF parameter from more accuracy.")]
protected virtual bool CanActivateRotateTool(Point ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | ptCurrent | The current point. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateRotateTool(PointF)
Determines whether this rotate tool can be activate on given point.
Declaration
protected virtual bool CanActivateRotateTool(PointF ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF | ptCurrent | The current point. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateSegmentRelatingTools(Point)
Determines whether this segments relative tool can be activate on given point.
Declaration
[Obsolete("Use CanActivateSegmentRelatingTools() method with one PointF parameter from more accuracy.")]
protected virtual bool CanActivateSegmentRelatingTools(Point ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | ptCurrent | The current point. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateSegmentRelatingTools(PointF)
Determines whether this segments relative tool can be activate on given point.
Declaration
protected virtual bool CanActivateSegmentRelatingTools(PointF ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF | ptCurrent | The current point. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateVertexDeleteCommand(PathNode)
Determines whether this vertex delete command can be activated with specified node hit.
Declaration
protected virtual bool CanActivateVertexDeleteCommand(PathNode nodeHit)
Parameters
Type | Name | Description |
---|---|---|
PathNode | nodeHit | The node hit. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateVertexInsertCommand(PathNode, PointF)
Determines whether this vertex insert command can be activated with specified node hit.
Declaration
protected virtual bool CanActivateVertexInsertCommand(PathNode nodeHit, PointF ptTesting)
Parameters
Type | Name | Description |
---|---|---|
PathNode | nodeHit | The node hit. |
System.Drawing.PointF | ptTesting | The point testing. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateVertexMoveTool(PathNode, PointF)
Determines whether this vertex move tool can be activate on on specified nodeHit.
Declaration
protected virtual bool CanActivateVertexMoveTool(PathNode nodeHit, PointF ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
PathNode | nodeHit | The node hit. |
System.Drawing.PointF | ptCurrent |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateVertexRelatingTools(Point)
Determines whether this vertex add/remove tool can be activate on given point.
Declaration
[Obsolete("Use CanActivateVertexRelatingTools() method with one PointF parameter from more accuracy.")]
protected virtual bool CanActivateVertexRelatingTools(Point ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | ptCurrent | The current point. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanActivateVertexRelatingTools(PointF)
Determines whether this vertex add/remove tool can be activate on given point.
Declaration
protected virtual bool CanActivateVertexRelatingTools(PointF ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF | ptCurrent | The current point. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Check(Point)
Checks for possibility tool activate.
Declaration
public void Check(Point ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | ptCurrent | The pt current. |
Check(PointF)
Checks for possibility tool activate.
Declaration
public void Check(PointF ptCurrent)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF | ptCurrent | The pt current. |
Dispose()
Declaration
public override void Dispose()
Overrides
GetCursor(BoxPosition, Node)
Gets the cursor.
Declaration
public static Cursor GetCursor(BoxPosition handlePos, Node node)
Parameters
Type | Name | Description |
---|---|---|
BoxPosition | handlePos | The handle position. |
Node | node | The node. |
Returns
Type | Description |
---|---|
System.Windows.Forms.Cursor | The cursor. |
IsVertexEditMode(Node)
Determines whether this node in vertex edit mode.
Declaration
protected virtual bool IsVertexEditMode(Node node)
Parameters
Type | Name | Description |
---|---|---|
Node | node | The node. |
Returns
Type | Description |
---|---|
System.Boolean |
|
PerformHandleMove(MouseEventArgs)
Performs the pin move.
Declaration
protected virtual Tool PerformHandleMove(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. |
PerformLineSegmentMove(MouseEventArgs)
Performs the line segment move.
Declaration
protected virtual Tool PerformLineSegmentMove(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. |
PerformMove(MouseEventArgs)
Activate MoveTool and process its MouseDown.
Declaration
protected virtual Tool PerformMove(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs | Event args |
Returns
Type | Description |
---|---|
Tool | true, if move. |
PerformPinMove(MouseEventArgs)
Performs the pin move.
Declaration
protected virtual Tool PerformPinMove(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. |
PerformResize(MouseEventArgs)
Activate ResizeTool and process its MouseDown.
Declaration
protected virtual Tool PerformResize(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs | Event args |
Returns
Type | Description |
---|---|
Tool | The tool to resize. |
PerformRotate(MouseEventArgs)
Performs the rotate.
Declaration
protected virtual Tool PerformRotate(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 rotate tool. |
PerformVertexMove(MouseEventArgs)
Performs the vertex move.
Declaration
protected virtual Tool PerformVertexMove(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. |
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. |