50 t->SetSelected(
false);
81 t->SetSelected(
false);
84 trackPanel.Refresh(
false);
94 viewInfo.selectedRegion.isPoint())
107 viewInfo.selectedRegion.isPoint()) {
126 selectionState.HandleListSelection(
128 shift, ctrl, isSyncLocked);
132 window.Refresh(
false);
157 bool bTime = selectedRegion.
isPoint();
158 bool bTracks =
tracks.Selected().empty();
160 if (bTime || bTracks)
167 auto &playRegion = viewInfo.playRegion;
168 playRegion.SetActive(
true );
169 if (playRegion.Empty()) {
170 auto &selectedRegion = viewInfo.selectedRegion;
171 if (!selectedRegion.isPoint())
172 playRegion.SetTimes(selectedRegion.t0(), selectedRegion.t1());
175 playRegion.SetTimes(0.0, 4.0);
185 auto &playRegion = viewInfo.playRegion;
186 auto &selectedRegion = viewInfo.selectedRegion;
189 playRegion.SetActive(
false );
190 playRegion.SetTimes( selectedRegion.t0(), selectedRegion.t1() );
199 auto &playRegion = viewInfo.playRegion;
200 if (playRegion.Active())
209 auto &playRegion = viewInfo.playRegion;
212 if (playRegion.Active())
219 auto &playRegion = viewInfo.playRegion;
220 auto &selectedRegion = viewInfo.selectedRegion;
221 playRegion.SetAllTimes( selectedRegion.t0(), selectedRegion.t1() );
222 if(!playRegion.Empty())
231 auto &playRegion = viewInfo.playRegion;
232 auto &selectedRegion = viewInfo.selectedRegion;
236 const auto getValue = [&]() ->
double {
239 return selectedRegion.t0();
241 return selectedRegion.t1();
245 return playRegion.GetStart();
247 return playRegion.GetEnd();
251 const auto setValue = [&](
double value){
254 selectedRegion.setT0(value,
false);
256 selectedRegion.setT1(value,
false);
260 playRegion.SetStart(value);
262 playRegion.SetEnd(value);
266 bool bSelChanged =
false;
268 if ((token > 0) && gAudioIO->IsStreamActive(token))
270 double indicator = gAudioIO->GetStreamTime();
276 auto fmt = formats.GetSelectionFormat();
279 fmt,
project, getValue(),
XO(
"Position"));
281 if (wxID_OK == dlg.ShowModal())
const ReservedCommandFlag & EditableTracksSelectedFlag()
audacity::BasicSettings * gPrefs
an object holding per-project preferred sample rate
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
accessors for certain important windows associated with each project
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
static CommandManager & Get(AudacityProject &project)
CommandFlag GetUpdateFlags(bool quick=false) const
bool setTimes(double t0, double t1)
int GetAudioIOToken() const
static ProjectAudioIO & Get(AudacityProject &project)
void ModifyState(bool bWantsAutoSave)
static ProjectHistory & Get(AudacityProject &project)
static SelectionState & Get(AudacityProject &project)
bool IsSyncLocked() const
static SyncLockState & Get(AudacityProject &project)
Dialog used to request a time value.
const double GetTimeValue()
Abstract base class for an object holding data associated with points on a time axis.
static TrackList & Get(AudacityProject &project)
static TrackPanel & Get(AudacityProject &project)
Holds a msgid for the translation catalog; may also bind format arguments.
NotifyingSelectedRegion selectedRegion
static ViewInfo & Get(AudacityProject &project)
A Track that contains audio waveform data.
bool ReadBool(const wxString &key, bool defaultValue) const
Namespace for functions for Select menu.
void DoSelectSomething(AudacityProject &project)
void SelectNone(AudacityProject &project)
bool SelectAllIfNoneAndAllowed(AudacityProject &project)
void SetPlayRegionToSelection(AudacityProject &project)
void DoListSelection(AudacityProject &project, Track &t, bool shift, bool ctrl, bool modifyState)
void DoSelectAllAudio(AudacityProject &project)
void ActivatePlayRegion(AudacityProject &project)
void DoSelectAll(AudacityProject &project)
void OnSetRegion(AudacityProject &project, bool left, bool selection, const TranslatableString &dialogTitle)
Adjust left or right of selection or play region.
void InactivatePlayRegion(AudacityProject &project)
void SelectAllIfNone(AudacityProject &project)
void ClearPlayRegion(AudacityProject &project)
void TogglePlayRegion(AudacityProject &project)
void DoSelectTimeAndTracks(AudacityProject &project, bool bAllTime, bool bAllTracks)
void DoSelectTimeAndAudioTracks(AudacityProject &project, bool bAllTime, bool bAllTracks)