GH_DragInfo

public class GH_DragInfo
Contains data used for UI drag operations.

Constructors

GH_DragInfo

#
public GH_DragInfo(Point drag_point, Rectangle initial_shape)
Create a new DragInfo instance.
drag_point (Point)Start point of drag op.
initial_shape (Rectangle)Initial shape associated with drag op.

Properties

Box_Drag

#
public Rectangle Box_Drag { get; }
Gets the dimensions of the box as a result of the dragging op.

Box_Start

#
public Rectangle Box_Start { get; }
Gets the dimensions of the drag box prior to dragging.

Constraint

#
public GH_Constraint Constraint { get; set; }
Gets or sets the directional constraint for the drag operation.

Point_Drag

#
public Point Point_Drag { get; }
Gets the cursor location at the current moment.

Point_Start

#
public Point Point_Start { get; }
Gets the cursor location at the start of the drag.

Region

#
public Rectangle Region { get; set; }
Gets or sets the drag limits. If the region is Rectangle.Empty then the region is ignored. For valid results the Region should be larger than the dimensions of the drag box.

Methods

Drag

#
public void Drag(Point new_point)
Call this method to adjust the drag data. Results will be automatically constrained and limited.
new_point (Point)New location of cursor.