WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class UITool - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    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
    System.Object
    Tool
    UITool
    ConnectionPointTool
    LineBaseTool
    PanTool
    PolyLineBase
    RectangleToolBase
    SelectTool
    ZoomTool
    Implements
    System.IDisposable
    Inherited Members
    Tool.m_ConnectorSourceEventArgs
    Tool.m_ConnectorTargetEventArgs
    Tool.m_rulerDisplayRect
    Tool.m_toolPreceding
    Tool.m_ptStartOrigin
    Tool.Abort()
    Tool.Draw(Graphics)
    Tool.ActivateTool()
    Tool.DeactivateTool()
    Tool.ProcessMouseUp(MouseEventArgs)
    Tool.ProcessKeyUp(KeyEventArgs)
    Tool.ProcessKeyPress(KeyPressEventArgs)
    Tool.ProcessKeyDown(KeyEventArgs)
    Tool.ProcessClick()
    Tool.ProcessDoubleClick(MouseEventArgs)
    Tool.GetSelectionList()
    Tool.OnConnectorChanging(EndPointChangingEventArgs)
    Tool.UpdateConnnectorChangeEvent(IEndPointContainer, ConnectionPoint, ConnectionPoint)
    Tool.OnOriginChanged(ViewOriginEventArgs)
    Tool.GetLocalPoint(Node, PointF)
    Tool.GetPortBounds(ConnectionPoint, Single)
    Tool.CanInsert(Node)
    Tool.UpdateCursor(Boolean)
    Tool.AppendParentTransformations(PointF, Node)
    Tool.GetFullRotationAngle(Node)
    Tool.QuiteBoundarySet(Boolean)
    Tool.QuiteBridgingSet(Boolean)
    Tool.GetPointOffset(PointF, Node)
    Tool.SmartSnap(PointF, SizeF)
    Tool.CheckBoundaryConstraints(Node, Matrix)
    Tool.CanAddNode(Rectangle)
    Tool.MakeControlNodeSnapshot(ControlNode)
    Tool.GetInsideNodeAt(PointF)
    Tool.GetOriginOffset()
    Tool.GetStartPoint(Boolean)
    Tool.GetCurrentPoint(Boolean)
    Tool.GetFrameRectangle(Boolean)
    Tool.GetSnapStartPoint()
    Tool.GetSnapCurrentPoint()
    Tool.DrawRenderHelper(Node, Graphics)
    Tool.DrawRenderHelper(Node, Graphics, Rectangle)
    Tool.UpdatePortRefreshRect(ConnectionPoint, Rectangle)
    Tool.GetEndPointLocation(ConnectionPoint, PointF)
    Tool.CheckConnectionPossibility(PointF)
    Tool.CheckConnectionCenterPort(PointF)
    Tool.ApplyDecorator(Decorator, Decorator)
    Tool.OutlineConnectionPoint(Graphics, ConnectionPoint)
    Tool.SnapToPort(PointF, SizeF)
    Tool.SnapToPort(PointF, SizeF, Node)
    Tool.DrawFrameAroundPort(Graphics, ConnectionPoint)
    Tool.HighlightCenterPortContainer(Graphics, ConnectionPoint)
    Tool.GetNodeUnderEndPoint(PointF)
    Tool.CanRender
    Tool.ToolWorkRect
    Tool.WorkRectPrev
    Tool.WorkRect
    Tool.RulerHeight
    Tool.Name
    Tool.PrecedingTool
    Tool.InAction
    Tool.StartPoint
    Tool.CurrentPoint
    Tool.Controller
    Tool.SingleActionTool
    Tool.ToolCursor
    Tool.ActionCursor
    Tool.CurrentToolCursor
    Tool.CurrentCursor
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    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

    true if this tool can be activate on specified current point; otherwise, false.

    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

    true if this tool can be activate on specified current point; otherwise, false.

    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

    true if this segment tool can be activate on specified point; otherwise, false.

    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

    true if this move tool tool can be activate on specified nodeHit; otherwise, false.

    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

    true if this pin move tool can be activate on specified point; otherwise, false.

    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

    true if this pin move tool can be activate on specified point; otherwise, false.

    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

    true if this resize tool tool can be activate on specified nodeHit; otherwise, false.

    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

    true if this resize tool tool can be activate on specified nodeHit; otherwise, false.

    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

    true if this rotate tool can be activate on specified point; otherwise, false.

    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

    true if this rotate tool can be activate on specified point; otherwise, false.

    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

    true if this segment relative tool can be activate on specified point; otherwise, false.

    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

    true if this segment relative tool can be activate on specified point; otherwise, false.

    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

    true if this vertex delete command can activate with specified node hit; otherwise, false.

    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

    true if this vertex insert command can activate with specified node hit; otherwise, false.

    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

    true if this vertex move tool tool can be activate on specified nodeHit; otherwise, false.

    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

    true if this vertex add/remove tool can be activate on specified point; otherwise, false.

    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

    true if this vertex add/remove tool can be activate on specified point; otherwise, false.

    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
    Tool.Dispose()

    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

    true if return true node in vertex edit mode; otherwise, false.

    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
    Tool.ProcessMouseDown(MouseEventArgs)

    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
    Tool.ProcessMouseMove(MouseEventArgs)

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved