Audacity 3.2.0
|
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list of tracks, event notifications. More...
#include <Track.h>
Public Types | |
using | iterator = TrackIter< Track > |
using | const_iterator = TrackIter< const Track > |
using | value_type = Track * |
using | reverse_iterator = std::reverse_iterator< iterator > |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
Public Types inherited from Observer::Publisher< TrackListEvent > | |
using | message_type = TrackListEvent |
using | CallbackReturn = std::conditional_t< true, void, bool > |
using | Callback = std::function< CallbackReturn(const TrackListEvent &) > |
Type of functions that can be connected to the Publisher. More... | |
Public Member Functions | |
TrackList (AudacityProject *pOwner) | |
void | Swap (TrackList &that) |
virtual | ~TrackList () |
AudacityProject * | GetOwner () |
const AudacityProject * | GetOwner () const |
wxString | MakeUniqueTrackName (const wxString &baseTrackName) const |
Returns string that contains baseTrackName, but is guaranteed to be unique among other tracks in that list. More... | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
const_reverse_iterator | crbegin () const |
const_reverse_iterator | crend () const |
TrackIter< Track > | DoFind (Track *pTrack) |
TrackIter< Track > | Find (Track *pTrack) |
TrackIter< const Track > | Find (const Track *pTrack) const |
template<typename TrackType = Track> | |
auto | Any () -> TrackIterRange< TrackType > |
template<typename TrackType = const Track> | |
auto | Any () const -> std::enable_if_t< std::is_const_v< TrackType >, TrackIterRange< TrackType > > |
template<typename TrackType = Track> | |
auto | Selected () -> TrackIterRange< TrackType > |
template<typename TrackType = const Track> | |
auto | Selected () const -> std::enable_if_t< std::is_const_v< TrackType >, TrackIterRange< TrackType > > |
void | Insert (const Track *before, const Track::Holder &pSrc, bool assignIds=false) |
Moves *pSrc to position where before is located. If before is nullptr the track is appended. More... | |
void | Permute (const std::vector< Track * > &tracks) |
Track * | FindById (TrackId id) |
template<typename TrackKind > | |
TrackKind * | AddToHead (const std::shared_ptr< TrackKind > &t) |
Add a Track, giving it a fresh id if this is not temporary. More... | |
template<typename TrackKind > | |
TrackKind * | Add (const std::shared_ptr< TrackKind > &t, bool assignIds=true) |
Track::Holder | ReplaceOne (Track &t, TrackList &&with) |
Track::Holder | Remove (Track &track) |
Remove a track and return it. More... | |
void | Clear (bool sendEvent=true) |
Make the list empty. More... | |
bool | CanMoveUp (Track &t) const |
bool | CanMoveDown (Track &t) const |
bool | MoveUp (Track &t) |
bool | MoveDown (Track &t) |
bool | Move (Track &t, bool up) |
template<typename Subclass > | |
std::shared_ptr< Subclass > | Lock (const std::weak_ptr< Subclass > &wTrack) |
bool | empty () const |
size_t | Size () const |
double | GetStartTime () const |
Return the least start time of the tracks, or 0 when no tracks. More... | |
double | GetEndTime () const |
Return the greatest end time of the tracks, or 0 when no tracks. More... | |
void | Append (TrackList &&list, bool assignIds=true) |
Remove all tracks from list and put them at the end of this More... | |
void | AppendOne (TrackList &&list) |
Remove first track (if any) from list and put it at the end of this More... | |
Track::Holder | DetachFirst () |
Remove and return the first track. More... | |
Public Member Functions inherited from Observer::Publisher< TrackListEvent > | |
Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
Constructor supporting type-erased custom allocation/deletion. More... | |
Publisher (Publisher &&)=default | |
Publisher & | operator= (Publisher &&)=default |
Subscription | Subscribe (Callback callback) |
Connect a callback to the Publisher; later-connected are called earlier. More... | |
Subscription | Subscribe (Object &obj, Return(Object::*callback)(Args...)) |
Overload of Subscribe takes an object and pointer-to-member-function. More... | |
Public Member Functions inherited from ClientData::Base | |
virtual | ~Base () |
Static Public Member Functions | |
static TrackList & | Get (AudacityProject &project) |
static const TrackList & | Get (const AudacityProject &project) |
static TrackListHolder | Create (AudacityProject *pOwner) |
template<typename TrackType > | |
static auto | SingletonRange (TrackType *pTrack) -> TrackIterRange< TrackType > |
template<typename TrackType > | |
static auto | Channels (TrackType *pTrack) -> TrackIterRange< TrackType > |
static TrackListHolder | Temporary (AudacityProject *pProject, const Track::Holder &pTrack={}) |
static void | AssignUniqueId (const Track::Holder &track) |
Assigns a new unique non-persistent id to a track. More... | |
Private Member Functions | |
TrackList (const TrackList &that)=delete | |
TrackList & | operator= (const TrackList &)=delete |
TrackList (TrackList &&that)=delete | |
TrackList & | operator= (TrackList &&)=delete |
void | clear ()=delete |
iterator | Begin () |
This private function still iterates channels not tracks. More... | |
iterator | End () |
This private function still iterates channels not tracks. More... | |
const_iterator | Begin () const |
This private function still iterates channels not tracks. More... | |
const_iterator | End () const |
This private function still iterates channels not tracks. More... | |
Track * | DoAddToHead (const std::shared_ptr< Track > &t) |
Track * | DoAdd (const std::shared_ptr< Track > &t, bool assignIds) |
template<typename TrackType = Track, typename Pred = typename TrackIterRange< TrackType >::iterator::FunctionType> | |
auto | Tracks (const Pred &pred={}) -> TrackIterRange< TrackType > |
template<typename TrackType = const Track, typename Pred = typename TrackIterRange< TrackType >::iterator::FunctionType> | |
auto | Tracks (const Pred &pred={}) const -> std::enable_if_t< std::is_const_v< TrackType >, TrackIterRange< TrackType > > |
Track * | GetPrev (Track &, bool linked=false) const |
Track * | GetNext (Track &, bool linked=false) const |
Return a track in the list that comes after Track t. More... | |
template<typename TrackType > | |
TrackIter< TrackType > | MakeTrackIterator (TrackNodePointer iter) const |
template<typename TrackType > | |
TrackIter< TrackType > | EndIterator () const |
TrackIterRange< Track > | EmptyRange () const |
bool | isNull (TrackNodePointer p) const |
TrackNodePointer | getEnd () const |
TrackNodePointer | getBegin () const |
TrackNodePointer | getNext (TrackNodePointer p) const |
Move an iterator to the next node, if any; else stay at end. More... | |
TrackNodePointer | getPrev (TrackNodePointer p) const |
Move an iterator to the previous node, if any; else wrap to end. More... | |
void | RecalcPositions (TrackNodePointer node) |
void | QueueEvent (TrackListEvent event) |
void | SelectionEvent (Track &track) |
void | PermutationEvent (TrackNodePointer node) |
void | DataEvent (const std::shared_ptr< Track > &pTrack, bool allChannels, int code) |
void | DeletionEvent (std::weak_ptr< Track > node, bool duringReplace) |
void | AdditionEvent (TrackNodePointer node) |
void | ResizingEvent (TrackNodePointer node) |
void | SwapNodes (TrackNodePointer s1, TrackNodePointer s2) |
Static Private Member Functions | |
template<typename TrackType , typename InTrackType > | |
static TrackIterRange< TrackType > | Channels_ (TrackIter< InTrackType > iter1) |
Private Attributes | |
AudacityProject * | mOwner |
bool | mAssignsIds { true } |
Static Private Attributes | |
static long | sCounter = -1 |
Friends | |
class | Track |
Additional Inherited Members | |
Static Public Attributes inherited from Observer::Publisher< TrackListEvent > | |
static constexpr bool | notifies_all |
Protected Member Functions inherited from Observer::Publisher< TrackListEvent > | |
CallbackReturn | Publish (const TrackListEvent &message) |
Send a message to connected callbacks. More... | |
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list of tracks, event notifications.
using TrackList::const_iterator = TrackIter<const Track> |
using TrackList::const_reverse_iterator = std::reverse_iterator<const_iterator> |
using TrackList::iterator = TrackIter<Track> |
using TrackList::reverse_iterator = std::reverse_iterator<iterator> |
using TrackList::value_type = Track * |
|
privatedelete |
|
privatedelete |
|
explicit |
|
virtual |
|
inline |
Add a Track, giving it a fresh id if this
is not temporary and assignIds is true
Definition at line 1048 of file Track.h.
Referenced by Append(), AppendOne(), PendingTracks::ApplyPendingTracks(), LabelTrack::Create(), AUPImportFileHandle::HandleLabelTrack(), AUPImportFileHandle::HandleNoteTrack(), AUPImportFileHandle::HandleTimeTrack(), AUPImportFileHandle::HandleWaveTrack(), Insert(), LabelTrack::PasteInto(), NoteTrack::PasteInto(), TimeTrack::PasteInto(), WaveTrack::PasteInto(), anonymous_namespace{UndoTracks.cpp}::TrackListRestorer::TrackListRestorer(), and LabelDialog::TransferDataFromWindow().
|
private |
Definition at line 442 of file Track.cpp.
References TrackListEvent::ADDITION, and QueueEvent().
Referenced by DoAdd(), DoAddToHead(), and ReplaceOne().
|
inline |
Add a Track, giving it a fresh id if this
is not temporary.
Definition at line 1042 of file Track.h.
|
inline |
Definition at line 950 of file Track.h.
References Track::IsLeader().
Referenced by anonymous_namespace{Track.cpp}::Accumulate(), audacity::cloud::audiocom::sync::anonymous_namespace{MixdownUploader.cpp}::CalculateChannels(), audacity::cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp}::CalculateChannels(), PendingTracks::ClearPendingTracks(), LabelDefaultClickHandle::Click(), anonymous_namespace{EditMenus.cpp}::CutCopyAvailableFlag(), LabelTrackView::DoKeyDown(), TimeShiftHandle::DoSlideVertical(), TrackPanel::DrawTracks(), EffectOutputTracks::EffectOutputTracks(), ControlToolBar::EnableDisableButtons(), TranscriptionToolBar::EnableDisableButtons(), anonymous_namespace{EditMenus.cpp}::EstimateCopiedBlocks(), anonymous_namespace{EditMenus.cpp}::EstimateCopyBytesCount(), LabelDialog::FindAllLabels(), anonymous_namespace{TimeShiftHandle.cpp}::FindCorrespondence(), anonymous_namespace{EditMenus.cpp}::FindCorrespondence(), ImportUtils::ForEachChannel(), GetAllSeqBlocks(), anonymous_namespace{EditMenus.cpp}::HasHiddenData(), MixerBoard::HasSolo(), ProjectFileManager::Import(), ProjectFileManager::ImportAndRunTempoDetection(), VampEffect::Init(), MakeTransportTracks(), anonymous_namespace{ExportMIDI.cpp}::NoteTracksExistFlag(), ExportFilePanel::OnChannelsConfigure(), ExportAudioDialog::OnExport(), TranscriptionToolBar::PlayAtSpeed(), TrackSelectHandle::Preview(), FindClippingBase::Process(), NyquistBase::Process(), NyquistBase::ProcessOne(), PerTrackEffect::ProcessPass(), RealtimeEffectPanel::RealtimeEffectPanel(), anonymous_namespace{TimeTrackMenuItems.cpp}::TimeTrackDoesNotExistFlag(), TracksExistFlag(), LabelDialog::TransferDataFromWindow(), ExportFilePanel::UpdateMaxChannels(), MixerBoard::UpdateTrackClusters(), TrackPanel::UpdateVRulerSize(), WaveTracksExistFlag(), ZoomInAvailableFlag(), and ZoomOutAvailableFlag().
|
inline |
Definition at line 957 of file Track.h.
References Track::IsLeader().
void TrackList::Append | ( | TrackList && | list, |
bool | assignIds = true |
||
) |
Remove all tracks from list
and put them at the end of this
assignIds | ignored if this is a temporary list; else if false, suppresses TrackId assignment |
Definition at line 875 of file Track.cpp.
Referenced by PendingTracks::RegisterPendingNewTracks().
void TrackList::AppendOne | ( | TrackList && | list | ) |
Remove first track (if any) from list
and put it at the end of this
Definition at line 886 of file Track.cpp.
Referenced by EffectOutputTracks::Commit().
|
static |
Assigns a new unique non-persistent id to a track.
Definition at line 870 of file Track.cpp.
References sCounter.
Referenced by WaveTrack::SplitChannels().
|
inline |
Definition at line 905 of file Track.h.
Referenced by PendingTracks::ApplyPendingTracks(), PendingTracks::DoSubstituteOriginalChannel(), PendingTracks::HasPendingTracks(), and SwapNodes().
|
inlineprivate |
|
inline |
|
inlineprivate |
bool TrackList::CanMoveDown | ( | Track & | t | ) | const |
Definition at line 677 of file Track.cpp.
References GetNext().
bool TrackList::CanMoveUp | ( | Track & | t | ) | const |
|
inline |
Definition at line 909 of file Track.h.
References details::begin().
|
inline |
Definition at line 910 of file Track.h.
References details::end().
|
inlinestatic |
Definition at line 1016 of file Track.h.
Referenced by DataEvent(), WaveTrack::FormatConsistencyCheck(), WaveTrack::LinkConsistencyFix(), Permute(), WaveTrack::RateConsistencyCheck(), ProjectFileManager::ReadProjectFile(), and SelectionEvent().
|
inlinestaticprivate |
Definition at line 995 of file Track.h.
References Track::Any(), and TrackIter< TrackType >::Filter().
|
privatedelete |
void TrackList::Clear | ( | bool | sendEvent = true | ) |
Make the list empty.
Definition at line 605 of file Track.cpp.
References DeletionEvent().
Referenced by ~TrackList().
|
inline |
|
static |
Definition at line 330 of file Track.cpp.
Referenced by ProjectFileManager::DoSave(), anonymous_namespace{EditMenus.cpp}::DuplicateDiscardTrimmed(), anonymous_namespace{LabelMenus.cpp}::EditClipboardByLabel(), EffectOutputTracks::EffectOutputTracks(), EffectPreview(), anonymous_namespace{EditMenus.cpp}::OnCopy(), anonymous_namespace{EditMenus.cpp}::OnCut(), anonymous_namespace{EditMenus.cpp}::OnSplitCut(), audacity::cloud::audiocom::sync::ProjectCloudExtension::OnSyncStarted(), EffectTwoPassSimpleMono::Process(), EffectAndCommandPluginManager::PromptUser(), ProjectFileManager::ReadProjectFile(), ProjectFileIO::SaveProject(), and Temporary().
|
inline |
|
private |
Definition at line 418 of file Track.cpp.
References Channels(), QueueEvent(), and TrackListEvent::TRACK_DATA_CHANGE.
|
private |
Definition at line 436 of file Track.cpp.
References TrackListEvent::DELETION, and QueueEvent().
Referenced by Clear(), Remove(), and ReplaceOne().
Track::Holder TrackList::DetachFirst | ( | ) |
Remove and return the first track.
Definition at line 897 of file Track.cpp.
References details::begin().
Definition at line 540 of file Track.cpp.
References AdditionEvent(), getEnd(), getPrev(), mAssignsIds, ChannelGroup::None, RecalcPositions(), and sCounter.
Definition at line 528 of file Track.cpp.
References AdditionEvent(), getBegin(), RecalcPositions(), sCounter, Track::SetId(), and Track::SetOwner().
auto TrackList::DoFind | ( | Track * | pTrack | ) |
Turn a pointer into a TrackIter (constant time); get end iterator if this does not own the track
Definition at line 462 of file Track.cpp.
Referenced by RecalcPositions().
bool TrackList::empty | ( | ) | const |
Definition at line 758 of file Track.cpp.
References Begin(), and End().
Referenced by anonymous_namespace{Track.cpp}::Accumulate(), ImportCommand::Apply(), ProjectFileManager::DoImport(), ApplyMacroDialog::OnApplyToFiles(), and anonymous_namespace{TimerRecordDialog.cpp}::OnTimerRecord().
|
private |
Definition at line 452 of file Track.cpp.
References Track::Any(), and getEnd().
|
inline |
Definition at line 906 of file Track.h.
Referenced by Append(), AppendOne(), PendingTracks::ApplyPendingTracks(), PendingTracks::DoSubstituteOriginalChannel(), and PendingTracks::HasPendingTracks().
|
inlineprivate |
This private function still iterates channels not tracks.
Definition at line 941 of file Track.h.
Referenced by empty(), and RecalcPositions().
|
inline |
|
inlineprivate |
|
inlineprivate |
Definition at line 930 of file Track.h.
References ActiveProjects::Find().
auto TrackList::Find | ( | Track * | pTrack | ) |
Definition at line 470 of file Track.cpp.
References Track::IsLeader().
Referenced by TimeShiftHandle::DoSlideVertical(), anonymous_namespace{TimeShiftHandle.cpp}::FindCorrespondence(), Insert(), and anonymous_namespace{ChannelView.cpp}::TrackPositioner::OnUpdate().
Definition at line 517 of file Track.cpp.
References details::begin(), and details::end().
Referenced by PendingTracks::ApplyPendingTracks(), and PendingTracks::UpdatePendingTracks().
|
static |
Definition at line 314 of file Track.cpp.
Referenced by ProjectFileManager::AddImportedTracks(), AdornedRulerPanel::AdornedRulerPanel(), AnyTracksSelectedPred(), AppendItem(), SetTrackBase::Apply(), ImportCommand::Apply(), SelectTimeCommand::Apply(), SelectTracksCommand::Apply(), SetClipCommand::Apply(), SetLabelCommand::Apply(), BrushHandleHitTest(), TrackSelectHandle::CalculateRearrangingThresholds(), TrackPanelResizeHandle::Cancel(), ProjectAudioManager::ChooseExistingRecordingTracks(), ButtonHandle::Click(), TrackPanelResizeHandle::Click(), LabelDefaultClickHandle::Click(), LabelGlyphHandle::Click(), SelectHandle::Click(), TimeShiftHandle::Click(), BackgroundHandle::Click(), Viewport::CollapseAllTracks(), ExportPluginHelpers::CreateMixer(), anonymous_namespace{EditMenus.cpp}::CutCopyAvailableFlag(), anonymous_namespace{LabelMenus.cpp}::DoAddLabel(), anonymous_namespace{TrackMenus.cpp}::DoAlign(), anonymous_namespace{SelectMenus.cpp}::DoBoundaryMove(), anonymous_namespace{ClipMenus.cpp}::DoClipLeftOrRight(), LOFImportFileHandle::doDurationAndScrollOffset(), LabelTrackView::DoEditLabels(), AudacityApplicationLogic::DoEffect(), anonymous_namespace{FileMenus.cpp}::DoExport(), ExportAudioDialog::DoExportSplitByTracks(), ProjectFileManager::DoImport(), anonymous_namespace{ImportMIDI.cpp}::DoImportMIDI(), Scrubber::DoKeyboardScrub(), LabelTrackView::DoKeyDown(), SelectUtilities::DoListSelection(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), anonymous_namespace{TransportMenus.cpp}::DoMoveToLabel(), TrackUtilities::DoMoveTrack(), anonymous_namespace{SpectrumView.cpp}::DoNextPeakFrequency(), anonymous_namespace{NavigationMenus.cpp}::DoNextTrack(), anonymous_namespace{TrackMenus.cpp}::DoPanTracks(), anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected(), anonymous_namespace{EditMenus.cpp}::DoPasteText(), anonymous_namespace{NavigationMenus.cpp}::DoPrevTrack(), ProjectAudioManager::DoRecord(), TrackUtilities::DoRemoveTrack(), TrackUtilities::DoRemoveTracks(), ProjectFileManager::DoSave(), SelectUtilities::DoSelectSomething(), anonymous_namespace{SelectUtilities.cpp}::DoSelectTimeAndAudioTracks(), SelectUtilities::DoSelectTimeAndTracks(), anonymous_namespace{TrackMenus.cpp}::DoSortTracks(), TrackUtilities::DoTrackMute(), TrackUtilities::DoTrackSolo(), ButtonHandle::Drag(), TrackPanelResizeHandle::Drag(), LabelTextHandle::Drag(), NoteTrackVZoomHandle::Drag(), TimeTrackVZoomHandle::Drag(), SelectHandle::Drag(), TimeShiftHandle::Drag(), TrackSelectHandle::Drag(), anonymous_namespace{DropoutDetector.cpp}::DropoutSubscription::DropoutSubscription(), EditableTracksSelectedPred(), audacity::cloud::ShareAudioToolbar::EnableDisableButtons(), ControlToolBar::EnableDisableButtons(), TranscriptionToolBar::EnableDisableButtons(), EstimateRemovedBlocks(), TimerRecordDialog::ExecutePostRecordActions(), Viewport::ExpandAllTracks(), GetInfoCommand::ExploreTrackPanel(), ExportAudioDialog::ExportAudioDialog(), audacity::cloud::audiocom::sync::MixdownUploader::ExportProject(), audacity::cloud::audiocom::ShareAudioDialog::ExportProject(), anonymous_namespace{ClipMenus.cpp}::FindClipBoundaries(), anonymous_namespace{ClipMenus.cpp}::FindClips(), anonymous_namespace{EditMenus.cpp}::FindSourceTracks(), TrackFocus::FindTrack(), SpectrumView::ForAll(), ProjectFileIO::GenerateDoc(), Get(), GetAllSeqBlocks(), PlotSpectrumBase::GetAudio(), ContrastBase::GetDB(), anonymous_namespace{PitchAndSpeedDialog.cpp}::GetHitClip(), GetPropertiesOfSelected(), CompareAudioCommand::GetSelection(), SliderHandle::GetSlider(), TrackFocus::GetTracks(), Viewport::GetZoomOfToFit(), LabelGlyphHandle::HandleGlyphDragRelease(), AUPImportFileHandle::HandleImport(), AUPImportFileHandle::HandleLabelTrack(), AUPImportFileHandle::HandleNoteTrack(), AUPImportFileHandle::HandleTimeTrack(), AUPImportFileHandle::HandleWaveTrack(), audacity::cloud::audiocom::sync::anonymous_namespace{MixdownUploader.cpp}::HasPlayableTracks(), ExportUtils::HasSelectedAudio(), SelectHandle::HitTest(), AUPImportFileHandle::Import(), ProjectFileManager::Import(), ProjectFileManager::ImportAndRunTempoDetection(), anonymous_namespace{ProjectFileManager.cpp}::ImportProject(), EqualizationBase::Init(), NyquistBase::Init(), ExportFilePanel::Init(), anonymous_namespace{EditMenus.cpp}::JoinClipsAvailableFlag(), anonymous_namespace{LabelMenus.cpp}::LabelsSelectedFlag(), LabelTracksExistFlag(), LOFImportFileHandle::lofOpenFiles(), Scrubber::MaybeStartScrubbing(), MixerBoard::MixerBoard(), SpectralSelectionBar::ModifySpectralSelection(), anonymous_namespace{SelectMenus.cpp}::MoveWhenAudioInactive(), anonymous_namespace{TrackMenus.cpp}::MuteTracks(), anonymous_namespace{SelectMenus.cpp}::NearestZeroCrossing(), LabelTrack::New(), NoteTrack::New(), TimeTrack::New(), WaveTrack::New(), anonymous_namespace{ExportMIDI.cpp}::NoteTracksExistFlag(), anonymous_namespace{EditMenus.cpp}::NotificationScope(), ApplyMacroDialog::OnApplyToFiles(), ExportFilePanel::OnChannelsConfigure(), ProjectManager::OnCloseWindow(), anonymous_namespace{EditMenus.cpp}::OnCopy(), anonymous_namespace{LabelMenus.cpp}::OnCopyLabels(), SelectActions::Handler::OnCursorTrackEnd(), SelectActions::Handler::OnCursorTrackStart(), anonymous_namespace{EditMenus.cpp}::OnCut(), anonymous_namespace{LabelMenus.cpp}::OnCutLabels(), anonymous_namespace{EditMenus.cpp}::OnDelete(), anonymous_namespace{LabelMenus.cpp}::OnDeleteLabels(), anonymous_namespace{EditMenus.cpp}::OnDisjoin(), anonymous_namespace{LabelMenus.cpp}::OnDisjoinLabels(), anonymous_namespace{EditMenus.cpp}::OnDuplicate(), ExportAudioDialog::OnExport(), anonymous_namespace{FileMenus.cpp}::OnExportLabels(), anonymous_namespace{ExportMIDI.cpp}::OnExportMIDI(), NavigationActions::Handler::OnFirstTrack(), ContrastDialog::OnGetBackground(), ContrastDialog::OnGetForeground(), anonymous_namespace{FileMenus.cpp}::OnImportLabels(), anonymous_namespace{EditMenus.cpp}::OnJoin(), anonymous_namespace{LabelMenus.cpp}::OnJoinLabels(), NavigationActions::Handler::OnLastTrack(), WaveTrackMenuTable::OnMergeStereo(), anonymous_namespace{LabelMenus.cpp}::OnNewLabelTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewStereoTrack(), anonymous_namespace{TimeTrackMenuItems.cpp}::OnNewTimeTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewWaveTrack(), anonymous_namespace{FileMenus.cpp}::OnOpen(), anonymous_namespace{EditMenus.cpp}::OnPaste(), anonymous_namespace{LabelMenus.cpp}::OnPasteNewLabel(), anonymous_namespace{TransportMenus.cpp}::OnPunchAndRoll(), ProjectAudioManager::OnRecord(), anonymous_namespace{EditMenus.cpp}::OnRedo(), anonymous_namespace{TrackMenus.cpp}::OnResample(), SelectActions::Handler::OnSelectAll(), SelectActions::Handler::OnSelectCursorEnd(), SelectActions::Handler::OnSelectStartCursor(), SelectActions::Handler::OnSelectSyncLockSel(), SelectActions::Handler::OnSelectTrackStartToEnd(), anonymous_namespace{EditMenus.cpp}::OnSilence(), anonymous_namespace{LabelMenus.cpp}::OnSilenceLabels(), anonymous_namespace{EditMenus.cpp}::OnSplit(), anonymous_namespace{EditMenus.cpp}::OnSplitCut(), anonymous_namespace{LabelMenus.cpp}::OnSplitCutLabels(), anonymous_namespace{EditMenus.cpp}::OnSplitDelete(), anonymous_namespace{LabelMenus.cpp}::OnSplitDeleteLabels(), anonymous_namespace{LabelMenus.cpp}::OnSplitLabels(), anonymous_namespace{EditMenus.cpp}::OnSplitNew(), audacity::cloud::audiocom::sync::ProjectCloudExtension::OnSyncStarted(), anonymous_namespace{TimerRecordDialog.cpp}::OnTimerRecord(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveBottom(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveDown(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveTop(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveUp(), anonymous_namespace{EditMenus.cpp}::OnTrim(), anonymous_namespace{EditMenus.cpp}::OnUndo(), anonymous_namespace{ChannelView.cpp}::TrackPositioner::OnUpdate(), SelectActions::Handler::OnZeroCrossing(), ProjectFileManager::OpenProjectFile(), TimeTrack::PasteInto(), anonymous_namespace{MixerBoard.cpp}::PlayableTracksExistFlag(), TranscriptionToolBar::PlayAtSpeed(), ProjectAudioManager::PlayPlayRegion(), TrackSelectHandle::Preview(), EffectTwoPassSimpleMono::Process(), NyquistBase::Process(), SpectralDataManager::ProcessTracks(), audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::ProjectBlocksLock(), WaveTrack::ProjectNyquistFrequency(), ProjectFileManager::ReadProjectFile(), RealtimeEffectPanel::RealtimeEffectPanel(), ButtonHandle::Release(), LabelTextHandle::Release(), NoteTrackButtonHandle::Release(), NoteTrackVZoomHandle::Release(), TimeTrackVZoomHandle::Release(), LabelDefaultClickHandle::RestoreState(), anonymous_namespace{UndoTracks.cpp}::TrackListRestorer::RestoreUndoRedoState(), ProjectManager::SafeToOpenProjectInto(), ProjectFileIO::SaveCopy(), LabelDefaultClickHandle::SaveState(), Viewport::ScrollToBottom(), Viewport::ScrollToEnd(), anonymous_namespace{SelectMenus.cpp}::SeekWhenAudioInactive(), NoteTrackAffordanceHandle::SelectAt(), SelectUtilities::SelectNone(), GetInfoCommand::SendClips(), GetInfoCommand::SendEnvelopes(), GetInfoCommand::SendLabels(), GetInfoCommand::SendTracks(), Viewport::ShowTrack(), Scrubber::StartKeyboardScrubbing(), StereoRequiredFlag(), anonymous_namespace{TimeTrackMenuItems.cpp}::TimeTrackDoesNotExistFlag(), anonymous_namespace{UndoTracks.cpp}::TrackListRestorer::TrackListRestorer(), TracksExistFlag(), ExportAudioDialog::UpdateLabelExportSettings(), ExportFilePanel::UpdateMaxChannels(), ProjectSettings::UpdatePrefs(), RealtimeEffectPanel::PrefsListenerHelper::UpdatePrefs(), Viewport::UpdateScrollbarsForTracks(), ExportAudioDialog::UpdateTrackExportSettings(), HighlitClipButtonHandle::UpdateTrackSelection(), AffordanceHandle::UpdateTrackSelection(), WaveTracksExistFlag(), WaveTracksSelectedFlag(), ProjectFileIO::WriteXML(), Viewport::ZoomFitHorizontally(), Viewport::ZoomFitHorizontallyAndShowTrack(), Viewport::ZoomFitVertically(), ZoomInAvailableFlag(), and ZoomOutAvailableFlag().
|
static |
Definition at line 319 of file Track.cpp.
References Get(), and project.
|
inlineprivate |
Definition at line 1180 of file Track.h.
References details::begin().
Referenced by DoAddToHead(), and Permute().
|
inlineprivate |
Definition at line 1178 of file Track.h.
References details::end().
Referenced by DoAdd(), EmptyRange(), and Remove().
double TrackList::GetEndTime | ( | ) | const |
Return the greatest end time of the tracks, or 0 when no tracks.
Definition at line 784 of file Track.cpp.
References anonymous_namespace{Track.cpp}::Accumulate(), and ChannelGroup::GetEndTime().
Referenced by SelectTimeCommand::Apply(), LOFImportFileHandle::doDurationAndScrollOffset(), Scrubber::DoKeyboardScrub(), Scrubber::MaybeStartScrubbing(), ExportAudioDialog::OnExport(), Scrubber::StartKeyboardScrubbing(), and AdornedRulerPanel::StartQPPlay().
Return a track in the list that comes after Track t.
Definition at line 622 of file Track.cpp.
References getNext(), Track::GetNode(), Track::HasLinkedTrack(), and isNull().
Referenced by CanMoveDown(), and MoveDown().
|
inlineprivate |
|
inline |
Definition at line 887 of file Track.h.
Referenced by PendingTracks::ApplyPendingTracks(), EffectOutputTracks::EffectOutputTracks(), EffectBase::FindProject(), and StereoToMono::ProcessOne().
|
inline |
Definition at line 638 of file Track.cpp.
References Track::GetLinkedTrack(), Track::GetNode(), getPrev(), Track::HasLinkedTrack(), and isNull().
Referenced by CanMoveUp(), and MoveUp().
|
inlineprivate |
Move an iterator to the previous node, if any; else wrap to end.
Definition at line 1194 of file Track.h.
Referenced by DoAdd(), GetPrev(), and RecalcPositions().
double TrackList::GetStartTime | ( | ) | const |
Return the least start time of the tracks, or 0 when no tracks.
Definition at line 778 of file Track.cpp.
References anonymous_namespace{Track.cpp}::Accumulate(), ChannelGroup::GetStartTime(), and min().
Referenced by AdornedRulerPanel::StartQPPlay().
void TrackList::Insert | ( | const Track * | before, |
const Track::Holder & | pSrc, | ||
bool | assignIds = false |
||
) |
Moves *pSrc to position where before
is located. If before
is nullptr the track is appended.
assignIds | ignored if this is a temporary list; else if false, suppresses TrackId assignment |
before == nullptr || (Find(before) != EndIterator<const Track>())
Definition at line 478 of file Track.cpp.
References Add(), Find(), Permute(), and Size().
Referenced by PendingTracks::ApplyPendingTracks().
|
inlineprivate |
Definition at line 1177 of file Track.h.
References details::end().
Referenced by GetNext(), GetPrev(), RecalcPositions(), Remove(), and SwapNodes().
|
inline |
Definition at line 1079 of file Track.h.
Referenced by ButtonHandle::Click(), ButtonHandle::Drag(), LabelTextHandle::Drag(), NoteTrackVZoomHandle::Drag(), TimeTrackVZoomHandle::Drag(), SliderHandle::GetSlider(), TrackPanel::ProcessUIHandleResult(), ButtonHandle::Release(), LabelTextHandle::Release(), NoteTrackButtonHandle::Release(), NoteTrackVZoomHandle::Release(), TimeTrackVZoomHandle::Release(), LabelDefaultClickHandle::RestoreState(), and NoteTrackAffordanceHandle::SelectAt().
|
inlineprivate |
wxString TrackList::MakeUniqueTrackName | ( | const wxString & | baseTrackName | ) | const |
Returns string that contains baseTrackName, but is guaranteed to be unique among other tracks in that list.
baseTrackName | String to be put into the template |
Definition at line 369 of file Track.cpp.
References name.
Referenced by LabelTrack::Create().
bool TrackList::MoveDown | ( | Track & | t | ) |
Definition at line 748 of file Track.cpp.
References GetNext(), Track::GetNode(), and SwapNodes().
bool TrackList::MoveUp | ( | Track & | t | ) |
Definition at line 738 of file Track.cpp.
References Track::GetNode(), GetPrev(), and SwapNodes().
|
private |
Definition at line 431 of file Track.cpp.
References TrackListEvent::PERMUTED, and QueueEvent().
Referenced by Permute(), and SwapNodes().
void TrackList::Permute | ( | const std::vector< Track * > & | tracks | ) |
tracks
contains pointers only to tracks of this, and each of them exactly once Definition at line 500 of file Track.cpp.
References Channels(), details::end(), getBegin(), PermutationEvent(), RecalcPositions(), Track::SetOwner(), and tracks.
Referenced by Insert().
|
private |
Definition at line 403 of file Track.cpp.
References BasicUI::CallAfter().
Referenced by AdditionEvent(), DataEvent(), DeletionEvent(), PermutationEvent(), ResizingEvent(), and SelectionEvent().
|
inline |
Definition at line 915 of file Track.h.
Referenced by ChannelView::GetTotalHeight().
|
inline |
|
private |
Definition at line 387 of file Track.cpp.
References DoFind(), End(), getPrev(), and isNull().
Referenced by DoAdd(), DoAddToHead(), Permute(), Remove(), ReplaceOne(), and SwapNodes().
Remove a track and return it.
Definition at line 584 of file Track.cpp.
References DeletionEvent(), getEnd(), getNext(), isNull(), and RecalcPositions().
Referenced by PendingTracks::ClearPendingTracks(), and EffectOutputTracks::Commit().
|
inline |
|
inline |
Track::Holder TrackList::ReplaceOne | ( | Track & | t, |
TrackList && | with | ||
) |
Replace track t
with the first track in the given list, return the removed track, modify given list by removing first track
Give the replacements the same ids as the replaced
t.GetOwner().get() == this
!with.empty()
Move one track to the temporary list
Redirect the list element of this
Definition at line 560 of file Track.cpp.
References AdditionEvent(), DeletionEvent(), Track::GetNode(), Track::GetOwner(), RecalcPositions(), and Track::SetOwner().
Referenced by PendingTracks::ApplyPendingTracks(), and EffectOutputTracks::Commit().
|
private |
Definition at line 447 of file Track.cpp.
References QueueEvent(), and TrackListEvent::RESIZING.
|
inline |
Definition at line 967 of file Track.h.
References Track::IsSelected().
Referenced by LoudnessBase::AllocBuffers(), AnyTracksSelectedPred(), EditableTracksSelectedPred(), TranscriptionToolBar::EnableDisableButtons(), anonymous_namespace{EditMenus.cpp}::FindCorrespondence(), PlotSpectrumBase::GetAudio(), ContrastBase::GetDB(), GetPropertiesOfSelected(), TrackPanel::GetSelectedTrackCount(), CompareAudioCommand::GetSelection(), AmplifyBase::Init(), EqualizationBase::Init(), ScienFilterBase::Init(), NyquistBase::Init(), LegacyCompressorBase::InitPass1(), anonymous_namespace{EditMenus.cpp}::JoinClipsAvailableFlag(), anonymous_namespace{LabelMenus.cpp}::LabelsSelectedFlag(), LabelTracksExistFlag(), ContrastDialog::OnGetBackground(), ContrastDialog::OnGetForeground(), ProjectAudioManager::OnRecord(), StereoRequiredFlag(), and WaveTracksSelectedFlag().
|
inline |
Definition at line 973 of file Track.h.
References Track::IsSelected().
|
private |
Definition at line 411 of file Track.cpp.
References Channels(), QueueEvent(), and TrackListEvent::SELECTION_CHANGE.
|
inlinestatic |
Definition at line 981 of file Track.h.
References TrackIterRange< TrackType >::EndingAfter(), and TrackIterRange< TrackType >::StartingWith().
Referenced by TruncSilenceBase::ProcessIndependently(), and SelectionState::SelectTrackLength().
|
inline |
Definition at line 1091 of file Track.h.
References Track::Any().
Referenced by Insert().
void TrackList::Swap | ( | TrackList & | that | ) |
!GetOwner() && !that.GetOwner()
Definition at line 346 of file Track.cpp.
|
private |
Definition at line 685 of file Track.cpp.
References begin(), details::begin(), isNull(), PermutationEvent(), RecalcPositions(), and anonymous_namespace{NoteTrack.cpp}::swap().
Referenced by MoveDown(), and MoveUp().
|
static |
Construct a temporary list owned by pProject
(if that is not null) and owning pTrack TrackIds are not changed
pTrack == nullptr || pTrack->GetOwner() == nullptr
Definition at line 858 of file Track.cpp.
References Create().
Referenced by PendingTracks::ApplyPendingTracks(), WaveTrackFactory::CreateMany(), ModifiedAnalysisTrack::ModifiedAnalysisTrack(), WaveTrack::MonoToStereo(), BenchmarkDialog::OnRun(), StereoToMono::ProcessOne(), PerTrackEffect::ProcessPass(), and ModifiedAnalysisTrack::~ModifiedAnalysisTrack().
|
inlineprivate |
Definition at line 1132 of file Track.h.
|
inlineprivate |
|
private |
|
private |
|
staticprivate |
Definition at line 1220 of file Track.h.
Referenced by AssignUniqueId(), DoAdd(), and DoAddToHead().