# Responses class

Namespace: [Grasshopper2.UI.Flex](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.flex.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public abstract class Responses
```

Class for handling UI responses.

## Constructors

- [Responses](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/ctor.md)

## Properties

- [CoordinatesContext](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/coordinatescontext.md): Gets the mouse coordinate system this responsive expects to operate in.
- [HadEffect](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/hadeffect.md): Indicates whether this responsive has actually performed an effect during its current interaction. Returning `false` tells the dispatcher that a [Response.Release](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md) from this responsive should be downgraded to [Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md), so other dispatch paths (e.g. context menu population) still get a chance to handle the same event. Default is `true`: regular responsives consume the event whenever they release focus. Transient interactions like Pan / Zoom override this to false while idle so a no-drag RMB click can still pop a context menu.
- [HasFocus](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/hasfocus.md): Gets or sets whether this responsive currently has focus. This is set by the hosting control; there is no need to set it yourself.
- [RegionBoundary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/regionboundary.md): Gets or sets the boundary of this region. When the mouse is outside of this boundary, it is assumed to not be relevant to this responsive. Within the boundary additional filtering may be in effect.
- [RegionFilter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/regionfilter.md): Gets or sets the additional coincidence filter for within the region. If unset, the [Responses.RegionBoundary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/regionboundary.md) is assumed to represent this responsive object exactly. The delegate should return false, if the given point is not considered to be coincident with this responsive.

## Methods

- [InvokeKeyRelay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/invokekeyrelay.md): (static) Walk a key-event hook's invocation list and return the first non-[Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md) result. See [Responses.InvokeMouseRelay(Func<ResponseMouseArgs, Response>, ResponseMouseArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/invokemouserelay.md) for rationale.
- [InvokeMouseRelay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/invokemouserelay.md): (static) Walk a hook event's invocation list and return the first non-[Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md) result. Returns [Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md) if no handler is subscribed or none consumed the event. Used to give attribute-subclass subscribers a chance to handle an event after the Responder's own logic has declined it.
- [InvokeRotationRelay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/invokerotationrelay.md): (static) Walk a rotation-gesture hook's invocation list and return the first non-[Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md) result. See [Responses.InvokeMouseRelay(Func<ResponseMouseArgs, Response>, ResponseMouseArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/invokemouserelay.md) for rationale.
- [InvokeTextInputRelay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/invoketextinputrelay.md): (static) Walk a text-input hook's invocation list and return the first non-[Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md) result. See [Responses.InvokeMouseRelay(Func<ResponseMouseArgs, Response>, ResponseMouseArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/invokemouserelay.md) for rationale.
- [IsCoincident](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/iscoincident.md): Test for point-region coincidence. Both coordinate-system locations are supplied; this method internally picks the one matching this responder's [Responses.CoordinatesContext](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/coordinatescontext.md), so callers don't have to know which system each responder operates in.
- [KeyDown](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/keydown.md): Called when this responsive has focus and there's a key down event. May also be called if the cursor is over this responsive. Depends on the host.
- [KeyUp](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/keyup.md): Called when this responsive has focus and there's a key up event. May also be called if the cursor is over this responsive. Depends on the host.
- [MouseDoubleClick](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousedoubleclick.md): Called when the mouse goes down and up twice over this responsive without moving too much in between.
- [MouseDown](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousedown.md): Called when one of the mouse buttons goes down over this responsive region.
- [MouseDrag](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousedrag.md): Called when the mouse moves while one or more buttons are pressed. For this method to be invoked the preceding [Responses.MouseDown(ResponseMouseArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousedown.md) call has to return [Response.Capture](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md). Only the focused responsive receives this call.
- [MouseLeave](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mouseleave.md): Called when the hosting control detects the mouse leaves this responsive region.
- [MouseOver](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mouseover.md): Called when the mouse moves over this responsive without any pressed buttons. Fires on every cursor motion while the cursor is over the responsive (not a delayed "dwell" event — use [FlexControl.MouseDwell](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.flexcontrol/mousedwell.md) for that). Only the responsive currently under the cursor receives this call. Returns void: hover dispatch cannot transition a responsive into focus (Capture only comes from MouseDown), so a Response would be vestigial. If your hover handling changes visible state, call [Responses.OnRedrawRequired()](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/onredrawrequired.md) or update through an InvalidateDisplay path.
- [MouseSingleClick](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousesingleclick.md): Called when the mouse goes down and up over this responsive without moving too much in between.
- [MouseUp](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mouseup.md): Called when one of the mouse buttons goes up, after a [Responses.MouseDown(ResponseMouseArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousedown.md) call to this same responsive.
- [MouseWheel](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousewheel.md): Called when the mouse wheel spins while the cursor is over this responsive.
- [OnRedrawRequired](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/onredrawrequired.md): Raise the [Responses.RedrawRequired](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/redrawrequired.md) event.
- [Rotation](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/rotation.md): Called when a rotation gesture is recognized over this responsive. The rotation delta is in clockwise degrees.
- [TextInput](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/textinput.md): Called when this responsive has focus and there's a text input event.

## Events

- [GotFocus](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/gotfocus.md): Raised whenever focus is set to this responsive.
- [KeyDownHook](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/keydownhook.md): Fires when [Responses.KeyDown(KeyEventArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/keydown.md)'s own logic would return [Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md).
- [KeyUpHook](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/keyuphook.md): Fires when [Responses.KeyUp(KeyEventArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/keyup.md)'s own logic would return [Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md).
- [LostFocus](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/lostfocus.md): Raised whenver focus is removed from this responsive.
- [MouseDoubleClickHook](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousedoubleclickhook.md): Fires when [Responses.MouseDoubleClick(ResponseMouseArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousedoubleclick.md)'s own logic would return [Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md).
- [MouseDownHook](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousedownhook.md): Fires when [Responses.MouseDown(ResponseMouseArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousedown.md)'s own logic would return [Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md). Subscribers handle the event in subscription order; the first to return a non-`Ignored` result wins.
- [MouseDragHook](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousedraghook.md): Fires when [Responses.MouseDrag(ResponseMouseArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousedrag.md)'s own logic would return [Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md).
- [MouseLeaveHook](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mouseleavehook.md): Fires after [Responses.MouseLeave()](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mouseleave.md)'s own logic completes. Allows attribute subclasses to plug additional leave behaviour into a base class's Responder.
- [MouseOverHook](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mouseoverhook.md): Fires after [Responses.MouseOver(ResponseMouseArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mouseover.md)'s own logic completes. Allows subclasses to plug additional hover behaviour into a base class's Responder.
- [MouseSingleClickHook](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousesingleclickhook.md): Fires when [Responses.MouseSingleClick(ResponseMouseArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousesingleclick.md)'s own logic would return [Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md).
- [MouseUpHook](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mouseuphook.md): Fires when [Responses.MouseUp(ResponseMouseArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mouseup.md)'s own logic would return [Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md).
- [MouseWheelHook](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousewheelhook.md): Fires when [Responses.MouseWheel(ResponseMouseArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/mousewheel.md)'s own logic would return [Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md).
- [RedrawRequired](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/redrawrequired.md): Raised whenever this responsive wants its host to redraw. Hosting controls are expected to subscribe and call ScheduleRedraw/Invalidate.
- [RotationHook](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/rotationhook.md): Fires when [Responses.Rotation(ResponseRotationArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/rotation.md)'s own logic would return [Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md).
- [TextInputHook](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/textinputhook.md): Fires when [Responses.TextInput(TextInputEventArgs)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.responses/textinput.md)'s own logic would return [Response.Ignored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.response.md).
