36 auto trackRange = syncLocked
53 Track &track,
bool selected,
bool updateLastPicked)
83 Track *sTrack = &rsTrack, *eTrack = &reTrack;
86 iterS =
tracks.Find(sTrack),
87 iterE =
tracks.Find(eTrack);
91 auto indS = std::distance(
begin, iterS),
92 indE = std::distance(
begin, iterE);
97 tracks.Any().StartingWith(sTrack).EndingAfter(eTrack))
114 auto trackRange =
tracks.Selected();
115 auto pFirst = *trackRange.begin();
120 iterT =
tracks.Find(&track),
121 iterF =
tracks.Find(pFirst);
122 auto indT = std::distance(
begin, iterT),
123 indF = std::distance(
begin, iterF);
125 pExtendFrom = pFirst->SharedPointer();
134 assert(!pExtendFrom || pExtendFrom->IsLeader());
145 Track &track,
bool shift,
bool ctrl,
bool syncLocked)
167 , mInitialLastPickedTrack{ state.mLastPickedTrack }
170 const auto range =
tracks.Any();
173 for (
const auto track : range) {
174 const bool isSelected = track->GetSelected();
184 std::vector<bool>::const_iterator
191 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 *pTrack)
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()
bool IsLeader() const override
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
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
auto begin(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)