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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_ClipSlot.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
11
12namespace tracktion { inline namespace engine
13{
14
18class ClipSlot : public EditItem,
19 public Selectable,
20 public ClipOwner
21{
22public:
26 ~ClipSlot() override;
27
28 //==============================================================================
30 void setClip (Clip*);
31
33 Clip* getClip();
34
36 int getIndex();
37
38 InputDeviceInstance::Destination* getInputDestination();
39
40 //==============================================================================
42 juce::String getName() const override;
48 EditItemID getClipOwnerID() override;
52 Edit& getClipOwnerEdit() override;
53
57private:
58 void clipCreated (Clip&) override;
59 void clipAddedOrRemoved() override;
60 void clipOrderChanged() override;
61 void clipPositionChanged() override;
62};
63
64
65//==============================================================================
66//==============================================================================
70class ClipSlotList : private ValueTreeObjectList<ClipSlot>
71{
72public:
76 ~ClipSlotList() override;
77
80
82 void ensureNumberOfSlots (int numSlots);
83
85 void setNumberOfSlots (int numSlots);
86
90 ClipSlot* insertSlot (int index);
91
96 void deleteSlot (ClipSlot&);
97
98private:
99 bool isSuitableType (const juce::ValueTree&) const override;
100 ClipSlot* createNewObject (const juce::ValueTree&) override;
101 void deleteObject (ClipSlot*) override;
102
103 void newObjectAdded (ClipSlot*) override;
104 void objectRemoved (ClipSlot*) override;
105 void objectOrderChanged() override;
106};
107
108}} // namespace tracktion { inline namespace engine
Base class for items that can contain clips.
A list of the ClipSlots on a Track.
ClipSlot * insertSlot(int index)
Inserts a new slot with the given index.
juce::Array< ClipSlot * > getClipSlots() const
Returns the ClipSlot* on this Track.
Track & track
The Track this ClipSlotList belongs to.
juce::ValueTree state
The state of this ClipSlotList.
void setNumberOfSlots(int numSlots)
Adds or removes Slots to ensure the exact number of slots exist.
void ensureNumberOfSlots(int numSlots)
Adds Slots to ensure at least numSlots exist.
Represents a slot on a track that a Clip can live in to be played as a launched clip.
juce::ValueTree & getClipOwnerState() override
Must return the state of this ClipOwner.
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
Edit & getClipOwnerEdit() override
Must return the Edit this ClipOwner belongs to.
EditItemID getClipOwnerID() override
Must return the ID of this ClipOwner.
Clip * getClip()
Returns the currently set clip.
Track & track
The Track this ClipSlot belongs to.
int getIndex()
Returns slot index on track.
void setClip(Clip *)
Sets the Clip to be used within this slot.
~ClipSlot() override
Destructor.
Selectable * getClipOwnerSelectable() override
Must return the selectable if this ClipOwner is one.
juce::ValueTree state
The state of this ClipSlot.
A clip in an edit.
Base class for objects that live inside an edit - e.g.
The Tracktion Edit class!
Base class for things that can be selected, and whose properties can appear in the properties panel.
Base class for tracks which contain clips and plugins and can be added to Edit[s].
ID for objects of type EditElement - e.g.