![]() |
Audacity 3.2.0
|
Abstract base class for an object holding data associated with points on a time axis. More...
#include <Track.h>
Classes | |
struct | ChannelGroupData |
struct | Dispatcher |
Helper for recursive case of metafunction implementing Track::TypeSwitch. More... | |
struct | Executor |
Variadic template implements metafunction with specializations, to dispatch Track::TypeSwitch. More... | |
struct | Executor< Tag, R, ArgumentType > |
Base case of metafunction implementing Track::TypeSwitch. More... | |
struct | Executor< Tag, R, ArgumentType, Function, Functions... > |
Implements Track::TypeSwitch, its operator() invokes the first function that can accept ArgumentType*. More... | |
struct | ProtectedCreationArg |
Empty argument passed to some public constructors. More... | |
struct | TypeInfo |
struct | TypeNames |
Names of a track type for various purposes. More... | |
Public Types | |
enum class | LinkType : int { None = 0 , Group = 2 , Aligned } |
For two tracks describes the type of the linkage. More... | |
using | ChannelGroupAttachments = ClientData::Site< ChannelGroupData, ClientData::Cloneable<>, ClientData::DeepCopying > |
Hosting of objects attached by higher level code. More... | |
using | AttachedObjects = ::AttachedTrackObjects |
Alias for my base type. More... | |
using | IntervalData = TrackIntervalData |
using | Interval = TrackInterval |
using | Intervals = std::vector< Interval > |
using | ConstInterval = ConstTrackInterval |
using | ConstIntervals = std::vector< ConstInterval > |
using | Holder = std::shared_ptr< Track > |
template<typename R = void> | |
using | Continuation = std::function< R() > |
Type of arguments passed as optional second parameter to TypeSwitch() cases. More... | |
using | Fallthrough = Continuation<> |
Type of arguments passed as optional second parameter to TypeSwitch<void>() cases. More... | |
![]() | |
using | DataType = ClientData |
using | DataPointer = Pointer< ClientData > |
using | DataFactory = std::function< DataPointer(Host &) > |
Type of function from which RegisteredFactory is constructed; it builds attachments. More... | |
Public Member Functions | |
TrackId | GetId () const |
template<typename Subclass = Track> | |
std::shared_ptr< Subclass > | SharedPointer () |
template<typename Subclass = const Track> | |
auto | SharedPointer () const -> std::enable_if_t< std::is_const_v< Subclass >, std::shared_ptr< Subclass > > |
std::shared_ptr< Track > | SubstitutePendingChangedTrack () |
std::shared_ptr< const Track > | SubstitutePendingChangedTrack () const |
std::shared_ptr< const Track > | SubstituteOriginalTrack () const |
virtual const TypeInfo & | GetTypeInfo () const =0 |
virtual const TypeNames & | GetTypeNames () const |
virtual bool | SupportsBasicEditing () const |
Whether this track type implements cut-copy-paste; by default, true. More... | |
virtual Holder | PasteInto (AudacityProject &) const =0 |
Find or create the destination track for a paste, maybe in a different project. More... | |
virtual ConstIntervals | GetIntervals () const |
Report times on the track where important intervals begin and end, for UI to snap to. More... | |
virtual Intervals | GetIntervals () |
virtual bool | LinkConsistencyFix (bool doFix=true, bool completeList=true) |
Check consistency of channel groups, and maybe fix it. More... | |
bool | LinkConsistencyCheck (bool completeList) |
Do the non-mutating part of consistency fix only and return status. More... | |
bool | HasOwner () const |
std::shared_ptr< TrackList > | GetOwner () const |
LinkType | GetLinkType () const noexcept |
bool | IsAlignedWithLeader () const |
Returns true if the leader track has link type LinkType::Aligned. More... | |
ChannelGroupData & | GetGroupData () |
const ChannelGroupData & | GetGroupData () const |
Track () | |
Track (const Track &orig, ProtectedCreationArg &&) | |
Track & | operator= (const Track &orig)=delete |
virtual | ~Track () |
void | Init (const Track &orig) |
virtual Holder | Duplicate () const |
const wxString & | GetName () const |
Name is always the same for all channels of a group. More... | |
void | SetName (const wxString &n) |
bool | GetSelected () const |
Selectedness is always the same for all channels of a group. More... | |
virtual void | SetSelected (bool s) |
void | EnsureVisible (bool modifyState=false) |
virtual double | GetOffset () const =0 |
void | Offset (double t) |
virtual void | SetOffset (double o) |
virtual Holder | Cut (double WXUNUSED(t0), double WXUNUSED(t1))=0 |
virtual Holder | Copy (double WXUNUSED(t0), double WXUNUSED(t1), bool forClipboard=true) const =0 |
virtual void | Clear (double WXUNUSED(t0), double WXUNUSED(t1))=0 |
virtual void | Paste (double WXUNUSED(t), const Track *WXUNUSED(src))=0 |
virtual void | SyncLockAdjust (double oldT1, double newT1) |
virtual void | Silence (double WXUNUSED(t0), double WXUNUSED(t1))=0 |
virtual void | InsertSilence (double WXUNUSED(t), double WXUNUSED(len))=0 |
bool | SameKindAs (const Track &track) const |
template<typename R = void, typename ... Functions> | |
R | TypeSwitch (const Functions &...functions) |
Use this function rather than testing track type explicitly and making down-casts. More... | |
template<typename R = void, typename ... Functions> | |
R | TypeSwitch (const Functions &...functions) const |
Use this function rather than testing track type explicitly and making down-casts. More... | |
virtual void | WriteXML (XMLWriter &xmlFile) const =0 |
virtual bool | GetErrorOpening () |
virtual double | GetStartTime () const =0 |
virtual double | GetEndTime () const =0 |
void | Notify (bool allChannels, int code=-1) |
bool | Any () const |
bool | IsSelected () const |
bool | IsLeader () const |
bool | IsSelectedLeader () const |
void | AdjustPositions () |
void | WriteCommonXMLAttributes (XMLWriter &xmlFile, bool includeNameAndSelected=true) const |
bool | HandleCommonXMLAttribute (const std::string_view &attr, const XMLAttributeValueView &valueView) |
![]() | |
XMLTagHandler () | |
virtual | ~XMLTagHandler () |
virtual bool | HandleXMLTag (const std::string_view &tag, const AttributesList &attrs)=0 |
virtual void | HandleXMLEndTag (const std::string_view &WXUNUSED(tag)) |
virtual void | HandleXMLContent (const std::string_view &WXUNUSED(content)) |
virtual XMLTagHandler * | HandleXMLChild (const std::string_view &tag)=0 |
void | ReadXMLEndTag (const char *tag) |
void | ReadXMLContent (const char *s, int len) |
XMLTagHandler * | ReadXMLChild (const char *tag) |
![]() | |
~Site () | |
Site () | |
Site (const Site &other) | |
Site & | operator= (const Site &other) |
Site (Site &&other) | |
Site & | operator= (Site &&other) |
size_t | size () const |
How many attachment pointers are in the Site. More... | |
template<typename Subclass = ClientData> | |
Subclass & | Get (const RegisteredFactory &key) |
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More... | |
template<typename Subclass = const ClientData> | |
auto | Get (const RegisteredFactory &key) const -> std::enable_if_t< std::is_const< Subclass >::value, Subclass & > |
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More... | |
template<typename Subclass = ClientData> | |
Subclass * | Find (const RegisteredFactory &key) |
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More... | |
template<typename Subclass = const ClientData> | |
auto | Find (const RegisteredFactory &key) const -> std::enable_if_t< std::is_const< Subclass >::value, Subclass * > |
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More... | |
template<typename ReplacementPointer > | |
void | Assign (const RegisteredFactory &key, ReplacementPointer &&replacement) |
Reassign Site's pointer to ClientData. More... | |
Static Public Member Functions | |
template<typename Subclass = Track> | |
static std::shared_ptr< Subclass > | SharedPointer (Track *pTrack) |
template<typename Subclass = const Track> | |
static std::shared_ptr< Subclass > | SharedPointer (const Track *pTrack) |
static const TypeInfo & | ClassTypeInfo () |
static void | FinishCopy (const Track *n, Track *dest) |
template<typename TrackType > | |
static void | checkTrackType () |
template<typename R , typename TrackType , typename... Functions> | |
static R | CallExecutor (R *, std::tuple<> *, TrackType &, const Functions &...) |
template<typename R , typename TrackType , typename... Functions, typename Executor , typename... Executors> | |
static R | CallExecutor (R *, std::tuple< Executor, Executors... > *, TrackType &track, const Functions &...functions) |
template<typename ... Executors> | |
static constexpr unsigned | UsedCases (std::tuple< Executors... > *) |
template<typename Tag , bool IsConst, typename R , typename ... TrackTypes, typename ... Functions> | |
static R | DoTypeSwitch (std::conditional_t< IsConst, const Track, Track > &track, TypeList::List< TrackTypes... >, const Functions &...functions) |
Deduce two packs from arguments. More... | |
![]() | |
static size_t | slots () |
How many static factories have been registered with this specialization of Site. More... | |
Public Attributes | |
std::pair< int, int > | vrulerSize |
Protected Member Functions | |
void | SetLinkType (LinkType linkType, bool completeList=true) |
![]() | |
template<typename Function > | |
void | ForEach (const Function &function) |
Invoke function on each ClientData object that has been created in this . More... | |
template<typename Function > | |
void | ForEach (const Function &function) const |
Invoke function on each ClientData object that has been created in this . More... | |
template<typename Function > | |
ClientData * | FindIf (const Function &function) |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
template<typename Function > | |
const ClientData * | FindIf (const Function &function) const |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
void | BuildAll () |
For each RegisteredFactory, if the corresponding attachment is absent in this , build and store it. More... | |
Protected Attributes | |
std::weak_ptr< TrackList > | mList |
TrackNodePointer | mNode {} |
Holds iterator to self, so that TrackList::Find can be constant-time. More... | |
int | mIndex |
0-based position of this track in its TrackList More... | |
double | mOffset |
Private Member Functions | |
void | SetId (TrackId id) |
int | GetIndex () const |
void | SetIndex (int index) |
ChannelGroupData & | MakeGroupData () |
void | DoSetLinkType (LinkType linkType, bool completeList=true) |
Track * | GetLinkedTrack () const |
bool | HasLinkedTrack () const noexcept |
Returns true for leaders of multichannel groups. More... | |
TrackNodePointer | GetNode () const |
Retrieve mNode with debug checks. More... | |
void | SetOwner (const std::weak_ptr< TrackList > &list, TrackNodePointer node) |
Update mNode when Track is added to TrackList, or removed from it. More... | |
virtual Holder | Clone () const =0 |
Private Attributes | |
TrackId | mId |
Identifies the track only in-session, not persistently. More... | |
std::unique_ptr< ChannelGroupData > | mpGroupData |
Friends | |
class | TrackList |
template<typename T > | |
std::enable_if_t< std::is_pointer_v< T >, T > | track_cast (Track *track) |
Encapsulate the checked down-casting of track pointers. More... | |
template<typename T > | |
std::enable_if_t< std::is_pointer_v< T > &&std::is_const_v< std::remove_pointer_t< T > >, T > | track_cast (const Track *track) |
Encapsulate the checked down-casting of track pointers. More... | |
Abstract base class for an object holding data associated with points on a time axis.
Fundamental data object of Audacity, displayed in the TrackPanel. Classes derived form it include the WaveTrack, NoteTrack, LabelTrack and TimeTrack.
using Track::ConstIntervals = std::vector< ConstInterval > |
using Track::Continuation = std::function< R() > |
Type of arguments passed as optional second parameter to TypeSwitch() cases.
using Track::Fallthrough = Continuation<> |
Type of arguments passed as optional second parameter to TypeSwitch<void>() cases.
using Track::Holder = std::shared_ptr<Track> |
using Track::Interval = TrackInterval |
using Track::IntervalData = TrackIntervalData |
using Track::Intervals = std::vector< Interval > |
|
strong |
Track::Track | ( | ) |
Track::Track | ( | const Track & | orig, |
ProtectedCreationArg && | |||
) |
void Track::AdjustPositions | ( | ) |
Definition at line 1190 of file Track.cpp.
bool Track::Any | ( | ) | const |
Definition at line 290 of file Track.cpp.
Referenced by EffectLoudness::AllocBuffers(), TrackList::Channels_(), ExportPlugin::CreateMixer(), anonymous_namespace{NavigationMenus.cpp}::DoPrevTrack(), TrackList::EmptyRange(), Exporter::ExamineTracks(), ExportMixerDialog::ExportMixerDialog(), AUPImportFileHandle::HandleImport(), anonymous_namespace{ProjectFileManager.cpp}::ImportProject(), MakeTransportTracks(), anonymous_namespace{LabelMenus.cpp}::OnPasteNewLabel(), anonymous_namespace{MixerBoard.cpp}::PlayableTracksExistFlag(), EffectLoudness::Process(), EffectNormalize::Process(), and ProjectWindow::ZoomAfterImport().
|
inlinestatic |
Definition at line 675 of file Track.h.
|
inlinestatic |
Definition at line 660 of file Track.h.
|
inlinestatic |
|
static |
Definition at line 1126 of file Track.cpp.
References XO().
Referenced by AudioTrack::ClassTypeInfo(), and typeInfo().
|
pure virtual |
Referenced by anonymous_namespace{LabelMenus.cpp}::OnDeleteLabels(), and SyncLockAdjust().
|
privatepure virtual |
Implemented in TimeTrack, WaveTrack, LabelTrack, and NoteTrack.
Referenced by Duplicate(), and TrackList::RegisterPendingChangedTrack().
|
pure virtual |
|
pure virtual |
|
private |
completeList | only influences debug build consistency checking |
Definition at line 187 of file Track.cpp.
References GetLinkedTrack(), GetLinkType(), HasLinkedTrack(), LinkConsistencyCheck(), MakeGroupData(), Track::ChannelGroupData::mLinkType, mpGroupData, and None.
Referenced by SetLinkType().
|
inlinestatic |
Deduce two packs from arguments.
Definition at line 707 of file Track.h.
|
virtual |
Definition at line 101 of file Track.cpp.
References Clone(), and ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::ForEach().
void Track::EnsureVisible | ( | bool | modifyState = false | ) |
Definition at line 94 of file Track.cpp.
References mList, and SharedPointer().
Referenced by anonymous_namespace{LabelMenus.cpp}::DoAddLabel(), EffectUI::DoEffect(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected(), anonymous_namespace{NavigationMenus.cpp}::DoPrevTrack(), TrackUtilities::DoRemoveTracks(), TrackPanel::OnMouseEvent(), anonymous_namespace{LabelMenus.cpp}::OnNewLabelTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewStereoTrack(), anonymous_namespace{TimeTrackMenuItems.cpp}::OnNewTimeTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewWaveTrack(), anonymous_namespace{LabelMenus.cpp}::OnPasteNewLabel(), anonymous_namespace{EditMenus.cpp}::OnRedo(), NavigationActions::Handler::OnToggle(), anonymous_namespace{EditMenus.cpp}::OnUndo(), TrackPanel::ProcessUIHandleResult(), and ProjectWindow::ZoomAfterImport().
Definition at line 304 of file Track.cpp.
References mpGroupData.
Referenced by anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected(), anonymous_namespace{LabelMenus.cpp}::EditClipboardByLabel(), anonymous_namespace{EditMenus.cpp}::FinishCopy(), and anonymous_namespace{ProjectFileManager.cpp}::ImportProject().
|
pure virtual |
Implemented in TimeTrack, WaveTrack, LabelTrack, and NoteTrack.
Referenced by WaveTrack::ClearAndPaste(), anonymous_namespace{TrackMenus.cpp}::DoAlign(), ExportMultipleDialog::ExportMultipleByTrack(), TrackList::GetEndTime(), StretchHandle::GetT1(), SelectActions::Handler::OnCursorTrackEnd(), ProjectAudioManager::OnRecord(), SelectActions::Handler::OnSelectCursorEnd(), SelectActions::Handler::OnSelectTrackStartToEnd(), NyquistEffect::ProcessOne(), SelectionState::SelectTrackLength(), and SyncLockAdjust().
|
inlinevirtual |
Track::ChannelGroupData & Track::GetGroupData | ( | ) |
Definition at line 171 of file Track.cpp.
References GetOwner().
Referenced by SpectrogramSettings::Get(), WaveformSettings::Get(), WaveformScale::Get(), anonymous_namespace{PlayableTrack.cpp}::MuteAndSolo::Get(), RealtimeEffectList::Get(), anonymous_namespace{WaveTrackView.cpp}::PlacementArray::Get(), anonymous_namespace{WaveTrack.cpp}::GainAndPan::Get(), SpectrogramBounds::Get(), GetGroupData(), GetName(), GetSelected(), SpectrogramSettings::Own(), SpectrogramSettings::Reset(), WaveformSettings::Set(), SetName(), and SetSelected().
const Track::ChannelGroupData & Track::GetGroupData | ( | ) | const |
Definition at line 181 of file Track.cpp.
References GetGroupData().
|
inline |
Definition at line 214 of file Track.h.
Referenced by TrackList::HasPendingTracks(), TrackPanelAx::IsFocused(), SetLinkType(), SubstituteOriginalTrack(), and SubstitutePendingChangedTrack().
|
private |
Definition at line 134 of file Track.cpp.
References mIndex.
Referenced by TrackList::RecalcPositions().
|
virtual |
This overload exposes the extra data of the intervals as non-const This overload exposes the extra data of the intervals as non-const
Reimplemented in WaveTrack, LabelTrack, and NoteTrack.
Definition at line 1143 of file Track.cpp.
|
virtual |
Report times on the track where important intervals begin and end, for UI to snap to.
Some intervals may be empty, and no ordering of the intervals is assumed.
Reimplemented in WaveTrack, LabelTrack, and NoteTrack.
Definition at line 1138 of file Track.cpp.
Referenced by TrackShifter::InitIntervals().
|
private |
Definition at line 234 of file Track.cpp.
References HasLinkedTrack(), mList, and mNode.
Referenced by DoSetLinkType(), TrackList::GetPrev(), IsLeader(), and LinkConsistencyFix().
|
noexcept |
Definition at line 1212 of file Track.cpp.
References mpGroupData, and None.
Referenced by WaveClipTrimHandle::AdjustBetweenBorders::AdjustBetweenBorders(), DoSetLinkType(), WaveClipTrimHandle::AdjustBorder::FindSnapPoints(), ClipMoveState::Init(), and WaveTrack::LinkConsistencyFix().
const wxString & Track::GetName | ( | ) | const |
Name is always the same for all channels of a group.
Definition at line 64 of file Track.cpp.
References GetGroupData(), and Track::ChannelGroupData::mName.
Referenced by ProjectFileManager::AddImportedTracks(), LabelDialog::AddLabels(), CompareAudioCommand::Apply(), TrackInfo::CloseTitleDrawFunction(), TrackUtilities::DoMoveTrack(), TrackUtilities::DoRemoveTrack(), anonymous_namespace{TrackMenus.cpp}::DoSortTracks(), anonymous_namespace{TrackPanel.cpp}::DrawTrackName(), MixerBoard::GetMusicalInstrumentBitmap(), anonymous_namespace{TrackPanel.cpp}::GetTrackNameExtent(), TimeTrack::Init(), WaveTrack::Join(), WaveTrack::LinkConsistencyFix(), LinkConsistencyFix(), WaveTrack::MakeNewClipName(), WaveTrackMenuTable::OnMergeStereo(), TrackMenuTable::OnSetName(), anonymous_namespace{SpectrumView.cpp}::SpectrogramSettingsHandler::OnSpectrogramSettings(), WaveTrackMenuTable::OnSplitStereo(), WaveTrackMenuTable::OnSplitStereoMono(), WaveTrackMenuTable::OnSwapChannels(), EffectFindClipping::Process(), RateMenuTable::SetRate(), RealtimeEffectStateUI::UpdateTrackData(), and WriteCommonXMLAttributes().
|
private |
Retrieve mNode with debug checks.
Definition at line 119 of file Track.cpp.
Referenced by TrackList::GetNext(), TrackList::GetPrev(), TrackList::MoveDown(), TrackList::MoveUp(), and TrackList::Remove().
|
pure virtual |
Implemented in TimeTrack, WaveTrack, LabelTrack, and NoteTrack.
Referenced by anonymous_namespace{TrackMenus.cpp}::DoAlign(), TrackList::GetMinOffset(), SelectActions::Handler::OnCursorTrackStart(), and SelectionState::SelectTrackLength().
|
inline |
Definition at line 333 of file Track.h.
Referenced by RealtimeEffectManager::AddTrack(), TrackShifter::CommonMayMigrateTo(), WaveClipTrimHandle::AdjustBorder::FindSnapPoints(), anonymous_namespace{SyncLock.cpp}::FindSyncLockGroup(), GetGroupData(), anonymous_namespace{TimeTrack.cpp}::GetRate(), SyncLock::Group(), IsAlignedWithLeader(), SyncLock::IsSyncLockSelected(), WaveTrack::LinkConsistencyFix(), WaveTrack::PasteWaveTrack(), and TrackList::SwapChannels().
bool Track::GetSelected | ( | ) | const |
Selectedness is always the same for all channels of a group.
Definition at line 78 of file Track.cpp.
References GetGroupData(), and Track::ChannelGroupData::mSelected.
Referenced by ClipParameters::ClipParameters(), TrackInfo::CloseTitleDrawFunction(), anonymous_namespace{NavigationMenus.cpp}::DoPrevTrack(), TrackArt::DrawBackgroundWithSelection(), anonymous_namespace{WaveformView.cpp}::DrawClipWaveform(), TrackInfo::DrawCloseButton(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack(), anonymous_namespace{PlayableTrackControls.cpp}::EffectsDrawFunction(), anonymous_namespace{ClipMenus.cpp}::FindClipBoundaries(), anonymous_namespace{ClipMenus.cpp}::FindClips(), SelectionState::HandleListSelection(), IsSelected(), SyncLock::IsSyncLockSelected(), TrackInfo::MinimizeSyncLockDrawFunction(), anonymous_namespace{PlayableTrackControls.cpp}::MuteOrSoloDrawFunction(), NavigationActions::Handler::OnToggle(), EffectChangeSpeed::Process(), Generator::Process(), EffectRepeat::Process(), EffectSBSMS::Process(), LabelTrack::SetSelected(), and WriteCommonXMLAttributes().
|
pure virtual |
Implemented in TimeTrack, WaveTrack, LabelTrack, and NoteTrack.
Referenced by anonymous_namespace{TrackMenus.cpp}::DoAlign(), ExportMultipleDialog::ExportMultipleByTrack(), TrackList::GetStartTime(), StretchHandle::GetT0(), SelectActions::Handler::OnSelectStartCursor(), SelectActions::Handler::OnSelectTrackStartToEnd(), and NyquistEffect::ProcessOne().
|
pure virtual |
Implemented in SampleTrack, WritableSampleTrack, TimeTrack, WaveTrack, LabelTrack, and NoteTrack.
Referenced by SameKindAs().
|
inlinevirtual |
bool Track::HandleCommonXMLAttribute | ( | const std::string_view & | attr, |
const XMLAttributeValueView & | valueView | ||
) |
Definition at line 1165 of file Track.cpp.
References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::ForEach(), SetName(), SetSelected(), XMLAttributeValueView::ToWString(), and XMLAttributeValueView::TryGet().
Referenced by TimeTrack::HandleXMLTag(), WaveTrack::HandleXMLTag(), LabelTrack::HandleXMLTag(), and NoteTrack::HandleXMLTag().
|
privatenoexcept |
Returns true for leaders of multichannel groups.
Definition at line 260 of file Track.cpp.
References mpGroupData, and None.
Referenced by DoSetLinkType(), GetLinkedTrack(), TrackList::GetNext(), TrackList::GetPrev(), IsLeader(), LinkConsistencyFix(), and TrackList::SwapChannels().
|
inline |
void Track::Init | ( | const Track & | orig | ) |
Definition at line 55 of file Track.cpp.
References mId, and mpGroupData.
Referenced by TimeTrack::Init(), and WaveTrack::Init().
|
pure virtual |
bool Track::IsAlignedWithLeader | ( | ) | const |
Returns true if the leader track has link type LinkType::Aligned.
Definition at line 1217 of file Track.cpp.
References Aligned, and GetOwner().
Referenced by WaveClipTrimHandle::AdjustBetweenBorders::AdjustBetweenBorders(), and ClipMoveState::Init().
bool Track::IsLeader | ( | ) | const |
Definition at line 296 of file Track.cpp.
References GetLinkedTrack(), and HasLinkedTrack().
Referenced by anonymous_namespace{FileMenus.cpp}::DoExport(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), anonymous_namespace{TrackPanel.cpp}::DrawTrackName(), TrackList::FindLeader(), SampleTrack::GetChannelType(), IsSelectedLeader(), TrackList::Leaders(), EffectLoudness::Process(), EffectNormalize::Process(), and StereoRequiredFlag().
bool Track::IsSelected | ( | ) | const |
Definition at line 293 of file Track.cpp.
References GetSelected().
Referenced by ProjectAudioManager::ChooseExistingRecordingTracks(), ExportPlugin::CreateMixer(), anonymous_namespace{TrackMenus.cpp}::DoPanTracks(), Exporter::ExamineTracks(), ExportMixerDialog::ExportMixerDialog(), IsSelectedLeader(), SyncLock::IsSelectedOrSyncLockSelected(), SyncLock::IsSyncLockSelected(), MakeTransportTracks(), ProjectAudioManager::OnRecord(), SelectActions::Handler::OnSelectSyncLockSel(), EffectPaulstretch::Process(), EffectTruncSilence::ProcessIndependently(), and TrackList::Selected().
bool Track::IsSelectedLeader | ( | ) | const |
Definition at line 301 of file Track.cpp.
References IsLeader(), and IsSelected().
Referenced by TrackList::SelectedLeaders().
|
inline |
Do the non-mutating part of consistency fix only and return status.
Definition at line 328 of file Track.h.
Referenced by DoSetLinkType().
|
virtual |
Check consistency of channel groups, and maybe fix it.
doFix | whether to make any changes to correct inconsistencies |
completeList | whether to assume that the TrackList containing this is completely loaded; if false, skip some of the checks |
Reimplemented in WaveTrack.
Definition at line 313 of file Track.cpp.
References GetLinkedTrack(), GetName(), HasLinkedTrack(), None, and SetLinkType().
Referenced by WaveTrack::LinkConsistencyFix().
|
private |
Definition at line 163 of file Track.cpp.
References mpGroupData.
Referenced by DoSetLinkType().
void Track::Notify | ( | bool | allChannels, |
int | code = -1 |
||
) |
Definition at line 265 of file Track.cpp.
References mList, and SharedPointer().
Referenced by WaveTrack::SetGain(), PlayableTrack::SetMute(), SetName(), WaveTrack::SetPan(), and PlayableTrack::SetSolo().
|
inline |
Definition at line 403 of file Track.h.
Referenced by TrackShifter::DoHorizontalOffset(), EffectPreview(), and StretchHandle::Stretch().
|
pure virtual |
|
pure virtual |
Find or create the destination track for a paste, maybe in a different project.
use_count()
can tell whether it is new Implemented in TimeTrack, WaveTrack, LabelTrack, and NoteTrack.
Referenced by anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected().
|
inline |
Definition at line 452 of file Track.h.
References GetTypeInfo().
Referenced by TrackShifter::CommonMayMigrateTo(), and anonymous_namespace{TimeShiftHandle.cpp}::FindCorrespondence().
|
inlineprivate |
Definition at line 216 of file Track.h.
References id.
Referenced by TrackList::DoAddToHead(), and TrackList::Replace().
|
private |
Definition at line 139 of file Track.cpp.
References mIndex.
Referenced by TrackList::RecalcPositions().
|
protected |
completeList | only influences debug build consistency checking |
Definition at line 144 of file Track.cpp.
References DoSetLinkType(), GetId(), mList, and mNode.
Referenced by WaveTrack::HandleXMLTag(), WaveTrack::LinkConsistencyFix(), and LinkConsistencyFix().
void Track::SetName | ( | const wxString & | n | ) |
Definition at line 69 of file Track.cpp.
References GetGroupData(), Track::ChannelGroupData::mName, name, and Notify().
Referenced by SetTrackStatusCommand::ApplyInner(), TimeTrack::CleanState(), HandleCommonXMLAttribute(), ImportMIDI(), TimeTrack::Init(), ModifiedAnalysisTrack::ModifiedAnalysisTrack(), NoteTrack::NoteTrack(), and TrackMenuTable::OnSetName().
|
inlinevirtual |
Reimplemented in LabelTrack, WaveTrack, and TimeTrack.
Definition at line 404 of file Track.h.
Referenced by NoteTrack::Clear(), NoteTrack::HandleXMLTag(), ImportMIDI(), NoteTrack::Paste(), and NoteTrack::Trim().
|
private |
Update mNode when Track is added to TrackList, or removed from it.
Definition at line 125 of file Track.cpp.
Referenced by TrackList::DoAddToHead(), TrackList::Permute(), TrackList::Remove(), TrackList::Replace(), and TrackList::SwapNodes().
|
virtual |
Reimplemented in LabelTrack.
Definition at line 83 of file Track.cpp.
References GetGroupData(), mList, and Track::ChannelGroupData::mSelected.
Referenced by SetTrackStatusCommand::ApplyInner(), anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected(), HandleCommonXMLAttribute(), anonymous_namespace{LabelMenus.cpp}::OnPasteNewLabel(), SelectionState::SelectTrack(), and LabelTrack::SetSelected().
|
inline |
Definition at line 224 of file Track.h.
Referenced by SelectHandle::AdjustSelection(), SelectionState::ChangeSelectionOnShiftClick(), DEFINE_ATTACHED_VIRTUAL_OVERRIDE(), SpectrumView::DoDraw(), TimeShiftHandle::Drag(), EnsureVisible(), TrackPanelAx::GetFocus(), SelectHandle::HandleCenterFrequencyClick(), ClipMoveState::Init(), SelectHandle::MoveSnappingFreqSelection(), Notify(), SelectionState::SelectTrack(), TrackFocus::Set(), TrackPanelAx::SetFocus(), SharedPointer(), anonymous_namespace{MIDIPlay.h}::MIDIPlay::StartOtherStream(), SubstituteOriginalTrack(), and SubstitutePendingChangedTrack().
|
inline |
|
inlinestatic |
Definition at line 248 of file Track.h.
References SharedPointer().
|
inlinestatic |
Definition at line 244 of file Track.h.
References SharedPointer().
|
pure virtual |
std::shared_ptr< const Track > Track::SubstituteOriginalTrack | ( | ) | const |
Definition at line 1106 of file Track.cpp.
References PackedArray::end(), GetId(), id, mList, and SharedPointer().
Referenced by SyncLock::IsSyncLockSelected().
std::shared_ptr< Track > Track::SubstitutePendingChangedTrack | ( | ) |
Definition at line 1085 of file Track.cpp.
References PackedArray::end(), GetId(), mList, and SharedPointer().
Referenced by TrackPanel::DrawTracks(), SubstitutePendingChangedTrack(), and ProjectFileIO::WriteXML().
std::shared_ptr< const Track > Track::SubstitutePendingChangedTrack | ( | ) | const |
Definition at line 1101 of file Track.cpp.
References SubstitutePendingChangedTrack().
|
virtual |
Whether this track type implements cut-copy-paste; by default, true.
Reimplemented in TimeTrack.
Definition at line 1133 of file Track.cpp.
Referenced by SelectActions::Handler::OnCursorTrackEnd(), SelectActions::Handler::OnCursorTrackStart(), anonymous_namespace{EditMenus.cpp}::OnCut(), SelectActions::Handler::OnSelectSyncLockSel(), and anonymous_namespace{EditMenus.cpp}::OnSplitCut().
|
virtual |
Reimplemented in WaveTrack, and LabelTrack.
Definition at line 272 of file Track.cpp.
References Clear(), Cut(), GetEndTime(), and Paste().
Referenced by anonymous_namespace{EditMenus.cpp}::OnPaste().
|
inline |
Use this function rather than testing track type explicitly and making down-casts.
A variadic function taking any number of function objects, each taking a pointer to Track or a subclass, maybe const-qualified, and maybe a second argument which is a fall-through continuation.
Each of the function objects (and supplied continuations) returns R (or a type convertible to R). Calls the first in the sequence that accepts the actual type of the track.
If no function accepts the track, do nothing and return R{} if R is not void.
If one of the functions invokes the fall-through, then the next following applicable function is called.
R | Return type of this function and each function argument |
Functions | callable types deduced from arguments |
functions | typically lambdas, taking a pointer to a track subclass, and optionally a fall-through call-back |
Definition at line 755 of file Track.h.
Referenced by SetClipCommand::ApplyInner(), SetEnvelopeCommand::ApplyInner(), WaveTrack::Merge(), anonymous_namespace{LabelMenus.cpp}::OnCopyLabels(), anonymous_namespace{LabelMenus.cpp}::OnCutLabels(), anonymous_namespace{LabelMenus.cpp}::OnDisjoinLabels(), anonymous_namespace{LabelMenus.cpp}::OnJoinLabels(), anonymous_namespace{LabelMenus.cpp}::OnSilenceLabels(), anonymous_namespace{LabelMenus.cpp}::OnSplitCutLabels(), anonymous_namespace{LabelMenus.cpp}::OnSplitDeleteLabels(), anonymous_namespace{LabelMenus.cpp}::OnSplitLabels(), TimeTrack::Paste(), LabelTrack::Paste(), NoteTrack::Paste(), LabelTrack::PasteOver(), NyquistEffect::ProcessOne(), and StretchHandle::Stretch().
|
inline |
Use this function rather than testing track type explicitly and making down-casts.
A variadic function taking any number of function objects, each taking a pointer to Track or a subclass, maybe const-qualified, and maybe a second argument which is a fall-through continuation.
Each of the function objects (and supplied continuations) returns R (or a type convertible to R). Calls the first in the sequence that accepts the actual type of the track.
If no function accepts the track, do nothing and return R{} if R is not void.
If one of the functions invokes the fall-through, then the next following applicable function is called.
R | Return type of this function and each function argument |
Functions | callable types deduced from arguments |
functions | typically lambdas, taking a pointer to a track subclass, and optionally a fall-through call-back |
This is the overload for const tracks, only taking callable arguments that accept first arguments that are pointers to const.
Definition at line 772 of file Track.h.
|
inlinestaticconstexpr |
void Track::WriteCommonXMLAttributes | ( | XMLWriter & | xmlFile, |
bool | includeNameAndSelected = true |
||
) | const |
Definition at line 1149 of file Track.cpp.
References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::ForEach(), GetName(), GetSelected(), XMLWriter::WriteAttr(), and wxT().
Referenced by TimeTrack::WriteXML(), WaveTrack::WriteXML(), and LabelTrack::WriteXML().
|
pure virtual |
Implemented in TimeTrack, WaveTrack, LabelTrack, and NoteTrack.
|
friend |
Encapsulate the checked down-casting of track pointers.
Eliminates possibility of error – and not quietly casting away const
Typical usage:
This overload for const pointers can cast only to other const pointer types.
Definition at line 845 of file Track.h.
|
friend |
Encapsulate the checked down-casting of track pointers.
Eliminates possibility of error – and not quietly casting away const
Typical usage:
Definition at line 828 of file Track.h.
|
private |
|
protected |
0-based position of this track in its TrackList
Definition at line 207 of file Track.h.
Referenced by GetIndex(), SetIndex(), and Track().
|
protected |
Back pointer to owning TrackList
Definition at line 203 of file Track.h.
Referenced by AdjustPositions(), EnsureVisible(), GetLinkedTrack(), GetNode(), TrackList::MakeMultiChannelTrack(), Notify(), SetLinkType(), SetOwner(), SetSelected(), SubstituteOriginalTrack(), SubstitutePendingChangedTrack(), and TrackList::UnlinkChannels().
|
protected |
Holds iterator to self, so that TrackList::Find can be constant-time.
mNode's pointer to std::list might not be this TrackList, if it's a pending update track
Definition at line 206 of file Track.h.
Referenced by AdjustPositions(), GetLinkedTrack(), GetNode(), SetLinkType(), and SetOwner().
|
protected |
Definition at line 372 of file Track.h.
Referenced by LabelTrack::GetOffset(), NoteTrack::GetOffset(), WaveTrack::NewestOrNewClip(), WaveTrack::RightmostOrNewClip(), WaveTrack::SetOffset(), and Track().
|
private |
Definition at line 200 of file Track.h.
Referenced by DoSetLinkType(), FinishCopy(), GetLinkType(), HasLinkedTrack(), Init(), MakeGroupData(), and TrackList::SwapChannels().
|
mutable |
Definition at line 313 of file Track.h.
Referenced by SpectrumVRulerControls::DoUpdateVRuler(), WaveformVRulerControls::DoUpdateVRuler(), and TrackPanel::UpdateTrackVRuler().