Table of Contents

Namespace FlowGraph.Avalonia.Input

Classes

DirectRendererHitTester

Adapts DirectCanvasRenderer hit testing to the IGraphHitTester interface.

EdgeEndpointHitInfo

Hit info for an edge endpoint handle (source or target connection point).

InputCoordinatesAdapter

Implementation of IInputCoordinates that abstracts away rendering mode differences for coordinate handling.

This adapter automatically detects the current rendering mode and uses the appropriate coordinate conversion strategy:

  • Visual Tree mode: GetPosition(MainCanvas) already returns canvas coordinates
  • Direct Rendering mode: GetPosition(RootPanel) returns viewport coordinates, requires transform
InputDispatcher

Coordinates input handling between behaviors, processors, and the state machine.

InputProcessorBase

Base class for input processors with default no-op implementations.

InputProcessorPriority

Standard priority constants for input processors.

InputProcessorResult

Result of an input processor's handling.

InputStateBase

Base class for input states with default implementations.

InputStateContext

Shared context passed to all input states. Contains references to canvas components and raises events.

InputStateMachine

Manages input state transitions and delegates events to the current state.

StateChangedEventArgs

Event args for state changes.

StateTransitionResult

Represents the result of a state transition.

Interfaces

ICollisionProvider

Interface for providing collision detection and prevention during node drag operations. External systems (like collision managers) can implement this interface to prevent nodes from overlapping during drag without directly modifying node positions themselves.

IInputCoordinates

Provides coordinate information for input handling in a rendering-mode agnostic way.

This interface abstracts away the differences between Visual Tree and Direct Rendering modes, providing a consistent API for input states to work with coordinates. All interaction logic should use this interface rather than directly accessing MainCanvas or RootPanel.

Key principle: Interaction code should work in canvas coordinates. This interface ensures that pointer positions are correctly converted regardless of rendering mode.

IInputProcessor

Processes input for a specific element type or interaction pattern.

IInputState

Base interface for all canvas input states. Implements the State Pattern for clean input handling.

ISnapProvider

Interface for providing snap offsets during node drag operations. External systems (like helper lines, guides, magnetic snapping) can implement this interface to influence node positions during drag without directly modifying node positions themselves.