Audacity 3.2.0
SyncLock.h
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5@file SyncLock.cpp
6@brief Defines groupings of tracks that should keep contents synchronized
7
8Paul Licameli split from Track.cpp
9
10**********************************************************************/
11#ifndef __AUDACITY_SYNC_LOCK__
12#define __AUDACITY_SYNC_LOCK__
13
14#include "Track.h" // for TrackIterRange
16
17class AUDACITY_DLL_API SyncLock {
18public:
20 static bool IsSyncLockSelected( const Track *pTrack );
21
23 static bool IsSelectedOrSyncLockSelected( const Track *pTrack );
24
26 static TrackIterRange< Track > Group( Track *pTrack );
27
30 {
31 return Group(const_cast<Track*>(pTrack)).Filter<const Track>();
32 }
33};
34
36enum class SyncLockPolicy {
37 Isolated,
38 Grouped,
40};
41
42struct GetSyncLockPolicyTag;
43
47 GetSyncLockPolicyTag,
49 const Track
50>;
52
53#endif
Utility for non-intrusive definition of a new method on a base class.
SyncLockPolicy
Describes how a track participates in sync-lock groupings.
Definition: SyncLock.h:36
@ 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.
DECLARE_EXPORTED_ATTACHED_VIRTUAL(AUDACITY_DLL_API, GetSyncLockPolicy)
declares abstract base class Track, TrackList, and iterators over TrackList
Class template generates single-dispatch, open method registry tables.
static TrackIterRange< const Track > Group(const Track *pTrack)
Definition: SyncLock.h:29
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:225
Range between two TrackIters, usable in range-for statements, and with Visit member functions.
Definition: Track.h:1161
TrackIterRange< TrackType2 > Filter() const
Definition: Track.h:1215