11namespace tracktion {
inline namespace engine
120 template <
typename ArrayType>
124 [] (
const TrackItem* a,
const TrackItem* b) { return a->getPosition().time.getStart() < b->getPosition().time.getStart(); });
130 template <
typename ArrayType>
134 [] (
const TrackItem* a,
const TrackItem* b) { return a->getPosition().time.getStart() < b->getPosition().time.getStart(); });
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 EditItems that live in a Track, e.g.
Type
Defines the types of item that can live on Track[s].
@ container
An container clip.
@ timeSig
A time signature settings.
@ arranger
An arranger clip.
@ unknown
A placeholder for unknown items.
@ collection
A collection clip.
@ recording
A temporary recording clip.
const Type type
The type of this item.
BeatPosition getStartBeat() const
Returns the start beat in the Edit of this item.
static juce::Identifier clipTypeToXMLType(Type)
Returns an Identifier version of a TrackItem::Type.
static void stableSortByTime(ArrayType &items)
Helper function to sort an array of TrackItem[s] by their start time without changing the order of it...
static void sortByTime(ArrayType &items)
Helper function to sort an array of TrackItem[s] by their start time.
virtual Track * getTrack() const =0
Must return the track this item lives on.
BeatDuration getLengthInBeats() const
Returns the duration in beats the of this item.
static TrackItem::Type stringToType(const juce::String &)
Returns the TrackItem::Type of a type string.
virtual TrackItem * getGroupParent() const
If this clip is part of a group, this should return the parent item it belongs to.
TimePosition getTimeOfRelativeBeat(BeatDuration) const
Returns an Edit time point for a given number of beats from the start of this item.
virtual ClipPosition getPosition() const =0
Must return the position of this item.
static TrackItem::Type xmlTagToType(juce::StringRef)
Returns the TrackItem::Type of a type string.
EditItemID getTrackID() const
Returns the ID of the Track this item lives on.
virtual bool isGrouped() const
Should return true if this clip is part of a group.
BeatRange getEditBeatRange() const
Returns the beat range of this item.
BeatPosition getEndBeat() const
Returns the end beat in the Edit of this item.
BeatDuration getOffsetInBeats() const
Returns an the offset of this item in beats.
static juce::String getSuggestedNameForNewItem(Type)
Returns a text string for a new clip of the given type.
BeatPosition getContentStartBeat() const
Returns the start beat of the content in the Edit of this item.
TimeRange getEditTimeRange() const
Returns the time range of this item.
static const char * typeToString(Type)
Returns the string version of a TrackItem::Type.
BeatPosition getBeatOfRelativeTime(TimeDuration) const
Returns an Edit beat point for a given number of seconds from the start of this item.
Base class for tracks which contain clips and plugins and can be added to Edit[s].
Represents a duration in beats.
Represents a position in beats.
Represents a duration in real-life time.
Represents a position in real-life time.
Represents the position of a clip on a timeline.
TimeRange time
The TimeRange this ClipPosition occupies.
ID for objects of type EditElement - e.g.