Class RectangleToolBase
Base class for tools that draw tracking rectangles.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Windows.dll
Syntax
public abstract class RectangleToolBase : UITool, IDisposable
Remarks
This class provides a base implementation for tools that require the user to draw a rectangle. When a mouse down event is received, the point at which the event occurred becomes the first point in the rectangle. As the mouse moves, the rectangle is tracked.
ToolConstructors
RectangleToolBase(DiagramController, String)
Initializes a new instance of the RectangleToolBase class.
Declaration
public RectangleToolBase(DiagramController controller, string name)
Parameters
Type | Name | Description |
---|---|---|
DiagramController | controller | The controller. |
System.String | name | The name. |
Properties
RenderingHelper
Gets the rendering helper node created from original.
Declaration
protected Node RenderingHelper { get; }
Property Value
Type | Description |
---|---|
Node | The rendering helper. |
Methods
ActionComplete(Node)
Method used to perform additional actions after node is inserted into document ( start TextEditor after Text node is inserted into document for example )
Declaration
protected virtual void ActionComplete(Node nodeInserted)
Parameters
Type | Name | Description |
---|---|---|
Node | nodeInserted | node inserted into document |
CreateNode(RectangleF)
Creates the node from given rectangle base.
Declaration
protected abstract Node CreateNode(RectangleF rectBounding)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | rectBounding | The bounding rectangle. |
Returns
Type | Description |
---|---|
Node | The rectangle node. |
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
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 rectangle 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 rectangle 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 rectangle tool. |