Table of Contents

Interface IGraphInputEvent

Namespace
FlowGraph.Core.Input
Assembly
FlowGraph.Core.dll

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

MouseButton

CanvasPosition

Position in canvas coordinates where the input occurred.

Point CanvasPosition { get; }

Property Value

Point

ClickCount

Number of consecutive clicks (1 = single, 2 = double, etc.).

int ClickCount { get; }

Property Value

int

Handled

Gets or sets whether this event has been handled. Setting to true prevents further processing.

bool Handled { get; set; }

Property Value

bool

HitResult

The result of hit testing at the input position.

GraphHitTestResult HitResult { get; }

Property Value

GraphHitTestResult

Modifiers

Keyboard modifiers held during the input.

InputModifiers Modifiers { get; }

Property Value

InputModifiers

ViewportPosition

Position in viewport/screen coordinates where the input occurred.

Point ViewportPosition { get; }

Property Value

Point

WheelDelta

Delta values for wheel/scroll events. Zero for press/release.

Point WheelDelta { get; }

Property Value

Point