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

#
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.
public ResponseMouseArgs(
host,
MouseEventArgs
eto
)

ResponseMouseArgs

#
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).
public ResponseMouseArgs(
MouseEventArgs
eto,
Control
control = null
)

Properties

Buttons

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

ContentLocation

#
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).
public PointF ContentLocation { get; }

ControlLocation

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

Delta

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

Handled

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

Modifiers

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

Pressure

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

UnderlyingEtoEventArgs

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

Methods

Invalidate

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