ResponseMouseArgs

References
public sealed class ResponseMouseArgs
Mouse event payload delivered to Responses handlers. Mirrors MouseEventArgs but carries the cursor location in both Control and Content coordinate systems, holds a reference to the host control, and exposes an Invalidate() method that schedules a redraw without the responder having to subscribe to a separate event.

Constructors

ResponseMouseArgs

#
public ResponseMouseArgs(FlexControl host, MouseEventArgs eto)
Wrap a raw Eto MouseEventArgs from the host control. The wrapped event is assumed to carry the cursor location in Control (raw pixel) space — the Content-space location is computed lazily on first access via the host's projection. Do not pass an Eto event whose Location has already been mapped to Content space.
host (FlexControl)
eto (MouseEventArgs)

ResponseMouseArgs

#
public ResponseMouseArgs(MouseEventArgs eto, Control control = null)
Wrap an Eto MouseEventArgs without a Grasshopper-side host. Used by standalone Eto controls that embed a responder but don't themselves implement IFlexControl. In this mode there is no projection — ContentLocation equals ControlLocation — and Invalidate() falls back to Control.Invalidate() on the supplied fallback control (or is a no-op if null).
eto (MouseEventArgs)
control (Control = null)

Properties

Buttons

#
public MouseButtons Buttons { get; }
Pressed mouse buttons.

ContentLocation

#
public PointF ContentLocation { get; }
Cursor location in content-space (the host's projected coordinates). Computed lazily from ControlLocation via the host's projection on first access. Equals ControlLocation when there is no host (standalone Eto controls).

ControlLocation

#
public PointF ControlLocation { get; }
Cursor location in raw control-space pixels.

Delta

#
public SizeF Delta { get; }
Wheel delta (zero for non-wheel events).

Handled

#
public bool Handled { get; set; }
Whether this event has been marked handled. Mutating this also mutates the underlying Eto event so the original raise-site sees the change.

Modifiers

#
public Keys Modifiers { get; }
Keyboard modifiers pressed during the event.

Pressure

#
public float Pressure { get; }
Pen pressure (0..1) for pressure-sensitive input devices.

UnderlyingEtoEventArgs

#
[EditorBrowsable(EditorBrowsableState.Never)] public MouseEventArgs UnderlyingEtoEventArgs { get; }
Underlying Eto MouseEventArgs for handlers that still need it.

Methods

Invalidate

#
public void Invalidate()
Schedule a redraw on the hosting control.