Constructors
Properties
CoordinatesContext
#public CoordinateSystem CoordinatesContext { get; }
Gets the mouse coordinate system this responsive expects to operate in.
HadEffect
#Indicates whether this responsive has actually performed an effect during its current interaction. Returning
false tells the dispatcher that a Response.Release from this responsive should be downgraded to Response.Ignored, 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
#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
#public RectangleF RegionBoundary { get; set; }
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
#Gets or sets the additional coincidence filter for within the region. If unset, the RegionBoundary 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
#Walk a key-event hook's invocation list and return the first non-Response.Ignored result. See InvokeMouseRelay(Func<ResponseMouseArgs, Response>, ResponseMouseArgs) for rationale.
InvokeMouseRelay
#protected static Response InvokeMouseRelay(Func<ResponseMouseArgs, Response> hook, ResponseMouseArgs e)
Walk a hook event's invocation list and return the first non-Response.Ignored result. Returns Response.Ignored 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.
Parameters:
| hook (Func<ResponseMouseArgs, Response>) | |
| e (ResponseMouseArgs) |
InvokeRotationRelay
#protected static Response InvokeRotationRelay(Func<ResponseRotationArgs, Response> hook, ResponseRotationArgs e)
Walk a rotation-gesture hook's invocation list and return the first non-Response.Ignored result. See InvokeMouseRelay(Func<ResponseMouseArgs, Response>, ResponseMouseArgs) for rationale.
Parameters:
| hook (Func<ResponseRotationArgs, Response>) | |
| e (ResponseRotationArgs) |
InvokeTextInputRelay
#Walk a text-input hook's invocation list and return the first non-Response.Ignored result. See InvokeMouseRelay(Func<ResponseMouseArgs, Response>, ResponseMouseArgs) for rationale.
IsCoincident
#Test for point-region coincidence. Both coordinate-system locations are supplied; this method internally picks the one matching this responder's CoordinatesContext, so callers don't have to know which system each responder operates in.
Parameters:
| controlPoint (PointF) | Cursor location in raw control-space pixels. |
| contentPoint (PointF) | Cursor location in content-space (projected). |
KeyDown
#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.
Parameters:
| e (KeyEventArgs) |
KeyUp
#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.
Parameters:
| e (KeyEventArgs) |
MouseDoubleClick
#Called when the mouse goes down and up twice over this responsive without moving too much in between.
Parameters:
| e (ResponseMouseArgs) |
MouseDown
#Called when one of the mouse buttons goes down over this responsive region.
Parameters:
| e (ResponseMouseArgs) |
MouseDrag
#Called when the mouse moves while one or more buttons are pressed. For this method to be invoked the preceding MouseDown(ResponseMouseArgs) call has to return Response.Capture. Only the focused responsive receives this call.
Parameters:
| e (ResponseMouseArgs) |
MouseLeave
#public virtual void MouseLeave()
Called when the hosting control detects the mouse leaves this responsive region.
MouseOver
#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 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 OnRedrawRequired() or update through an InvalidateDisplay path.
Parameters:
| e (ResponseMouseArgs) |
MouseSingleClick
#Called when the mouse goes down and up over this responsive without moving too much in between.
Parameters:
| e (ResponseMouseArgs) |
MouseUp
#Called when one of the mouse buttons goes up, after a MouseDown(ResponseMouseArgs) call to this same responsive.
Parameters:
| e (ResponseMouseArgs) |
MouseWheel
#Called when the mouse wheel spins while the cursor is over this responsive.
Parameters:
| e (ResponseMouseArgs) |
Rotation
#Called when a rotation gesture is recognized over this responsive. The rotation delta is in clockwise degrees.
Parameters:
| e (ResponseRotationArgs) |
Events
KeyDownHook
#Fires when KeyDown(KeyEventArgs)'s own logic would return Response.Ignored.
KeyUpHook
#Fires when KeyUp(KeyEventArgs)'s own logic would return Response.Ignored.
MouseDoubleClickHook
#Fires when MouseDoubleClick(ResponseMouseArgs)'s own logic would return Response.Ignored.
MouseDownHook
#Fires when MouseDown(ResponseMouseArgs)'s own logic would return Response.Ignored. Subscribers handle the event in subscription order; the first to return a non-
Ignored result wins.MouseLeaveHook
#Fires after MouseLeave()'s own logic completes. Allows attribute subclasses to plug additional leave behaviour into a base class's Responder.
MouseOverHook
#Fires after MouseOver(ResponseMouseArgs)'s own logic completes. Allows subclasses to plug additional hover behaviour into a base class's Responder.
MouseSingleClickHook
#Fires when MouseSingleClick(ResponseMouseArgs)'s own logic would return Response.Ignored.
RedrawRequired
#Raised whenever this responsive wants its host to redraw. Hosting controls are expected to subscribe and call ScheduleRedraw/Invalidate.
TextInputHook
#Fires when TextInput(TextInputEventArgs)'s own logic would return Response.Ignored.