Table of Contents

Class AnimatingNodesState

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

Input state active during node animations (position transitions, appear/disappear effects). Allows viewport interactions (pan/zoom) while blocking node interactions.

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

Constructors

AnimatingNodesState(IEnumerable<string>?, Action?, Action?)

Creates a new node animating state.

public AnimatingNodesState(IEnumerable<string>? animatingNodeIds = null, Action? cancelAnimation = null, Action? onExit = null)

Parameters

animatingNodeIds IEnumerable<string>

IDs of nodes currently being animated.

cancelAnimation Action

Action to cancel the running node animations.

onExit Action

Optional callback when exiting this state.

Properties

HasAnimatingNodes

Gets whether there are any nodes still animating.

public bool HasAnimatingNodes { get; }

Property Value

bool

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

AddAnimatingNode(string)

Adds a node ID to the animating set.

public void AddAnimatingNode(string nodeId)

Parameters

nodeId string

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

IsNodeAnimating(string)

Gets whether a specific node is currently animating.

public bool IsNodeAnimating(string nodeId)

Parameters

nodeId string

Returns

bool

RemoveAnimatingNode(string)

Removes a node ID from the animating set.

public void RemoveAnimatingNode(string nodeId)

Parameters

nodeId string