|
tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications
« « « Anklang Documentation |
An EditInsertPoint is like a "paste location". More...
#include "tracktion_EditInsertPoint.h"
Classes | |
| struct | Placement |
| A struct representing a resolved insertion point. More... | |
Public Member Functions | |
| EditInsertPoint (Edit &) | |
| Creates an EditInsertPoint for a given Edit. | |
| virtual | ~EditInsertPoint ()=default |
| Destructor. | |
| bool | setNextInsertPoint (ClipOwner *, std::optional< TimePosition >) |
| Sets the next insertion point to a given ClipOwner and Time (if provided). | |
| void | setNextInsertPoint (TimePosition, const juce::ReferenceCountedObjectPtr< Track > &) |
| Sets the next insertion point to a given time and track. | |
| void | setNextInsertPoint (TimePosition) |
| Updates the time but not the track. | |
| void | setNextInsertPointAfterSelected () |
| Sets a flag to signify chooseInsertPoint should use the selected track as the insertion point. | |
| void | lockInsertPoint (bool lock) noexcept |
| Locks the insert point so calls to setNextInsertPoint won't have any effect. | |
| virtual void | chooseInsertPoint (juce::ReferenceCountedObjectPtr< Track > &, TimePosition &start, bool pasteAfterSelection, SelectionManager *) |
| Returns the track and time position content should be pasted at. | |
| void | chooseInsertPoint (juce::ReferenceCountedObjectPtr< Track > &, TimePosition &start, bool pasteAfterSelection, SelectionManager *, std::function< bool(Track &)> allowedTrackPredicate) |
| This is the same as the other overload except you can supply a predicate to determine if tracks are allowed to be considered or not. | |
| virtual Placement | chooseInsertPoint (bool pasteAfterSelection, SelectionManager *, std::function< bool(Track &)> allowedTrackPredicate) |
| Returns a Placement representing where content should be pasted at. | |
Protected Attributes | |
| Edit & | edit |
| TimePosition | nextInsertPointTime |
| EditItemID | nextInsertPointTrack |
| EditItemID | nextInsertPointClipOwner |
| int | lockInsertPointCount |
| bool | nextInsertIsAfterSelected |
An EditInsertPoint is like a "paste location".
It can be updated as user iteraction warrents e.g. by selecting tracks/plugins/clips etc. and calling setNextInsertPoint. Then when new content is added, it can use the insert point to find the track and time position where content should be placed
Definition at line 21 of file tracktion_EditInsertPoint.h.
| struct tracktion::engine::EditInsertPoint::Placement |
A struct representing a resolved insertion point.
Definition at line 69 of file tracktion_EditInsertPoint.h.
| Class Members | ||
|---|---|---|
| ClipOwner * | clipOwner | The clip owner to insert to (might be the same as track). |
| optional< TimePosition > | time | The time to insert at. |
| ReferenceCountedObjectPtr< Track > | track | The track to insert in to. |
| tracktion::engine::EditInsertPoint::EditInsertPoint | ( | Edit & | e | ) |
Creates an EditInsertPoint for a given Edit.
Definition at line 14 of file tracktion_EditInsertPoint.cpp.
|
virtual |
Returns a Placement representing where content should be pasted at.
| pasteAfterSelection | Whether to ignore the previously set Track and use the SelectionManager to set the insert point |
| SelectionManger | The SelectionManager to use |
Definition at line 127 of file tracktion_EditInsertPoint.cpp.
|
virtual |
Returns the track and time position content should be pasted at.
| pasteAfterSelection | Whether to ignore the previously set Track and use the SelectionManager to set the insert point |
| SelectionManger | The SelectionManager to use |
Definition at line 70 of file tracktion_EditInsertPoint.cpp.
| void tracktion::engine::EditInsertPoint::chooseInsertPoint | ( | juce::ReferenceCountedObjectPtr< Track > & | , |
| TimePosition & | start, | ||
| bool | pasteAfterSelection, | ||
| SelectionManager * | , | ||
| std::function< bool(Track &)> | allowedTrackPredicate | ||
| ) |
This is the same as the other overload except you can supply a predicate to determine if tracks are allowed to be considered or not.
Useful for when they are hidden etc.
| allowedTrackPredicate | A predicate to determine if the track can be pasted in to |
|
noexcept |
Locks the insert point so calls to setNextInsertPoint won't have any effect.
Definition at line 57 of file tracktion_EditInsertPoint.cpp.
| bool tracktion::engine::EditInsertPoint::setNextInsertPoint | ( | ClipOwner * | clipOwner, |
| std::optional< TimePosition > | time | ||
| ) |
Sets the next insertion point to a given ClipOwner and Time (if provided).
N.B. This will only be updated of the ClipOwner provides a valid EditItemID.
| ClipOwner | The ClipOwner to insert in to |
| std::optional<TimePosition> | An optional time position to insert at |
Definition at line 19 of file tracktion_EditInsertPoint.cpp.
| void tracktion::engine::EditInsertPoint::setNextInsertPoint | ( | TimePosition | time | ) |
Updates the time but not the track.
Definition at line 38 of file tracktion_EditInsertPoint.cpp.
| void tracktion::engine::EditInsertPoint::setNextInsertPointAfterSelected | ( | ) |
Sets a flag to signify chooseInsertPoint should use the selected track as the insertion point.
Definition at line 65 of file tracktion_EditInsertPoint.cpp.
|
protected |
Definition at line 86 of file tracktion_EditInsertPoint.h.
|
protected |
Definition at line 89 of file tracktion_EditInsertPoint.h.
|
protected |
Definition at line 90 of file tracktion_EditInsertPoint.h.
|
protected |
Definition at line 88 of file tracktion_EditInsertPoint.h.
|
protected |
Definition at line 87 of file tracktion_EditInsertPoint.h.
|
protected |
Definition at line 88 of file tracktion_EditInsertPoint.h.