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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_CollectionClip.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
14//==============================================================================
18{
19public:
21 ~CollectionClip() override;
22
25
26 void addClip (Clip*);
27 void removeClip (Clip*);
28 bool removeClip (EditItemID);
29 bool containsClip (Clip* clip) const noexcept { return clips.contains (clip); }
30
31 juce::String getName() const override;
32
33 ClipPosition getPosition() const override { return { range, TimeDuration() }; }
34 Track* getTrack() const override { return track; }
35
36 bool moveToTrack (Track&);
37 void updateStartAndEnd();
38
39 FolderTrack* getFolderTrack() const noexcept;
40
41 juce::String getSelectableDescription() override { return TRANS("Collection clips"); }
42 int getNumClips() const noexcept { return clips.size(); }
43 Clip::Ptr getClip (int index) const { return clips[index]; }
44 const Clip::Array& getClips() const noexcept { return clips; }
45
46 void setDragging (bool nowDragging) noexcept { dragging = nowDragging; }
47 bool isDragging() const noexcept { return dragging; }
48
49
50 EditItemID getGroupID() const noexcept { return groupID; }
51 void setGroupID (EditItemID newGroupID) { groupID = newGroupID; }
52
53 bool isGroupCollection() const { return getFolderTrack() == nullptr; }
54
55 TimeRange range;
56
57private:
58 Track* track;
59 Clip::Array clips;
60 bool dragging = false;
61 EditItemID groupID;
62
64};
65
66}} // namespace tracktion { inline namespace engine
int size() const noexcept
bool contains(const ObjectClass *objectToLookFor) const noexcept
A clip in an edit.
Track * getTrack() const override
Must return the track this item lives on.
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
ClipPosition getPosition() const override
Must return the position of this item.
Base class for EditItems that live in a Track, e.g.
Base class for tracks which contain clips and plugins and can be added to Edit[s].
#define TRANS(stringLiteral)
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
RangeType< TimePosition > TimeRange
A RangeType based on real time (i.e.
Represents a duration in real-life time.
Represents the position of a clip on a timeline.
ID for objects of type EditElement - e.g.