Table of Contents

Interface IInputState

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

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

public interface IInputState

Properties

IsModal

Gets whether this state blocks other interactions.

bool IsModal { get; }

Property Value

bool

Name

Gets the name of this state for debugging.

string Name { get; }

Property Value

string

Methods

Enter(InputStateContext)

Called when entering this state.

void Enter(InputStateContext context)

Parameters

context InputStateContext

Exit(InputStateContext)

Called when exiting this state.

void Exit(InputStateContext context)

Parameters

context InputStateContext

HandleKeyDown(InputStateContext, KeyEventArgs)

Handles key down events.

StateTransitionResult HandleKeyDown(InputStateContext context, KeyEventArgs e)

Parameters

context InputStateContext
e KeyEventArgs

Returns

StateTransitionResult

HandlePointerMoved(InputStateContext, PointerEventArgs)

Handles pointer moved events.

StateTransitionResult HandlePointerMoved(InputStateContext context, PointerEventArgs e)

Parameters

context InputStateContext
e PointerEventArgs

Returns

StateTransitionResult

HandlePointerPressed(InputStateContext, PointerPressedEventArgs, Control?)

Handles pointer pressed events.

StateTransitionResult HandlePointerPressed(InputStateContext context, PointerPressedEventArgs e, Control? source)

Parameters

context InputStateContext
e PointerPressedEventArgs
source Control

Returns

StateTransitionResult

HandlePointerReleased(InputStateContext, PointerReleasedEventArgs)

Handles pointer released events.

StateTransitionResult HandlePointerReleased(InputStateContext context, PointerReleasedEventArgs e)

Parameters

context InputStateContext
e PointerReleasedEventArgs

Returns

StateTransitionResult

HandlePointerWheel(InputStateContext, PointerWheelEventArgs)

Handles pointer wheel events.

StateTransitionResult HandlePointerWheel(InputStateContext context, PointerWheelEventArgs e)

Parameters

context InputStateContext
e PointerWheelEventArgs

Returns

StateTransitionResult

Update(InputStateContext, double)

Called each frame for states that need continuous updates (e.g., animations).

void Update(InputStateContext context, double deltaTime)

Parameters

context InputStateContext
deltaTime double