Interface IGraphInputEvent
Framework-agnostic representation of a graph input event. Wraps hit test results and modifier state without exposing UI framework types.
public interface IGraphInputEvent
Remarks
This abstraction allows behaviors written against FlowGraph.Core to work with any UI framework (Avalonia, WPF, MAUI, etc.) without modification.
Design Rationale:
- Hit test results are already framework-agnostic (Point, Node, Edge, etc.)
- Modifier keys map to a simple flags enum
- Click count and button info are primitive types
Properties
Button
Which mouse button triggered this event (for press/release events).
MouseButton Button { get; }
Property Value
CanvasPosition
Position in canvas coordinates where the input occurred.
Point CanvasPosition { get; }
Property Value
ClickCount
Number of consecutive clicks (1 = single, 2 = double, etc.).
int ClickCount { get; }
Property Value
Handled
Gets or sets whether this event has been handled. Setting to true prevents further processing.
bool Handled { get; set; }
Property Value
HitResult
The result of hit testing at the input position.
GraphHitTestResult HitResult { get; }
Property Value
Modifiers
Keyboard modifiers held during the input.
InputModifiers Modifiers { get; }
Property Value
ViewportPosition
Position in viewport/screen coordinates where the input occurred.
Point ViewportPosition { get; }
Property Value
WheelDelta
Delta values for wheel/scroll events. Zero for press/release.
Point WheelDelta { get; }