Table of Contents

Class InputProcessorBase

Namespace
FlowGraph.Avalonia.Input
Assembly
FlowGraph.Avalonia.dll

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

public abstract class InputProcessorBase : IInputProcessor
Inheritance
InputProcessorBase
Implements
Derived
Inherited Members

Properties

HandledTypes

The hit target types this processor handles (bitmask). Use bitwise OR to handle multiple types: HitTargetType.Node | HitTargetType.Group

public abstract HitTargetType HandledTypes { get; }

Property Value

HitTargetType

Name

Display name for debugging.

public abstract string Name { get; }

Property Value

string

Priority

Priority for checking this processor. Higher = checked first.

public abstract int Priority { get; }

Property Value

int

Methods

CanHandle(HitTargetType)

Checks if this processor handles the given target type (O(1) bitmask check).

public bool CanHandle(HitTargetType targetType)

Parameters

targetType HitTargetType

Returns

bool

CapturePointer(PointerEventArgs, Control?)

Captures the pointer on the root panel for drag operations.

protected static void CapturePointer(PointerEventArgs e, Control? target)

Parameters

e PointerEventArgs
target Control

HandlePointerMoved(InputStateContext, GraphHitTestResult, PointerEventArgs)

Handles pointer moved. Called during idle state for hover effects.

public virtual InputProcessorResult HandlePointerMoved(InputStateContext context, GraphHitTestResult hit, PointerEventArgs e)

Parameters

context InputStateContext
hit GraphHitTestResult
e PointerEventArgs

Returns

InputProcessorResult

HandlePointerPressed(InputStateContext, GraphHitTestResult, PointerPressedEventArgs)

Handles pointer pressed on an element this processor is responsible for.

public virtual InputProcessorResult HandlePointerPressed(InputStateContext context, GraphHitTestResult hit, PointerPressedEventArgs e)

Parameters

context InputStateContext

The input state context.

hit GraphHitTestResult

The hit test result (guaranteed to be a type from HandledTypes).

e PointerPressedEventArgs

The Avalonia pointer event.

Returns

InputProcessorResult

Result indicating whether handled and any state transition.

HandlePointerReleased(InputStateContext, GraphHitTestResult, PointerReleasedEventArgs)

Handles pointer released. Rarely needed at processor level.

public virtual InputProcessorResult HandlePointerReleased(InputStateContext context, GraphHitTestResult hit, PointerReleasedEventArgs e)

Parameters

context InputStateContext
hit GraphHitTestResult
e PointerReleasedEventArgs

Returns

InputProcessorResult

IsCtrlHeld(PointerEventArgs)

Checks if Ctrl modifier is held.

protected static bool IsCtrlHeld(PointerEventArgs e)

Parameters

e PointerEventArgs

Returns

bool

IsDoubleClick(PointerPressedEventArgs)

Checks if this is a double-click.

protected static bool IsDoubleClick(PointerPressedEventArgs e)

Parameters

e PointerPressedEventArgs

Returns

bool

IsShiftHeld(PointerEventArgs)

Checks if Shift modifier is held.

protected static bool IsShiftHeld(PointerEventArgs e)

Parameters

e PointerEventArgs

Returns

bool