Table of Contents

Struct EditIntent

Namespace
Ofs
Assembly
Ofs.Api.dll

A single edit gesture an active edit mode observes and may transform. The host hands one of these to onIntent; only the fields named for Kind are meaningful. To replace a gesture, build new intents with the static factory methods and return Replace(params EditIntent[]).

public readonly struct EditIntent

Properties

Axis

The axis the gesture targets.

public StandardAxis Axis { get; }

Property Value

StandardAxis

Direction

MoveSelection: Backward / Forward for a time nudge; None for a position nudge.

public StepDirection Direction { get; }

Property Value

StepDirection

Exact

Paste: paste at the clipboard's original times rather than relative to Time.

public bool Exact { get; }

Property Value

bool

FromTime

MovePoint: the point's original time.

public double FromTime { get; }

Property Value

double

Kind

Which gesture this intent represents; it determines which other fields are meaningful.

public EditIntentKind Kind { get; }

Property Value

EditIntentKind

Pos

AddPoint/AddPointAtPlayhead: position. MovePoint: destination position. MoveSelection: position delta.

public int Pos { get; }

Property Value

int

Reps

MoveSelection (time nudge): held-repeat burst count (≥ 1).

public int Reps { get; }

Property Value

int

SeekAfter

MoveSelection (time nudge): seek the playhead to the moved selection afterward.

public bool SeekAfter { get; }

Property Value

bool

Time

AddPoint/RemovePoint: target time. MovePoint: destination time. Paste: paste time.

public double Time { get; }

Property Value

double

Methods

AddPoint(StandardAxis, ScriptAction)

Add an action at time with position pos on axis.

public static EditIntent AddPoint(StandardAxis axis, ScriptAction action)

Parameters

axis StandardAxis
action ScriptAction

Returns

EditIntent

AddPoint(StandardAxis, double, int)

Add an action at time with position pos on axis.

public static EditIntent AddPoint(StandardAxis axis, double time, int pos)

Parameters

axis StandardAxis
time double
pos int

Returns

EditIntent

AddPointAtPlayhead(int)

Add an action at the playhead with position pos on the active axis.

public static EditIntent AddPointAtPlayhead(int pos)

Parameters

pos int

Returns

EditIntent

MovePoint(StandardAxis, double, ScriptAction)

Move the action at fromTime to to.

public static EditIntent MovePoint(StandardAxis axis, double fromTime, ScriptAction to)

Parameters

axis StandardAxis
fromTime double
to ScriptAction

Returns

EditIntent

MovePoint(StandardAxis, double, double, int)

Move the action at fromTime to (toTime, toPos).

public static EditIntent MovePoint(StandardAxis axis, double fromTime, double toTime, int toPos)

Parameters

axis StandardAxis
fromTime double
toTime double
toPos int

Returns

EditIntent

MoveSelectionByPos(StandardAxis, int)

A position nudge of the selection by delta.

public static EditIntent MoveSelectionByPos(StandardAxis axis, int delta)

Parameters

axis StandardAxis
delta int

Returns

EditIntent

MoveSelectionByTime(StandardAxis, StepDirection, int, bool)

A time nudge of the selection by direction × reps.

public static EditIntent MoveSelectionByTime(StandardAxis axis, StepDirection direction, int reps = 1, bool seekAfter = false)

Parameters

axis StandardAxis
direction StepDirection
reps int
seekAfter bool

Returns

EditIntent

Paste(ScriptAction, bool)

Paste the clipboard at time; exact keeps the clipboard's original times rather than offsetting relative to time.

public static EditIntent Paste(ScriptAction action, bool exact = false)

Parameters

action ScriptAction
exact bool

Returns

EditIntent

Paste(double, bool)

Paste the clipboard at time; exact keeps the clipboard's original times rather than offsetting relative to time.

public static EditIntent Paste(double time, bool exact = false)

Parameters

time double
exact bool

Returns

EditIntent

RemovePoint(StandardAxis, ScriptAction)

Remove the action at time on axis.

public static EditIntent RemovePoint(StandardAxis axis, ScriptAction action)

Parameters

axis StandardAxis
action ScriptAction

Returns

EditIntent

RemovePoint(StandardAxis, double)

Remove the action at time on axis.

public static EditIntent RemovePoint(StandardAxis axis, double time)

Parameters

axis StandardAxis
time double

Returns

EditIntent

RemoveSelected(StandardAxis)

Remove the current selection on axis.

public static EditIntent RemoveSelected(StandardAxis axis)

Parameters

axis StandardAxis

Returns

EditIntent