Table of Contents

Class AnimatingViewportState

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

Input state active during viewport animations (pan/zoom transitions). Allows cancellation via click or key press, and permits zoom wheel interactions.

public class AnimatingViewportState : InputStateBase, IInputState
Inheritance
AnimatingViewportState
Implements
Inherited Members

Constructors

AnimatingViewportState(Action?, Action?)

Creates a new viewport animating state.

public AnimatingViewportState(Action? cancelAnimation = null, Action? onExit = null)

Parameters

cancelAnimation Action

Action to cancel the running viewport animation.

onExit Action

Optional callback when exiting this state.

Properties

IsModal

Gets whether this state blocks other interactions.

public override bool IsModal { get; }

Property Value

bool

Name

Gets the name of this state for debugging.

public override string Name { get; }

Property Value

string

Methods

Exit(InputStateContext)

Called when exiting this state.

public override void Exit(InputStateContext context)

Parameters

context InputStateContext

HandleKeyDown(InputStateContext, KeyEventArgs)

Handles key down events.

public override StateTransitionResult HandleKeyDown(InputStateContext context, KeyEventArgs e)

Parameters

context InputStateContext
e KeyEventArgs

Returns

StateTransitionResult

HandlePointerMoved(InputStateContext, PointerEventArgs)

Handles pointer moved events.

public override StateTransitionResult HandlePointerMoved(InputStateContext context, PointerEventArgs e)

Parameters

context InputStateContext
e PointerEventArgs

Returns

StateTransitionResult

HandlePointerPressed(InputStateContext, PointerPressedEventArgs, Control?)

Handles pointer pressed events.

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

Parameters

context InputStateContext
e PointerPressedEventArgs
source Control

Returns

StateTransitionResult

HandlePointerReleased(InputStateContext, PointerReleasedEventArgs)

Handles pointer released events.

public override StateTransitionResult HandlePointerReleased(InputStateContext context, PointerReleasedEventArgs e)

Parameters

context InputStateContext
e PointerReleasedEventArgs

Returns

StateTransitionResult

HandlePointerWheel(InputStateContext, PointerWheelEventArgs)

Handles pointer wheel events.

public override StateTransitionResult HandlePointerWheel(InputStateContext context, PointerWheelEventArgs e)

Parameters

context InputStateContext
e PointerWheelEventArgs

Returns

StateTransitionResult