Table of Contents

Class BehaviorBase

Namespace
FlowGraph.Core.Input
Assembly
FlowGraph.Core.dll

Base class for behaviors with default no-op implementations.

public abstract class BehaviorBase : IBehavior
Inheritance
BehaviorBase
Implements
Inherited Members

Properties

ActiveInStates

Override to restrict this behavior to specific states. Return null (default) to be active in all states.

public virtual IReadOnlySet<string>? ActiveInStates { get; }

Property Value

IReadOnlySet<string>

IsEnabled

Whether this behavior is currently active. Disabled behaviors receive no events.

public bool IsEnabled { get; set; }

Property Value

bool

Name

Display name for debugging and UI purposes.

public abstract string Name { get; }

Property Value

string

Priority

Priority relative to other behaviors. Higher = called first. Default behaviors use 0. Use negative for "always last" behaviors.

public virtual int Priority { get; }

Property Value

int

Methods

IsActiveInState(string)

Checks if this behavior should be invoked for the given state. Default: active in all states if ActiveInStates is null/empty.

public bool IsActiveInState(string stateName)

Parameters

stateName string

Returns

bool

OnAfterKeyDown(IGraphInputEvent)

Called after key down has been processed.

public virtual void OnAfterKeyDown(IGraphInputEvent e)

Parameters

e IGraphInputEvent

OnAfterPointerMoved(IGraphInputEvent)

Called after pointer moved has been processed.

public virtual void OnAfterPointerMoved(IGraphInputEvent e)

Parameters

e IGraphInputEvent

OnAfterPointerPressed(IGraphInputEvent)

Called after pointer pressed has been processed.

public virtual void OnAfterPointerPressed(IGraphInputEvent e)

Parameters

e IGraphInputEvent

OnAfterPointerReleased(IGraphInputEvent)

Called after pointer released has been processed.

public virtual void OnAfterPointerReleased(IGraphInputEvent e)

Parameters

e IGraphInputEvent

OnAfterPointerWheel(IGraphInputEvent)

Called after wheel/scroll has been processed.

public virtual void OnAfterPointerWheel(IGraphInputEvent e)

Parameters

e IGraphInputEvent

OnAttached(Graph)

Called when the behavior is attached to a graph canvas.

public virtual void OnAttached(Graph graph)

Parameters

graph Graph

OnBeforeKeyDown(IGraphInputEvent)

Called before key down is processed.

public virtual BehaviorResult OnBeforeKeyDown(IGraphInputEvent e)

Parameters

e IGraphInputEvent

Returns

BehaviorResult

OnBeforePointerMoved(IGraphInputEvent)

Called before pointer moved is processed.

public virtual BehaviorResult OnBeforePointerMoved(IGraphInputEvent e)

Parameters

e IGraphInputEvent

Returns

BehaviorResult

OnBeforePointerPressed(IGraphInputEvent)

Called before pointer pressed is processed. Return HandledSuppress to prevent default handling.

public virtual BehaviorResult OnBeforePointerPressed(IGraphInputEvent e)

Parameters

e IGraphInputEvent

Returns

BehaviorResult

OnBeforePointerReleased(IGraphInputEvent)

Called before pointer released is processed.

public virtual BehaviorResult OnBeforePointerReleased(IGraphInputEvent e)

Parameters

e IGraphInputEvent

Returns

BehaviorResult

OnBeforePointerWheel(IGraphInputEvent)

Called before wheel/scroll is processed.

public virtual BehaviorResult OnBeforePointerWheel(IGraphInputEvent e)

Parameters

e IGraphInputEvent

Returns

BehaviorResult

OnDetached()

Called when the behavior is detached from a graph canvas.

public virtual void OnDetached()