tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_EditInsertPoint.h
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11namespace tracktion { inline namespace engine
12{
13
22{
23public:
26
28 virtual ~EditInsertPoint() = default;
29
37
40
43
46
48 void lockInsertPoint (bool lock) noexcept;
49
58 TimePosition& start, bool pasteAfterSelection, SelectionManager*);
59
65 TimePosition& start, bool pasteAfterSelection, SelectionManager*,
66 std::function<bool (Track&)> allowedTrackPredicate);
67
75
82 virtual Placement chooseInsertPoint (bool pasteAfterSelection, SelectionManager*,
83 std::function<bool (Track&)> allowedTrackPredicate);
84
85protected:
86 Edit& edit;
87 TimePosition nextInsertPointTime;
88 EditItemID nextInsertPointTrack, nextInsertPointClipOwner;
89 int lockInsertPointCount = 0;
90 bool nextInsertIsAfterSelected = false;
91};
92
93}} // namespace tracktion { inline namespace engine
Base class for items that can contain clips.
An EditInsertPoint is like a "paste location".
virtual ~EditInsertPoint()=default
Destructor.
bool setNextInsertPoint(ClipOwner *, std::optional< TimePosition >)
Sets the next insertion point to a given ClipOwner and Time (if provided).
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 a...
void lockInsertPoint(bool lock) noexcept
Locks the insert point so calls to setNextInsertPoint won't have any effect.
void setNextInsertPoint(TimePosition, const juce::ReferenceCountedObjectPtr< Track > &)
Sets the next insertion point to a given time and track.
virtual void chooseInsertPoint(juce::ReferenceCountedObjectPtr< Track > &, TimePosition &start, bool pasteAfterSelection, SelectionManager *)
Returns the track and time position content should be pasted at.
ClipOwner * clipOwner
The clip owner to insert to (might be the same as track).
std::optional< TimePosition > time
The time to insert at.
juce::ReferenceCountedObjectPtr< Track > track
The track to insert in to.
void setNextInsertPointAfterSelected()
Sets a flag to signify chooseInsertPoint should use the selected track as the insertion point.
A struct representing a resolved insertion point.
The Tracktion Edit class!
Manages a list of items that are currently selected.
Base class for tracks which contain clips and plugins and can be added to Edit[s].
Represents a position in real-life time.
ID for objects of type EditElement - e.g.