Table of Contents

Class AxisEdit

Namespace
Ofs
Assembly
Ofs.Api.dll

A buffered, mutable working copy of an axis. Mutators are fluent and accumulate locally — nothing is applied to the project until Commit(). One Commit is one undo step. An uncommitted edit is a clean no-op.

public sealed class AxisEdit
Inheritance
object
AxisEdit

Properties

Actions

The buffered actions, reflecting mutations made on this edit so far (pre-Commit).

public IReadOnlyList<ScriptAction> Actions { get; }

Property Value

IReadOnlyList<ScriptAction>

Role

Which axis this edit targets.

public StandardAxis Role { get; }

Property Value

StandardAxis

Methods

Add(ScriptAction)

Insert the action, replacing any existing one at the same time — actions are unique by time, so the axis behaves like the core VectorSet keyed on At.

public AxisEdit Add(ScriptAction action)

Parameters

action ScriptAction

Returns

AxisEdit

Add(double, int)

Insert the action, replacing any existing one at the same time — actions are unique by time, so the axis behaves like the core VectorSet keyed on At.

public AxisEdit Add(double at, int pos)

Parameters

at double
pos int

Returns

AxisEdit

AddRange(IEnumerable<ScriptAction>)

Inserts every action, each replacing any existing one at its time. One buffered mutation regardless of count — cheaper and terser than repeated Add(double, int).

public AxisEdit AddRange(IEnumerable<ScriptAction> actions)

Parameters

actions IEnumerable<ScriptAction>

Returns

AxisEdit

After(ScriptAction)

First buffered action with At strictly greater than time; null if none.

public ScriptAction? After(ScriptAction action)

Parameters

action ScriptAction

Returns

ScriptAction?

After(double)

First buffered action with At strictly greater than time; null if none.

public ScriptAction? After(double time)

Parameters

time double

Returns

ScriptAction?

Before(ScriptAction)

Last buffered action with At strictly less than time; null if none.

public ScriptAction? Before(ScriptAction action)

Parameters

action ScriptAction

Returns

ScriptAction?

Before(double)

Last buffered action with At strictly less than time; null if none.

public ScriptAction? Before(double time)

Parameters

time double

Returns

ScriptAction?

Clear()

Removes every action on the axis.

public AxisEdit Clear()

Returns

AxisEdit

ClearSelection()

Clears the selection (the actions themselves are kept).

public AxisEdit ClearSelection()

Returns

AxisEdit

Commit()

Applies every buffered mutation as ONE undo step. No-op if nothing changed. The edit is spent afterwards.

public void Commit()

Deselect(ScriptAction)

Removes the action at at from the selection.

public AxisEdit Deselect(ScriptAction action)

Parameters

action ScriptAction

Returns

AxisEdit

Deselect(double)

Removes the action at at from the selection.

public AxisEdit Deselect(double at)

Parameters

at double

Returns

AxisEdit

DeselectRange(double, double)

Removes every selected action with start <= At <= end from the selection, in one buffered mutation. The actions themselves are kept.

public AxisEdit DeselectRange(double start, double end)

Parameters

start double
end double

Returns

AxisEdit

RemoveAt(ScriptAction)

Removes the action at at, if any.

public AxisEdit RemoveAt(ScriptAction action)

Parameters

action ScriptAction

Returns

AxisEdit

RemoveAt(double)

Removes the action at at, if any.

public AxisEdit RemoveAt(double at)

Parameters

at double

Returns

AxisEdit

RemoveRange(double, double)

Removes every action with start <= At <= end.

public AxisEdit RemoveRange(double start, double end)

Parameters

start double
end double

Returns

AxisEdit

Select(ScriptAction)

Adds the action at at to the selection.

public AxisEdit Select(ScriptAction action)

Parameters

action ScriptAction

Returns

AxisEdit

Select(double)

Adds the action at at to the selection.

public AxisEdit Select(double at)

Parameters

at double

Returns

AxisEdit

SelectRange(double, double)

Adds every action with start <= At <= end to the selection, in one buffered mutation. Times with no action are unaffected — selection keys on the axis's real actions.

public AxisEdit SelectRange(double start, double end)

Parameters

start double
end double

Returns

AxisEdit