21 auto result = std::make_shared< SyncLockState >(
project );
73 if (inSeparatorSection)
90 auto p = pList->GetOwner();
98 const auto pOrigTrack = shTrack.get();
99 auto trackRange =
Group( pOrigTrack );
101 if (trackRange.size() <= 1) {
121 return {
nullptr,
nullptr };
129 auto member = pList->Find(pMember);
134 Track *first =
nullptr;
143 return { pMember, pMember };
145 auto last = pList->
Find(first);
147 bool inLabels =
false;
156 return { first, *last };
DEFINE_ATTACHED_VIRTUAL(GetSyncLockPolicy)
BoolSetting SyncLockTracks
static const AudacityProject::AttachedObjects::RegisteredFactory sSyncLockStateKey
@ EndSeparator
Delimits the end of a group (of which it is a part)
@ Grouped
Can be part of a group.
@ Isolated
Never part of a group.
declares abstract base class Track, TrackList, and iterators over TrackList
Class template generates single-dispatch, open method registry tables.
static Return Call(This &obj, Arguments ...arguments)
Invoke the method – but only after static initialization time.
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
This specialization of Setting for bool adds a Toggle method to negate the saved value.
Client code makes static instance from a factory of attachments; passes it to Get or Find as a retrie...
Subclass * Find(const RegisteredFactory &key)
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand...
CallbackReturn Publish(const SyncLockChangeMessage &message)
Send a message to connected callbacks.
static bool IsSelectedOrSyncLockSelected(const Track *pTrack)
static bool IsSyncLockSelected(const Track *pTrack)
static TrackIterRange< Track > Group(Track *pTrack)
bool IsSyncLocked() const
void SetSyncLock(bool flag)
static SyncLockState & Get(AudacityProject &project)
SyncLockState(AudacityProject &project)
Abstract base class for an object holding data associated with points on a time axis.
bool GetSelected() const
Selectedness is always the same for all channels of a group.
std::shared_ptr< const Track > SubstituteOriginalTrack() const
std::shared_ptr< TrackList > GetOwner() const
auto begin(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
bool IsSeparatorTrack(const Track *pTrack)
bool IsSyncLockableNonSeparatorTrack(const Track *pTrack)
std::pair< Track *, Track * > FindSyncLockGroup(Track *pMember)
bool IsGoodNextSyncLockTrack(const Track *t, bool inSeparatorSection)
Range between two TrackIters, usable in range-for statements, and with Visit member functions.