![]() |
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... | |
enum | ChannelType { LeftChannel = 0 , RightChannel = 1 , MonoChannel = 2 } |
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 () |
int | GetIndex () const |
void | SetIndex (int index) |
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 |
virtual void | Merge (const Track &orig) |
wxString | GetName () const |
void | SetName (const wxString &n) |
bool | GetSelected () const |
virtual void | SetSelected (bool s) |
void | EnsureVisible (bool modifyState=false) |
virtual ChannelType | GetChannel () const |
virtual double | GetOffset () const =0 |
void | Offset (double t) |
virtual void | SetOffset (double o) |
virtual void | SetPan (float) |
virtual void | SetPanFromChannelType () |
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 (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, std::tuple< TrackTypes... > *, const Functions &...functions) |
![]() | |
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) |
void | SetChannel (ChannelType c) noexcept |
![]() | |
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... | |
wxString | mName |
ChannelType | mChannel |
double | mOffset |
Private Member Functions | |
void | SetId (TrackId id) |
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 |
bool | mSelected |
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 > |
enum Track::ChannelType |
Enumerator | |
---|---|
LeftChannel | |
RightChannel | |
MonoChannel |
|
strong |
Track::Track | ( | ) |
Definition at line 44 of file Track.cpp.
References mChannel, mIndex, mOffset, MonoChannel, and mSelected.
Track::Track | ( | const Track & | orig, |
ProtectedCreationArg && | |||
) |
void Track::AdjustPositions | ( | ) |
Definition at line 1309 of file Track.cpp.
bool Track::Any | ( | ) | const |
Definition at line 399 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(), anonymous_namespace{TrackMenus.cpp}::MuteTracks(), anonymous_namespace{LabelMenus.cpp}::OnPasteNewLabel(), anonymous_namespace{MixerBoard.cpp}::PlayableTracksExistFlag(), EffectLoudness::Process(), EffectNormalize::Process(), TransportTracks::TransportTracks(), and ProjectWindow::ZoomAfterImport().
|
inlinestatic |
Definition at line 753 of file Track.h.
|
inlinestatic |
Definition at line 738 of file Track.h.
|
inlinestatic |
|
static |
Definition at line 1251 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 LabelTrack, NoteTrack, TimeTrack, and WaveTrack.
Referenced by Duplicate(), and TrackList::RegisterPendingChangedTrack().
|
pure virtual |
|
pure virtual |
|
private |
completeList | only influences debug build consistency checking |
Definition at line 195 of file Track.cpp.
References GetLinkedTrack(), GetLinkType(), HasLinkedTrack(), LinkConsistencyCheck(), MakeGroupData(), Track::ChannelGroupData::mLinkType, mpGroupData, and None.
Referenced by SetLinkType().
|
inlinestatic |
Definition at line 784 of file Track.h.
|
virtual |
Definition at line 109 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 97 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 413 of file Track.cpp.
References GetChannel(), GetName(), mpGroupData, SetChannel(), and SetName().
Referenced by anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected(), anonymous_namespace{LabelMenus.cpp}::EditClipboardByLabel(), anonymous_namespace{EditMenus.cpp}::FinishCopy(), and anonymous_namespace{ProjectFileManager.cpp}::ImportProject().
|
inlinevirtual |
Reimplemented in WaveTrack.
Definition at line 479 of file Track.h.
Referenced by FinishCopy(), LinkConsistencyFix(), and anonymous_namespace{NoteTrackControls.cpp}::MidiControlsDrawFunction().
|
pure virtual |
Implemented in LabelTrack, NoteTrack, TimeTrack, and WaveTrack.
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 179 of file Track.cpp.
References GetOwner().
Referenced by RealtimeEffectList::Get(), and GetGroupData().
const Track::ChannelGroupData & Track::GetGroupData | ( | ) | const |
Definition at line 189 of file Track.cpp.
References GetGroupData().
|
inline |
Definition at line 287 of file Track.h.
Referenced by TrackList::HasPendingTracks(), TrackPanelAx::IsFocused(), SetLinkType(), SubstituteOriginalTrack(), and SubstitutePendingChangedTrack().
int Track::GetIndex | ( | ) | const |
Definition at line 142 of file Track.cpp.
References mIndex.
Referenced by SelectionState::ChangeSelectionOnShiftClick(), TrackList::RecalcPositions(), and SelectionState::SelectRangeOfTracks().
|
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 LabelTrack, NoteTrack, and WaveTrack.
Definition at line 1268 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 LabelTrack, NoteTrack, and WaveTrack.
Definition at line 1263 of file Track.cpp.
Referenced by TrackShifter::InitIntervals().
|
private |
Definition at line 247 of file Track.cpp.
References HasLinkedTrack(), mList, and mNode.
Referenced by DoSetLinkType(), TrackList::GetPrev(), IsLeader(), and LinkConsistencyFix().
|
noexcept |
Definition at line 1347 of file Track.cpp.
References mpGroupData, and None.
Referenced by WaveClipTrimHandle::AdjustBetweenBorders::AdjustBetweenBorders(), DoSetLinkType(), WaveClipTrimHandle::AdjustBorder::FindSnapPoints(), ClipMoveState::Init(), and WaveTrack::LinkConsistencyFix().
|
inline |
Definition at line 466 of file Track.h.
Referenced by ProjectFileManager::AddImportedTracks(), LabelDialog::AddLabels(), CompareAudioCommand::Apply(), TrackInfo::CloseTitleDrawFunction(), TrackUtilities::DoMoveTrack(), TrackUtilities::DoRemoveTrack(), anonymous_namespace{TrackMenus.cpp}::DoSortTracks(), anonymous_namespace{TrackPanel.cpp}::DrawTrackName(), FinishCopy(), 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(), WaveTrackMenuTable::SplitStereo(), RealtimeEffectStateUI::UpdateTrackData(), and WriteCommonXMLAttributes().
|
private |
Retrieve mNode with debug checks.
Definition at line 127 of file Track.cpp.
Referenced by TrackList::GetNext(), TrackList::GetPrev(), TrackList::MoveDown(), TrackList::MoveUp(), and TrackList::Remove().
|
pure virtual |
Implemented in LabelTrack, NoteTrack, TimeTrack, and WaveTrack.
Referenced by anonymous_namespace{TrackMenus.cpp}::DoAlign(), TrackList::GetMinOffset(), SelectActions::Handler::OnCursorTrackStart(), and SelectionState::SelectTrackLength().
|
inline |
Definition at line 409 of file Track.h.
Referenced by RealtimeEffectManager::AddTrack(), TrackShifter::CommonMayMigrateTo(), WaveClipTrimHandle::AdjustBorder::FindSnapPoints(), anonymous_namespace{SyncLock.cpp}::FindSyncLockGroup(), GetGroupData(), SyncLock::Group(), IsAlignedWithLeader(), SyncLock::IsSyncLockSelected(), WaveTrack::LinkConsistencyFix(), WaveTrack::PasteWaveTrack(), and TrackList::SwapChannels().
|
inline |
Definition at line 469 of file Track.h.
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 LabelTrack, NoteTrack, TimeTrack, and WaveTrack.
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, LabelTrack, NoteTrack, TimeTrack, and WaveTrack.
Referenced by SameKindAs().
|
inlinevirtual |
bool Track::HandleCommonXMLAttribute | ( | const std::string_view & | attr, |
const XMLAttributeValueView & | valueView | ||
) |
Definition at line 1287 of file Track.cpp.
References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::ForEach(), SetName(), SetSelected(), XMLAttributeValueView::ToWString(), and XMLAttributeValueView::TryGet().
Referenced by LabelTrack::HandleXMLTag(), NoteTrack::HandleXMLTag(), TimeTrack::HandleXMLTag(), and WaveTrack::HandleXMLTag().
|
privatenoexcept |
Returns true for leaders of multichannel groups.
Definition at line 273 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 64 of file Track.cpp.
References mChannel, mId, mName, mpGroupData, and mSelected.
Referenced by PlayableTrack::Init(), and TimeTrack::Init().
|
pure virtual |
bool Track::IsAlignedWithLeader | ( | ) | const |
Returns true if the leader track has link type LinkType::Aligned.
Definition at line 1352 of file Track.cpp.
References Aligned, and GetOwner().
Referenced by WaveClipTrimHandle::AdjustBetweenBorders::AdjustBetweenBorders(), and ClipMoveState::Init().
bool Track::IsLeader | ( | ) | const |
Definition at line 405 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(), cloud::audiocom::ShareAudioDialog::ExportProject(), TrackList::FindLeader(), IsSelectedLeader(), TrackList::Leaders(), EffectLoudness::Process(), EffectNormalize::Process(), NyquistEffect::Process(), and StereoRequiredFlag().
bool Track::IsSelected | ( | ) | const |
Definition at line 402 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(), ProjectAudioManager::OnRecord(), SelectActions::Handler::OnSelectSyncLockSel(), EffectTruncSilence::ProcessIndependently(), TrackList::Selected(), and TransportTracks::TransportTracks().
bool Track::IsSelectedLeader | ( | ) | const |
Definition at line 410 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 404 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 424 of file Track.cpp.
References GetChannel(), GetLinkedTrack(), GetName(), HasLinkedTrack(), LeftChannel, None, RightChannel, and SetLinkType().
Referenced by WaveTrack::LinkConsistencyFix().
|
private |
Definition at line 171 of file Track.cpp.
References mpGroupData.
Referenced by DoSetLinkType().
|
virtual |
Reimplemented in PlayableTrack, and WaveTrack.
Definition at line 104 of file Track.cpp.
References mSelected.
Referenced by PlayableTrack::Merge().
void Track::Notify | ( | int | code = -1 | ) |
Definition at line 278 of file Track.cpp.
References mList, and SharedPointer().
Referenced by WaveTrack::SetGain(), PlayableTrack::SetMute(), SetName(), WaveTrack::SetPan(), and PlayableTrack::SetSolo().
|
inline |
Definition at line 482 of file Track.h.
Referenced by TrackShifter::DoHorizontalOffset(), EffectBase::Preview(), 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 LabelTrack, NoteTrack, TimeTrack, and WaveTrack.
Referenced by anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected().
|
inline |
Definition at line 534 of file Track.h.
References GetTypeInfo().
Referenced by TrackShifter::CommonMayMigrateTo(), and anonymous_namespace{TimeShiftHandle.cpp}::FindCorrespondence().
|
protectednoexcept |
Definition at line 242 of file Track.cpp.
Referenced by FinishCopy(), WaveTrack::LinkConsistencyFix(), and TrackList::SwapChannels().
|
inlineprivate |
Definition at line 289 of file Track.h.
References id.
Referenced by TrackList::DoAddToHead(), and TrackList::Replace().
void Track::SetIndex | ( | int | index | ) |
Definition at line 147 of file Track.cpp.
References mIndex.
Referenced by TrackList::RecalcPositions().
|
protected |
completeList | only influences debug build consistency checking |
Definition at line 152 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 79 of file Track.cpp.
References mName, and Notify().
Referenced by SetTrackStatusCommand::ApplyInner(), TimeTrack::CleanState(), FinishCopy(), HandleCommonXMLAttribute(), ImportMIDI(), TimeTrack::Init(), Effect::ModifiedAnalysisTrack::ModifiedAnalysisTrack(), and NoteTrack::NoteTrack().
|
inlinevirtual |
Reimplemented in LabelTrack, WaveTrack, and TimeTrack.
Definition at line 483 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 133 of file Track.cpp.
Referenced by TrackList::DoAddToHead(), TrackList::Permute(), TrackList::Remove(), TrackList::Replace(), and TrackList::SwapNodes().
|
inlinevirtual |
Reimplemented in WaveTrack.
Definition at line 485 of file Track.h.
Referenced by SetTrackAudioCommand::ApplyInner().
|
inlinevirtual |
|
virtual |
Reimplemented in LabelTrack.
Definition at line 87 of file Track.cpp.
References mList, mSelected, and SharedPointer().
Referenced by SetTrackStatusCommand::ApplyInner(), anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected(), HandleCommonXMLAttribute(), anonymous_namespace{LabelMenus.cpp}::OnPasteNewLabel(), and LabelTrack::SetSelected().
|
inline |
Definition at line 297 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(), SetSelected(), SharedPointer(), anonymous_namespace{MIDIPlay.h}::MIDIPlay::StartOtherStream(), SubstituteOriginalTrack(), and SubstitutePendingChangedTrack().
|
inline |
|
inlinestatic |
Definition at line 321 of file Track.h.
References SharedPointer().
|
inlinestatic |
Definition at line 317 of file Track.h.
References SharedPointer().
|
pure virtual |
std::shared_ptr< const Track > Track::SubstituteOriginalTrack | ( | ) | const |
Definition at line 1231 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 1210 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 1226 of file Track.cpp.
References SubstitutePendingChangedTrack().
|
virtual |
Whether this track type implements cut-copy-paste; by default, true.
Reimplemented in TimeTrack.
Definition at line 1258 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 LabelTrack, and WaveTrack.
Definition at line 285 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 832 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(), LabelTrack::Paste(), NoteTrack::Paste(), TimeTrack::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 849 of file Track.h.
|
inlinestaticconstexpr |
void Track::WriteCommonXMLAttributes | ( | XMLWriter & | xmlFile, |
bool | includeNameAndSelected = true |
||
) | const |
Definition at line 1274 of file Track.cpp.
References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::ForEach(), GetName(), GetSelected(), XMLWriter::WriteAttr(), and wxT().
Referenced by LabelTrack::WriteXML(), TimeTrack::WriteXML(), and WaveTrack::WriteXML().
|
pure virtual |
Implemented in LabelTrack, NoteTrack, TimeTrack, and WaveTrack.
|
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 982 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 965 of file Track.h.
|
protected |
Definition at line 446 of file Track.h.
Referenced by WaveTrack::GetChannel(), WaveTrack::GetChannelIgnoringPan(), WaveTrack::HandleXMLTag(), Init(), WaveTrack::SetPanFromChannelType(), and Track().
|
private |
|
protected |
0-based position of this track in its TrackList
Definition at line 269 of file Track.h.
Referenced by GetIndex(), SetIndex(), and Track().
|
protected |
Back pointer to owning TrackList
Definition at line 265 of file Track.h.
Referenced by AdjustPositions(), EnsureVisible(), GetLinkedTrack(), GetNode(), TrackList::MakeMultiChannelTrack(), Notify(), SetLinkType(), SetOwner(), SetSelected(), SubstituteOriginalTrack(), SubstitutePendingChangedTrack(), and TrackList::UnlinkChannels().
|
protected |
|
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 268 of file Track.h.
Referenced by AdjustPositions(), GetLinkedTrack(), GetNode(), SetLinkType(), and SetOwner().
|
protected |
Definition at line 447 of file Track.h.
Referenced by LabelTrack::GetOffset(), NoteTrack::GetOffset(), WaveTrack::NewestOrNewClip(), WaveTrack::RightmostOrNewClip(), WaveTrack::SetOffset(), and Track().
|
private |
Definition at line 262 of file Track.h.
Referenced by DoSetLinkType(), FinishCopy(), GetLinkType(), HasLinkedTrack(), Init(), MakeGroupData(), and TrackList::SwapChannels().
|
private |
|
mutable |
Definition at line 386 of file Track.h.
Referenced by SpectrumVRulerControls::DoUpdateVRuler(), WaveformVRulerControls::DoUpdateVRuler(), and TrackPanel::UpdateTrackVRuler().