Audacity 3.2.0
Functions
anonymous_namespace{SelectUtilities.cpp} Namespace Reference

Functions

void DoSelectTimeAndAudioTracks (AudacityProject &project, bool bAllTime, bool bAllTracks)
 

Function Documentation

◆ DoSelectTimeAndAudioTracks()

void anonymous_namespace{SelectUtilities.cpp}::DoSelectTimeAndAudioTracks ( AudacityProject project,
bool  bAllTime,
bool  bAllTracks 
)

Definition at line 38 of file SelectUtilities.cpp.

40{
42 auto &selectedRegion = ViewInfo::Get(project).selectedRegion;
43
44 if (bAllTime)
45 selectedRegion.setTimes(tracks.GetStartTime(), tracks.GetEndTime());
46
47 if (bAllTracks) {
48 // Unselect all tracks before selecting audio.
49 for (auto t : tracks)
50 t->SetSelected(false);
51 for (auto t : tracks.Any<WaveTrack>())
52 t->SetSelected(true);
54 }
55}
const auto tracks
const auto project
bool setTimes(double t0, double t1)
Definition: ViewInfo.cpp:51
void ModifyState(bool bWantsAutoSave)
static ProjectHistory & Get(AudacityProject &project)
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:314
NotifyingSelectedRegion selectedRegion
Definition: ViewInfo.h:216
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:235
A Track that contains audio waveform data.
Definition: WaveTrack.h:203

References ProjectHistory::Get(), ViewInfo::Get(), TrackList::Get(), ProjectHistory::ModifyState(), project, ViewInfo::selectedRegion, NotifyingSelectedRegion::setTimes(), and tracks.

Referenced by SelectUtilities::DoSelectAllAudio().

Here is the call graph for this function:
Here is the caller graph for this function: