35 auto trackRange = syncLocked
52 Track &track,
bool selected,
bool updateLastPicked)
81 Track *sTrack = &rsTrack, *eTrack = &reTrack;
84 iterS =
tracks.Find(sTrack),
85 iterE =
tracks.Find(eTrack);
86 auto indS = std::distance(
begin, iterS),
87 indE = std::distance(
begin, iterE);
92 tracks.Any().StartingWith(sTrack).EndingAfter(eTrack))
109 auto trackRange =
tracks.Selected();
110 auto pFirst = *trackRange.begin();
115 iterT =
tracks.Find(&track),
116 iterF =
tracks.Find(pFirst);
117 auto indT = std::distance(
begin, iterT),
118 indF = std::distance(
begin, iterF);
120 pExtendFrom = pFirst->SharedPointer();
137 Track &track,
bool shift,
bool ctrl,
bool syncLocked)
158 , mInitialLastPickedTrack{ state.mLastPickedTrack }
161 const auto range =
tracks.Any();
164 for (
const auto track : range) {
165 const bool isSelected = track->GetSelected();
175 std::vector<bool>::const_iterator
182 track->SetSelected( *it++ );
static const AudacityProject::AttachedObjects::RegisteredFactory key
declares abstract base class Track, TrackList, and iterators over TrackList
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
double GetEndTime() const
Get the maximum of End() values of intervals, or 0 when none.
double GetStartTime() const
Get the minimum of Start() values of intervals, or 0 when none.
Client code makes static instance from a factory of attachments; passes it to Get or Find as a retrie...
bool setTimes(double t0, double t1)
SelectionStateChanger(SelectionState &state, TrackList &tracks)
std::vector< bool > mInitialTrackSelection
std::weak_ptr< Track > mInitialLastPickedTrack
std::weak_ptr< Track > mLastPickedTrack
void HandleListSelection(TrackList &tracks, ViewInfo &viewInfo, Track &track, bool shift, bool ctrl, bool syncLocked)
void ChangeSelectionOnShiftClick(TrackList &tracks, Track &track)
static void SelectTrackLength(ViewInfo &viewInfo, Track &track, bool syncLocked)
void SelectRangeOfTracks(TrackList &tracks, Track &sTrack, Track &eTrack)
void SelectNone(TrackList &tracks)
static SelectionState & Get(AudacityProject &project)
void SelectTrack(Track &track, bool selected, bool updateLastPicked)
static TrackIterRange< Track > Group(Track &track)
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.
virtual void SetSelected(bool s)
std::shared_ptr< Subclass > SharedPointer()
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
static auto SingletonRange(TrackType *pTrack) -> TrackIterRange< TrackType >
NotifyingSelectedRegion selectedRegion
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)
const char * end(const char *str) noexcept
const char * begin(const char *str) noexcept