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
-
objectAxisEdit
Properties
Actions
The buffered actions, reflecting mutations made on this edit so far (pre-Commit).
public IReadOnlyList<ScriptAction> Actions { get; }
Property Value
Role
Which axis this edit targets.
public StandardAxis Role { get; }
Property Value
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
actionScriptAction
Returns
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
Returns
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
actionsIEnumerable<ScriptAction>
Returns
After(ScriptAction)
First buffered action with At strictly greater than time; null if none.
public ScriptAction? After(ScriptAction action)
Parameters
actionScriptAction
Returns
After(double)
First buffered action with At strictly greater than time; null if none.
public ScriptAction? After(double time)
Parameters
timedouble
Returns
Before(ScriptAction)
Last buffered action with At strictly less than time; null if none.
public ScriptAction? Before(ScriptAction action)
Parameters
actionScriptAction
Returns
Before(double)
Last buffered action with At strictly less than time; null if none.
public ScriptAction? Before(double time)
Parameters
timedouble
Returns
Clear()
Removes every action on the axis.
public AxisEdit Clear()
Returns
ClearSelection()
Clears the selection (the actions themselves are kept).
public AxisEdit ClearSelection()
Returns
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
actionScriptAction
Returns
Deselect(double)
Removes the action at at from the selection.
public AxisEdit Deselect(double at)
Parameters
atdouble
Returns
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
Returns
RemoveAt(ScriptAction)
Removes the action at at, if any.
public AxisEdit RemoveAt(ScriptAction action)
Parameters
actionScriptAction
Returns
RemoveAt(double)
Removes the action at at, if any.
public AxisEdit RemoveAt(double at)
Parameters
atdouble
Returns
RemoveRange(double, double)
Removes every action with start <= At <= end.
public AxisEdit RemoveRange(double start, double end)
Parameters
Returns
Select(ScriptAction)
Adds the action at at to the selection.
public AxisEdit Select(ScriptAction action)
Parameters
actionScriptAction
Returns
Select(double)
Adds the action at at to the selection.
public AxisEdit Select(double at)
Parameters
atdouble
Returns
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)