TracktionEngine
|
An iterable list of Track[s] that live either in an Edit or as subtracks of a Track. More...
Public Member Functions | |
TrackList (Edit &, const juce::ValueTree &parent) | |
Creates a TrackList for a parent state. More... | |
~TrackList () override | |
Destructor. More... | |
Track * | getTrackFor (const juce::ValueTree &) const |
Returns a Track for a given state. More... | |
bool | visitAllRecursive (const std::function< bool(Track &)> &) const |
Calls the given function on all Track[s]. More... | |
void | visitAllTopLevel (const std::function< bool(Track &)> &) const |
Calls the given function on all top-level Track[s]. More... | |
void | visitAllTracks (const std::function< bool(Track &)> &, bool recursive) const |
Calls the given function on all Track[s], optionally recursively. More... | |
bool | isSuitableType (const juce::ValueTree &) const override |
Track * | createNewObject (const juce::ValueTree &) override |
void | deleteObject (Track *t) override |
void | newObjectAdded (Track *t) override |
void | objectRemoved (Track *) override |
void | objectOrderChanged () override |
Public Member Functions inherited from tracktion::engine::ValueTreeObjectList< Track > | |
ValueTreeObjectList (const juce::ValueTree &parentTree) | |
~ValueTreeObjectList () override | |
int | size () const |
bool | isEmpty () const noexcept |
Track * | operator[] (int idx) const |
Track * | at (int idx) |
Track ** | begin () |
Track *const * | begin () const |
Track ** | end () |
Track *const * | end () const |
void | rebuildObjects () |
void | freeObjects () |
void | valueTreeChildAdded (juce::ValueTree &, juce::ValueTree &tree) override |
void | valueTreeChildRemoved (juce::ValueTree &exParent, juce::ValueTree &tree, int) override |
void | valueTreeChildOrderChanged (juce::ValueTree &tree, int, int) override |
void | valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override |
void | valueTreeParentChanged (juce::ValueTree &) override |
void | valueTreeRedirected (juce::ValueTree &) override |
int | compareElements (Track *first, Track *second) const |
ValueTreeObjectList (const juce::ValueTree &parentTree) | |
~ValueTreeObjectList () override | |
int | size () const |
bool | isEmpty () const noexcept |
Track * | operator[] (int idx) const |
Track * | at (int idx) |
Track ** | begin () |
Track *const * | begin () const |
Track ** | end () |
Track *const * | end () const |
void | rebuildObjects () |
void | freeObjects () |
void | valueTreeChildAdded (juce::ValueTree &, juce::ValueTree &tree) override |
void | valueTreeChildRemoved (juce::ValueTree &exParent, juce::ValueTree &tree, int) override |
void | valueTreeChildOrderChanged (juce::ValueTree &tree, int, int) override |
void | valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override |
void | valueTreeParentChanged (juce::ValueTree &) override |
void | valueTreeRedirected (juce::ValueTree &) override |
int | compareElements (Track *first, Track *second) const |
Static Public Member Functions | |
static bool | isMovableTrack (const juce::ValueTree &) noexcept |
Returns true if the track is movable. More... | |
static bool | isArrangerTrack (const juce::ValueTree &) noexcept |
Returns true if the state is for an ArrangerTrack. More... | |
static bool | isChordTrack (const juce::ValueTree &) noexcept |
Returns true if the state is for a ChordTrack. More... | |
static bool | isMarkerTrack (const juce::ValueTree &) noexcept |
Returns true if the state is for a MarkerTrack. More... | |
static bool | isTempoTrack (const juce::ValueTree &) noexcept |
Returns true if the state is for a TempoTrack. More... | |
static bool | isMasterTrack (const juce::ValueTree &) noexcept |
Returns true if the state is for a MasterTrack. More... | |
static bool | isFixedTrack (const juce::ValueTree &) noexcept |
Returns true if the track is fixed. More... | |
static bool | isTrack (const juce::ValueTree &) noexcept |
Returns true if the given ValeTree is for a known Track type. More... | |
static bool | isTrack (const juce::Identifier &) noexcept |
Returns true if the given Identifier is for a known Track type. More... | |
static bool | hasAnySubTracks (const juce::ValueTree &) |
Returns true if the track has any sub tracks. More... | |
static void | sortTracksByType (juce::ValueTree &editState, juce::UndoManager *) |
Sorts a list of tracks by their type, placing global tracks at the top. More... | |
Public Attributes | |
Edit & | edit |
bool | rebuilding = true |
Public Attributes inherited from tracktion::engine::ValueTreeObjectList< Track > | |
juce::Array< Track * > | objects |
juce::DummyCriticalSection | arrayLock |
juce::Array< Track * > | objects |
juce::DummyCriticalSection | arrayLock |
Additional Inherited Members | |
Public Types inherited from tracktion::engine::ValueTreeObjectList< Track > | |
using | ScopedLockType = typename CriticalSectionType::ScopedLockType |
using | ScopedLockType = typename CriticalSectionType::ScopedLockType |
Protected Member Functions inherited from tracktion::engine::ValueTreeObjectList< Track > | |
void | deleteAllObjects () |
bool | isChildTree (juce::ValueTree &v) const |
int | indexOf (const juce::ValueTree &v) const noexcept |
void | sortArray () |
void | deleteAllObjects () |
bool | isChildTree (juce::ValueTree &v) const |
int | indexOf (const juce::ValueTree &v) const noexcept |
void | sortArray () |
Protected Attributes inherited from tracktion::engine::ValueTreeObjectList< Track > | |
juce::ValueTree | parent |
juce::ValueTree | parent |
An iterable list of Track[s] that live either in an Edit or as subtracks of a Track.
tracktion::engine::TrackList::TrackList | ( | Edit & | , |
const juce::ValueTree & | parent | ||
) |
Creates a TrackList for a parent state.
|
override |
Destructor.
Track* tracktion::engine::TrackList::getTrackFor | ( | const juce::ValueTree & | ) | const |
Returns a Track for a given state.
bool tracktion::engine::TrackList::visitAllRecursive | ( | const std::function< bool(Track &)> & | ) | const |
Calls the given function on all Track[s].
Return false from the function to stop the traversal.
void tracktion::engine::TrackList::visitAllTopLevel | ( | const std::function< bool(Track &)> & | ) | const |
Calls the given function on all top-level Track[s].
Return false from the function to stop the traversal.
void tracktion::engine::TrackList::visitAllTracks | ( | const std::function< bool(Track &)> & | , |
bool | recursive | ||
) | const |
Calls the given function on all Track[s], optionally recursively.
Return false from the function to stop the traversal.
recursive | Whether nested tracks should be visited |
|
staticnoexcept |
Returns true if the track is movable.
I.e. not a global track.
|
staticnoexcept |
Returns true if the state is for an ArrangerTrack.
|
staticnoexcept |
Returns true if the state is for a ChordTrack.
|
staticnoexcept |
Returns true if the state is for a MarkerTrack.
|
staticnoexcept |
Returns true if the state is for a TempoTrack.
|
staticnoexcept |
Returns true if the state is for a MasterTrack.
|
staticnoexcept |
Returns true if the track is fixed.
I.e. a global track.
|
staticnoexcept |
Returns true if the given ValeTree is for a known Track type.
|
staticnoexcept |
Returns true if the given Identifier is for a known Track type.
|
static |
Returns true if the track has any sub tracks.
|
static |
Sorts a list of tracks by their type, placing global tracks at the top.
|
overridevirtual |
Implements tracktion::engine::ValueTreeObjectList< Track >.
|
overridevirtual |
Implements tracktion::engine::ValueTreeObjectList< Track >.
|
overridevirtual |
Implements tracktion::engine::ValueTreeObjectList< Track >.
|
overridevirtual |
Implements tracktion::engine::ValueTreeObjectList< Track >.
|
overridevirtual |
Implements tracktion::engine::ValueTreeObjectList< Track >.
|
overridevirtual |
Implements tracktion::engine::ValueTreeObjectList< Track >.
Edit& tracktion::engine::TrackList::edit |
bool tracktion::engine::TrackList::rebuilding = true |