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
Direction
public StepDirection Direction { get; }
Property Value
Exact
Paste: paste at the clipboard's original times rather than relative to Time.
public bool Exact { get; }
Property Value
FromTime
MovePoint: the point's original time.
public double FromTime { get; }
Property Value
Kind
Which gesture this intent represents; it determines which other fields are meaningful.
public EditIntentKind Kind { get; }
Property Value
Pos
AddPoint/AddPointAtPlayhead: position. MovePoint: destination position. MoveSelection: position delta.
public int Pos { get; }
Property Value
Reps
MoveSelection (time nudge): held-repeat burst count (≥ 1).
public int Reps { get; }
Property Value
SeekAfter
MoveSelection (time nudge): seek the playhead to the moved selection afterward.
public bool SeekAfter { get; }
Property Value
Time
AddPoint/RemovePoint: target time. MovePoint: destination time. Paste: paste time.
public double Time { get; }
Property Value
Methods
AddPoint(StandardAxis, ScriptAction)
Add an action at time with position pos on axis.
public static EditIntent AddPoint(StandardAxis axis, ScriptAction action)
Parameters
axisStandardAxisactionScriptAction
Returns
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
axisStandardAxistimedoubleposint
Returns
AddPointAtPlayhead(int)
Add an action at the playhead with position pos on the active axis.
public static EditIntent AddPointAtPlayhead(int pos)
Parameters
posint
Returns
MovePoint(StandardAxis, double, ScriptAction)
Move the action at fromTime to to.
public static EditIntent MovePoint(StandardAxis axis, double fromTime, ScriptAction to)
Parameters
axisStandardAxisfromTimedoubletoScriptAction
Returns
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
axisStandardAxisfromTimedoubletoTimedoubletoPosint
Returns
MoveSelectionByPos(StandardAxis, int)
A position nudge of the selection by delta.
public static EditIntent MoveSelectionByPos(StandardAxis axis, int delta)
Parameters
axisStandardAxisdeltaint
Returns
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
axisStandardAxisdirectionStepDirectionrepsintseekAfterbool
Returns
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
actionScriptActionexactbool
Returns
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
Returns
RemovePoint(StandardAxis, ScriptAction)
Remove the action at time on axis.
public static EditIntent RemovePoint(StandardAxis axis, ScriptAction action)
Parameters
axisStandardAxisactionScriptAction
Returns
RemovePoint(StandardAxis, double)
Remove the action at time on axis.
public static EditIntent RemovePoint(StandardAxis axis, double time)
Parameters
axisStandardAxistimedouble
Returns
RemoveSelected(StandardAxis)
Remove the current selection on axis.
public static EditIntent RemoveSelected(StandardAxis axis)
Parameters
axisStandardAxis