GH_CanvasMouseEvent

EventArgsReferences
Class used in Canvas UI events.

Constructors

GH_CanvasMouseEvent

#
public GH_CanvasMouseEvent()
Blank constructor.

GH_CanvasMouseEvent

#
public GH_CanvasMouseEvent(GH_Viewport vp, MouseEventArgs e_args)
Constructor.
vp (GH_Viewport)The current canvas viewport state.
e_args (MouseEventArgs)Original mouse event args.

GH_CanvasMouseEvent

#
public GH_CanvasMouseEvent(Point pt_control, PointF pt_canvas, MouseButtons mButton, int iClicks = 0, int iDelta = 0)
Constructor.
pt_control (Point)Cursor location in control pixel coordinates.
pt_canvas (PointF)Cursor location in canvas unit coordinates.
mButton (MouseButtons)Currently pressed mouse buttons.
iClicks (int = 0)Number of times the buttons were pressed and released.
iDelta (int = 0)A signed count of the number of detents the mouse wheel has rotated.

Properties

Button

#
public MouseButtons Button { get; }
Gets which mouse button was pressed.

CanvasLocation

#
public PointF CanvasLocation { get; }
Gets the location of the cursor in canvas unit coordinates.

CanvasX

#
public float CanvasX { get; }
Gets the x-coordinate of the cursor location in canvas unit coordinates.

CanvasY

#
public float CanvasY { get; }
Gets the y-coordinate of the cursor location in canvas unit coordinates.

Clicks

#
public int Clicks { get; }
Gets the number of times the mouse button was pressed and released.

ControlLocation

#
public Point ControlLocation { get; }
Gets the location of the cursor in control pixel coordinates.

ControlX

#
public int ControlX { get; }
Gets the x-coordinate of the cursor location in control pixel coordinates.

ControlY

#
public int ControlY { get; }
Gets the y-coordinate of the cursor location in control pixel coordinates.

Delta

#
public int Delta { get; }
Gets a signed count of the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel.

WinFormsEventArgs

#
public MouseEventArgs WinFormsEventArgs { get; }
Downcast this data into a Windows.Forms.MouseEventArgs instance.