22 auto result = std::make_shared< SyncLockState >(
project );
71 if (inSeparatorSection)
86 auto p = pList->GetOwner();
91 auto trackRange =
Group(orig);
93 if (trackRange.size() <= 1) {
118 auto ppMember = pList->Find(&member);
123 Track *first =
nullptr;
132 return { &member, &member };
134 auto last = pList->
Find(first);
136 bool inLabels =
false;
145 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.
const Track & SubstituteOriginalTrack(const Track &track) const
static PendingTracks & Get(AudacityProject &project)
static TrackIterRange< Track > Group(Track &track)
static bool IsSelectedOrSyncLockSelected(const Track &track)
static bool IsSyncLockSelected(const Track &track)
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< TrackList > GetOwner() const
bool IsSyncLockableNonSeparatorTrack(const Track &track)
bool IsSeparatorTrack(const Track &track)
std::pair< Track *, Track * > FindSyncLockGroup(Track &member)
bool IsGoodNextSyncLockTrack(const Track &t, bool inSeparatorSection)
const char * begin(const char *str) noexcept
Range between two TrackIters, usable in range-for statements, and with Visit member functions.