Audacity  2.2.2
Menus.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  Menus.h
6 
7  Dominic Mazzoni
8 
9 **********************************************************************/
10 #ifndef __AUDACITY_MENUS__
11 #define __AUDACITY_MENUS__
12 
13 #include "Experimental.h"
14 
15 
16 
17 // These are all member functions of class AudacityProject.
18 // Vaughan, 2010-08-05:
19 // Note that this file is included in a "public" section of Project.h.
20 // Most of these methods do not need to be public, and because
21 // we do not subclass AudacityProject, they should be "private."
22 // Because the ones that need to be public are intermixed,
23 // I've added "private" in just a few cases.
24 
25 private:
29  CommandFlag batchflags, CommandFlag realflags);
31  std::vector<const PluginDescriptor*> & plugs,
32  CommandFlag batchflags, CommandFlag realflags, bool isDefault);
33 void AddEffectMenuItemGroup(CommandManager *c, const wxArrayString & names,
34  const std::vector<bool> &vHasDialog,
35  const PluginIDList & plugs,
36  const std::vector<CommandFlag> & flags, bool isDefault);
38 void ModifyUndoMenuItems();
39 void ModifyToolbarMenus();
40 // Calls ModifyToolbarMenus() on all projects
42 
44 
45 public:
46 // If checkActive, do not do complete flags testing on an
47 // inactive project as it is needlessly expensive.
48 CommandFlag GetUpdateFlags(bool checkActive = false);
49 
50 //Adds label and returns index of label in labeltrack.
51 int DoAddLabel(const SelectedRegion& region, bool preserveFocus = false);
52 int DialogForLabelName(const wxString& initialValue, wxString& value);
53 
54 private:
55 double NearestZeroCrossing(double t0);
56 
57  // Selecting a tool from the keyboard
58 
59 void SetTool(int tool);
60 void OnSelectTool(const CommandContext &context );
61 void OnZoomTool(const CommandContext &context );
62 void OnEnvelopeTool(const CommandContext &context );
63 void OnTimeShiftTool(const CommandContext &context );
64 void OnDrawTool(const CommandContext &context );
65 void OnMultiTool(const CommandContext &context );
66 
67 void OnNextTool(const CommandContext &context );
68 void OnPrevTool(const CommandContext &context );
69 
70 public:
71  // Audio I/O Commands
72 
73 void OnStop(const CommandContext &context );
74 void OnPause(const CommandContext &context );
75 void OnRecord(const CommandContext &context );
76 void OnRecord2ndChoice(const CommandContext &context );
77 void OnStopSelect(const CommandContext &context );
78 void OnSkipStart(const CommandContext &context );
79 void OnSkipEnd(const CommandContext &context );
80 void OnSeekLeftShort(const CommandContext &context );
81 void OnSeekRightShort(const CommandContext &context );
82 void OnSeekLeftLong(const CommandContext &context );
83 void OnSeekRightLong(const CommandContext &context );
84 
85  // Different posibilities for playing sound
86 
87 bool MakeReadyToPlay(bool loop = false, bool cutpreview = false); // Helper function that sets button states etc.
88 void OnPlayStop(const CommandContext &context );
89 bool DoPlayStopSelect(bool click, bool shift);
90 void OnPlayStopSelect(const CommandContext &context );
91 void OnPlayOneSecond(const CommandContext &context );
92 void OnPlayToSelection(const CommandContext &context );
93 void OnPlayBeforeSelectionStart(const CommandContext &context );
94 void OnPlayAfterSelectionStart(const CommandContext &context );
95 void OnPlayBeforeSelectionEnd(const CommandContext &context );
96 void OnPlayAfterSelectionEnd(const CommandContext &context );
99 void OnPlayLooped(const CommandContext &context );
100 void OnPlayCutPreview(const CommandContext &context );
101 
102  // Wave track control
103 
104 void OnTrackPan(const CommandContext &context );
105 void OnTrackPanLeft(const CommandContext &context );
106 void OnTrackPanRight(const CommandContext &context );
107 void OnTrackGain(const CommandContext &context );
108 void OnTrackGainInc(const CommandContext &context );
109 void OnTrackGainDec(const CommandContext &context );
110 void OnTrackMenu(const CommandContext &context );
111 void OnTrackMute(const CommandContext &context );
112 void OnTrackSolo(const CommandContext &context );
113 void OnTrackClose(const CommandContext &context );
114 void OnTrackMoveUp(const CommandContext &context );
115 void OnTrackMoveDown(const CommandContext &context );
116 void OnTrackMoveTop(const CommandContext &context );
117 void OnTrackMoveBottom(const CommandContext &context );
118 
120 void MoveTrack(Track* target, MoveChoice choice);
121 
122  // Device control
123 void OnInputDevice(const CommandContext &context );
124 void OnOutputDevice(const CommandContext &context );
125 void OnAudioHost(const CommandContext &context );
126 void OnInputChannels(const CommandContext &context );
127 
128  // Mixer control
129 
130 void OnOutputGain(const CommandContext &context );
131 void OnInputGain(const CommandContext &context );
132 void OnOutputGainInc(const CommandContext &context );
133 void OnOutputGainDec(const CommandContext &context );
134 void OnInputGainInc(const CommandContext &context );
135 void OnInputGainDec(const CommandContext &context );
136 
137  // Transcription control
138 
139 void OnPlayAtSpeed(const CommandContext &context );
140 void OnPlayAtSpeedLooped(const CommandContext &context );
141 void OnPlayAtSpeedCutPreview(const CommandContext &context );
142 void OnSetPlaySpeed(const CommandContext &context );
143 void OnPlaySpeedInc(const CommandContext &context );
144 void OnPlaySpeedDec(const CommandContext &context );
145 
146  // Moving track focus commands
147 
148 void OnPrevTrack( bool shift );
149 void OnNextTrack( bool shift );
150 void OnCursorUp(const CommandContext &context );
151 void OnCursorDown(const CommandContext &context );
152 void OnFirstTrack(const CommandContext &context );
153 void OnLastTrack(const CommandContext &context );
154 
155  // Selection-Editing Commands
156 
157 void OnShiftUp(const CommandContext &context );
158 void OnShiftDown(const CommandContext &context );
159 void OnToggle(const CommandContext &context );
160 
161 void HandleListSelection(Track *t, bool shift, bool ctrl, bool modifyState);
162 
163 void OnCursorLeft(const CommandContext &context );
164 void OnCursorRight(const CommandContext &context );
165 void OnSelExtendLeft(const CommandContext &context );
166 void OnSelExtendRight(const CommandContext &context );
167 void OnSelContractLeft(const CommandContext &context );
168 void OnSelContractRight(const CommandContext &context );
169 
170 public:
171 static double OnClipMove
172  (ViewInfo &viewInfo, Track *track,
173  TrackList &trackList, bool syncLocked, bool right);
174 
175 void DoClipLeftOrRight(bool right, bool keyUp );
176 void OnClipLeft(const CommandContext &context );
177 void OnClipRight(const CommandContext &context );
178 
179 void OnCursorShortJumpLeft(const CommandContext &context );
180 void OnCursorShortJumpRight(const CommandContext &context );
181 void OnCursorLongJumpLeft(const CommandContext &context );
182 void OnCursorLongJumpRight(const CommandContext &context );
183 void OnSelSetExtendLeft(const CommandContext &context );
184 void OnSelSetExtendRight(const CommandContext &context );
185 
186 void OnSetLeftSelection(const CommandContext &context );
187 void OnSetRightSelection(const CommandContext &context );
188 
189 void OnSelToStart(const CommandContext &context );
190 void OnSelToEnd(const CommandContext &context );
191 
192 void OnMoveToNextLabel(const CommandContext &context );
193 void OnMoveToPrevLabel(const CommandContext &context );
194 void OnMoveToLabel(bool next);
195 
196 void OnZeroCrossing(const CommandContext &context );
197 
198 void OnLockPlayRegion(const CommandContext &context );
199 void OnUnlockPlayRegion(const CommandContext &context );
200 
201 double GetTime(const Track *t);
202 void OnSortTime(const CommandContext &context );
203 void OnSortName(const CommandContext &context );
204 
205 void OnSnapToOff(const CommandContext &context );
206 void OnSnapToNearest(const CommandContext &context );
207 void OnSnapToPrior(const CommandContext &context );
208 void OnFullScreen(const CommandContext &context );
209 
210 static void DoMacMinimize(AudacityProject *project);
211 void OnMacMinimize(const CommandContext &context );
212 void OnMacMinimizeAll(const CommandContext &context );
213 void OnMacZoom(const CommandContext &context );
214 void OnMacBringAllToFront(const CommandContext &context );
215 
216  // File Menu
217 
218 void OnNew(const CommandContext &context );
219 void OnOpen(const CommandContext &context );
220 void OnClose(const CommandContext &context );
221 void OnSave(const CommandContext &context );
222 void OnSaveAs(const CommandContext &context );
223 void OnSaveCopy(const CommandContext &context );
224 #ifdef USE_LIBVORBIS
225  void OnSaveCompressed(const CommandContext &context );
226 #endif
227 
228 void OnCheckDependencies(const CommandContext &context );
229 
230 void OnExport(const wxString & Format);
231 void OnExportAudio(const CommandContext &context );
232 void OnExportMp3(const CommandContext &context );
233 void OnExportWav(const CommandContext &context );
234 void OnExportOgg(const CommandContext &context );
235 void OnExportSelection(const CommandContext &context );
236 void OnExportMultiple(const CommandContext &context );
237 void OnExportLabels(const CommandContext &context );
238 void OnExportMIDI(const CommandContext &context );
239 
240 void OnPreferences(const CommandContext &context );
241 void OnReloadPreferences(const CommandContext &context );
242 
243 void OnPageSetup(const CommandContext &context );
244 void OnPrint(const CommandContext &context );
245 
246 void OnExit(const CommandContext &context );
247 
248  // Edit Menu
249 
250 public:
251 void OnUndo(const CommandContext &context );
252 void OnRedo(const CommandContext &context );
253 
254 private:
255 static void FinishCopy(const Track *n, Track *dest);
256 static void FinishCopy(const Track *n, Track::Holder &&dest, TrackList &list);
257 
258 public:
259 void OnCut(const CommandContext &context );
260 void OnSplitCut(const CommandContext &context );
261 void OnCopy(const CommandContext &context );
262 
263 void OnPaste(const CommandContext &context );
264 private:
265 bool HandlePasteText(); // Handle text paste (into active label), if any. Return true if pasted.
266 bool HandlePasteNothingSelected(); // Return true if nothing selected, regardless of paste result.
267 public:
268 
269 void OnPasteNewLabel(const CommandContext &context );
270 void OnPasteOver(const CommandContext &context );
271 void OnTrim(const CommandContext &context );
272 
273 void OnDelete(const CommandContext &context );
274 void OnSplitDelete(const CommandContext &context );
275 void OnSilence(const CommandContext &context );
276 
277 void OnSplit(const CommandContext &context );
278 void OnSplitNew(const CommandContext &context );
279 void OnJoin(const CommandContext &context );
280 void OnDisjoin(const CommandContext &context );
281 void OnDuplicate(const CommandContext &context );
282 
283 void OnCutLabels(const CommandContext &context );
284 void OnSplitCutLabels(const CommandContext &context );
285 void OnCopyLabels(const CommandContext &context );
286 void OnDeleteLabels(const CommandContext &context );
287 void OnSplitDeleteLabels(const CommandContext &context );
288 void OnSilenceLabels(const CommandContext &context );
289 void OnSplitLabels(const CommandContext &context );
290 void OnJoinLabels(const CommandContext &context );
291 void OnDisjoinLabels(const CommandContext &context );
292 
293 void OnSelectTimeAndTracks(bool bAllTime, bool bAllTracks);
294 void OnSelectAllTime(const CommandContext &context );
295 void OnSelectAllTracks(const CommandContext &context );
296 void OnSelectAll(const CommandContext &context );
297 void OnSelectSomething(const CommandContext &context );
298 void OnSelectNone(const CommandContext &context );
299 private:
301 int CountSelectedTracks();
302 public:
303 #ifdef EXPERIMENTAL_SPECTRAL_EDITING
304 // For toggling of spectral seletion
305 double mLastF0;
306 double mLastF1;
307 void OnToggleSpectralSelection(const CommandContext &context );
308 void DoNextPeakFrequency(bool up);
309 void OnNextHigherPeakFrequency(const CommandContext &context );
310 void OnNextLowerPeakFrequency(const CommandContext &context );
311 #endif
312 void OnSelectCursorEnd(const CommandContext &context );
313 void OnSelectStartCursor(const CommandContext &context );
314 void OnSelectTrackStartToEnd(const CommandContext &context );
317 void OnSelectClipBoundary(bool next);
318 struct FoundTrack {
320  int trackNum{};
321  bool channel{};
322 
323  wxString ComposeTrackName() const;
324 };
326  bool found{};
327  double startTime{};
328  double endTime{};
329  int index{};
330 };
331 FoundClip FindNextClip(const WaveTrack* wt, double t0, double t1);
332 FoundClip FindPrevClip(const WaveTrack* wt, double t0, double t1);
333 int FindClips(double t0, double t1, bool next, std::vector<FoundClip>& results);
335 void OnSelectPrevClip(const CommandContext &context );
336 void OnSelectNextClip(const CommandContext &context );
337 void OnSelectClip(bool next);
338 void OnSelectCursorStoredCursor(const CommandContext &context );
339 void OnSelectSyncLockSel(const CommandContext &context );
340 
341 void OnZoomIn(const CommandContext &context );
342 void OnZoomOut(const CommandContext &context );
343 void OnZoomToggle(const CommandContext &context );
344 void OnZoomNormal(const CommandContext &context );
345 void OnZoomFit(const CommandContext &context );
346 void OnZoomFitV(const CommandContext &context );
347 void DoZoomFitV();
348 void OnZoomSel(const CommandContext &context );
349 void OnGoSelStart(const CommandContext &context );
350 void OnGoSelEnd(const CommandContext &context );
351 
352 void OnExpandAllTracks(const CommandContext &context );
353 void OnCollapseAllTracks(const CommandContext &context );
354 
355 void OnPanTracks(float PanValue);
356 void OnPanLeft(const CommandContext &context );
357 void OnPanRight(const CommandContext &context );
358 void OnPanCenter(const CommandContext &context );
359 
360 void OnMuteAllTracks(const CommandContext &context );
361 void OnUnmuteAllTracks(const CommandContext &context );
362 
363 void OnShowClipping(const CommandContext &context );
364 void OnShowExtraMenus(const CommandContext &context );
365 
366 void OnHistory(const CommandContext &context );
367 
368 void OnKaraoke(const CommandContext &context );
369 void OnMixerBoard(const CommandContext &context );
370 
371 void OnPlotSpectrum(const CommandContext &context );
372 void OnContrast(const CommandContext &context );
373 
374 void OnShowTransportToolBar(const CommandContext &context );
375 void OnShowDeviceToolBar(const CommandContext &context );
376 void OnShowEditToolBar(const CommandContext &context );
377 void OnShowMeterToolBar(const CommandContext &context );
378 void OnShowRecordMeterToolBar(const CommandContext &context );
379 void OnShowPlayMeterToolBar(const CommandContext &context );
380 void OnShowMixerToolBar(const CommandContext &context );
381 void OnShowSelectionToolBar(const CommandContext &context );
382 #ifdef EXPERIMENTAL_SPECTRAL_EDITING
383 void OnShowSpectralSelectionToolBar(const CommandContext &context );
384 #endif
385 void OnShowScrubbingToolBar(const CommandContext &context );
386 void OnShowToolsToolBar(const CommandContext &context );
387 void OnShowTranscriptionToolBar(const CommandContext &context );
388 void OnResetToolBars(const CommandContext &context );
389 
390 #if defined(EXPERIMENTAL_EFFECTS_RACK)
391 void OnShowEffectsRack(const CommandContext &context );
392 #endif
393 
394  // Transport Menu
395 
396 void OnSoundActivated(const CommandContext &context );
397 void OnToggleSoundActivated(const CommandContext &context );
398 void OnTogglePinnedHead(const CommandContext &context );
399 void OnTogglePlayRecording(const CommandContext &context );
400 void OnToggleSWPlaythrough(const CommandContext &context );
401 #ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT
402  void OnToggleAutomatedInputLevelAdjustment(const CommandContext &context );
403 #endif
404 void OnRescanDevices(const CommandContext &context );
405 
406 // Import Submenu
407 void OnImport(const CommandContext &context );
408 void OnImportLabels(const CommandContext &context );
409 void OnImportMIDI(const CommandContext &context );
410 
411 // return null on failure; if success, return the given project, or a NEW
412 // one, if the given was null; create no NEW project if failure
414  AudacityProject *pProject, const wxString &fileName);
415 
416 void OnImportRaw(const CommandContext &context );
417 
418 void OnEditMetadata(const CommandContext &context );
419 bool DoEditMetadata(const wxString &title, const wxString &shortUndoDescription, bool force);
420 
421 void OnMixAndRender(const CommandContext &context );
422 void OnMixAndRenderToNewTrack(const CommandContext &context );
423 void HandleMixAndRender(bool toNewTrack);
424 
425 private:
429 public:
430 void OnSelectionSave(const CommandContext &context );
431 void OnSelectionRestore(const CommandContext &context );
432 void OnCursorPositionStore(const CommandContext &context );
433 
434 void OnCursorTrackStart(const CommandContext &context );
435 void OnCursorTrackEnd(const CommandContext &context );
436 void OnCursorSelStart(const CommandContext &context );
437 void OnCursorSelEnd(const CommandContext &context );
439  int nFound{}; // 0, 1, or 2
440  double time{};
441  int index1{};
442  bool clipStart1{};
443  int index2{};
444  bool clipStart2{};
445 };
446 FoundClipBoundary FindNextClipBoundary(const WaveTrack* wt, double time);
447 FoundClipBoundary FindPrevClipBoundary(const WaveTrack* wt, double time);
448 double AdjustForFindingStartTimes(const std::vector<const WaveClip*>& clips, double time);
449 double AdjustForFindingEndTimes(const std::vector<const WaveClip*>& clips, double time);
450 int FindClipBoundaries(double time, bool next, std::vector<FoundClipBoundary>& results);
451 void OnCursorNextClipBoundary(const CommandContext &context );
452 void OnCursorPrevClipBoundary(const CommandContext &context );
453 void OnCursorClipBoundary(bool next);
454 static wxString ClipBoundaryMessage(const std::vector<FoundClipBoundary>& results);
455 
456 void OnAlignNoSync(const CommandContext &context );
457 void OnAlign(const CommandContext &context );
458 //void OnAlignMoveSel(int index);
459 void HandleAlign(int index, bool moveSel);
461 
462 #ifdef EXPERIMENTAL_SCOREALIGN
463 void OnScoreAlign(const CommandContext &context );
464 #endif // EXPERIMENTAL_SCOREALIGN
465 
466 // Tracks menu
467 void OnNewWaveTrack(const CommandContext &context );
468 void OnNewStereoTrack(const CommandContext &context );
469 void OnNewLabelTrack(const CommandContext &context );
470 void OnNewTimeTrack(const CommandContext &context );
471 void OnTimerRecord(const CommandContext &context );
472 void OnRemoveTracks(const CommandContext &context );
473 void OnMoveSelectionWithTracks(const CommandContext &context );
474 void OnSyncLock(const CommandContext &context );
475 void OnAddLabel(const CommandContext &context );
476 void OnAddLabelPlaying(const CommandContext &context );
477 void DoEditLabels(LabelTrack *lt = nullptr, int index = -1);
478 void OnEditLabels(const CommandContext &context );
479 void OnToggleTypeToCreateLabel(const CommandContext &context );
480 
481  // Effect Menu
482 
484 {
485 public:
486  // No flags specified
487  static const int kNone = 0x00;
488  // Flag used to disable prompting for configuration parameteres.
489  static const int kConfigured = 0x01;
490  // Flag used to disable saving the state after processing.
491  static const int kSkipState = 0x02;
492  // Flag used to disable "Repeat Last Effect"
493  static const int kDontRepeatLast = 0x04;
494 };
495 
496 bool DoEffect(const PluginID & ID, const CommandContext & context, int flags);
497 void OnEffect(const CommandContext &context );
498 void OnRepeatLastEffect(const CommandContext &context );
499 bool DoAudacityCommand(const PluginID & ID, const CommandContext &, int flags);
500 void OnApplyMacroDirectly(const CommandContext &context );
501 void OnApplyMacrosPalette(const CommandContext &context );
502 void OnManageMacros(const CommandContext &context );
503 void OnStereoToMono(const CommandContext &context );
504 void OnAudacityCommand(const CommandContext &context );
506 static void RebuildAllMenuBars();
507 void OnManageGenerators(const CommandContext &context );
508 void OnManageEffects(const CommandContext &context );
509 void OnManageAnalyzers(const CommandContext &context );
510 void OnManageTools(const CommandContext &context );
511 
512 
513 
514  // Help Menu
515 
516 void OnAbout(const CommandContext &context );
517 void OnQuickHelp(const CommandContext &context );
518 void OnManual(const CommandContext &context );
519 void OnCheckForUpdates(const CommandContext &context );
520 void MayCheckForUpdates();
521 void OnShowLog(const CommandContext &context );
522 void OnHelpWelcome(const CommandContext &context );
523 void OnBenchmark(const CommandContext &context );
524 #if defined(EXPERIMENTAL_CRASH_REPORT)
525 void OnCrashReport(const CommandContext &context );
526 #endif
527 void OnSimulateRecordingErrors(const CommandContext &context );
528 void OnDetectUpstreamDropouts(const CommandContext &context );
529 void OnScreenshot(const CommandContext &context );
530 void OnAudioDeviceInfo(const CommandContext &context );
531 #ifdef EXPERIMENTAL_MIDI_OUT
532 void OnMidiDeviceInfo(const CommandContext &context );
533 #endif
534 
535  //
536 
537 void OnSeparator(const CommandContext &context );
538 
539  // Keyboard navigation
540 
541 void NextOrPrevFrame(bool next);
542 void PrevFrame(const CommandContext &context );
543 void NextFrame(const CommandContext &context );
544 
545 void PrevWindow(const CommandContext &context );
546 void NextWindow(const CommandContext &context );
547 
548 void OnResample(const CommandContext &context );
549 
550 private:
555 };
556 
560 };
561 
562 enum TimeUnit {
565 };
566 
567 bool OnlyHandleKeyUp( const CommandContext &context );
568 void OnCursorMove(double seekStep);
569 void OnBoundaryMove(int step);
570 
571 // Handle small cursor and play head movements
572 void SeekLeftOrRight
573 (double direction, SelectionOperation operation);
574 
575 void SeekWhenAudioActive(double seekStep);
577 (double seekStep, TimeUnit timeUnit,
578  SelectionOperation operation);
580 (double seekStep, TimeUnit timeUnit);
581 
582 
583 
584 double OffsetTime(double t, double offset, TimeUnit timeUnit, int snapToTime);
585 
586 // Helper for moving by keyboard with snap-to-grid enabled
587 double GridMove(double t, int minPix);
588 
589 // Make sure we return to "public" for subsequent declarations in Project.h.
590 public:
591 
592 
593 #endif
594 
595 
596 
void OnRemoveTracks(const CommandContext &context)
void NextFrame(const CommandContext &context)
void MoveWhenAudioInactive(double seekStep, TimeUnit timeUnit)
void OnExport(const wxString &Format)
void OnShowSpectralSelectionToolBar(const CommandContext &context)
void OnShowExtraMenus(const CommandContext &context)
void OnShowTransportToolBar(const CommandContext &context)
void OnExportMp3(const CommandContext &context)
void OnPlayBeforeSelectionStart(const CommandContext &context)
CursorDirection
Definition: Menus.h:557
void OnZoomSel(const CommandContext &context)
void OnShowScrubbingToolBar(const CommandContext &context)
static wxArrayString names()
Definition: Tags.cpp:697
void OnEditLabels(const CommandContext &context)
void SeekWhenAudioActive(double seekStep)
static void RebuildAllMenuBars()
A list of TrackListNode items.
Definition: Track.h:618
void OnSplitCut(const CommandContext &context)
void OnExportMIDI(const CommandContext &context)
void OnToggleSWPlaythrough(const CommandContext &context)
void OnZoomOut(const CommandContext &context)
void OnCopyLabels(const CommandContext &context)
void OnSkipStart(const CommandContext &context)
void OnCursorLongJumpRight(const CommandContext &context)
void OnSplitDeleteLabels(const CommandContext &context)
void OnSave(const CommandContext &context)
void OnZoomIn(const CommandContext &context)
void OnSaveCopy(const CommandContext &context)
void OnPasteOver(const CommandContext &context)
void OnSelectAll(const CommandContext &context)
void OnManageGenerators(const CommandContext &context)
void OnPlaySpeedDec(const CommandContext &context)
void HandleListSelection(Track *t, bool shift, bool ctrl, bool modifyState)
void OnInputChannels(const CommandContext &context)
ViewInfo is used mainly to hold the zooming, selection and scroll information. It also has some statu...
Definition: ViewInfo.h:141
void OnCollapseAllTracks(const CommandContext &context)
void PopulateEffectsMenu(CommandManager *c, EffectType type, CommandFlag batchflags, CommandFlag realflags)
bool DoPlayStopSelect(bool click, bool shift)
void OnExit(const CommandContext &context)
void OnSelectCursorStoredCursor(const CommandContext &context)
static const int kConfigured
Definition: Menus.h:489
Abstract base class used in importing a file.
Definition: Import.h:32
void OnSelectSyncLockSel(const CommandContext &context)
void OnCursorLeft(const CommandContext &context)
void OnTrackMute(const CommandContext &context)
void OnPasteNewLabel(const CommandContext &context)
void OnMultiTool(const CommandContext &context)
void OnPlayToSelection(const CommandContext &context)
int trackNum
Definition: Menus.h:320
void OnSeekLeftLong(const CommandContext &context)
void DoClipLeftOrRight(bool right, bool keyUp)
void OnSplitCutLabels(const CommandContext &context)
void OnClipRight(const CommandContext &context)
void OnSyncLock(const CommandContext &context)
static AudacityProject * DoImportMIDI(AudacityProject *pProject, const wxString &fileName)
void OnExpandAllTracks(const CommandContext &context)
int index
Definition: Menus.h:329
void OnToggle(const CommandContext &context)
void OnMixerBoard(const CommandContext &context)
void OnTrackClose(const CommandContext &context)
void OnRecord2ndChoice(const CommandContext &context)
void OnClipLeft(const CommandContext &context)
void AddEffectMenuItemGroup(CommandManager *c, const wxArrayString &names, const std::vector< bool > &vHasDialog, const PluginIDList &plugs, const std::vector< CommandFlag > &flags, bool isDefault)
static const int kSkipState
Definition: Menus.h:491
void OnSeparator(const CommandContext &context)
void OnStop(const CommandContext &context)
void OnEffect(const CommandContext &context)
void OnSelectNone(const CommandContext &context)
void OnPlayLooped(const CommandContext &context)
TimeUnit
Definition: Menus.h:562
void OnTrim(const CommandContext &context)
void OnCursorClipBoundary(bool next)
void OnCheckForUpdates(const CommandContext &context)
void OnMacZoom(const CommandContext &context)
void OnSelectClip(bool next)
void OnOutputGain(const CommandContext &context)
void OnReloadPreferences(const CommandContext &context)
void OnCursorPrevClipBoundary(const CommandContext &context)
void OnTrackGainInc(const CommandContext &context)
void OnZoomFit(const CommandContext &context)
static void FinishCopy(const Track *n, Track *dest)
void OnNextLowerPeakFrequency(const CommandContext &context)
void OnCursorUp(const CommandContext &context)
void OnTrackGainDec(const CommandContext &context)
void OnSelectClipBoundary(bool next)
SelectionOperation
Definition: Menus.h:551
void OnShowToolsToolBar(const CommandContext &context)
void OnCursorLongJumpLeft(const CommandContext &context)
void OnOutputGainInc(const CommandContext &context)
void OnShowPlayMeterToolBar(const CommandContext &context)
void OnSplitDelete(const CommandContext &context)
void OnTrackMoveUp(const CommandContext &context)
void OnPrevTool(const CommandContext &context)
void OnPlayAfterSelectionStart(const CommandContext &context)
void OnMixAndRenderToNewTrack(const CommandContext &context)
void OnMixAndRender(const CommandContext &context)
static const int kDontRepeatLast
Definition: Menus.h:493
void OnShowSelectionToolBar(const CommandContext &context)
void OnRecord(const CommandContext &context)
void NextOrPrevFrame(bool next)
wxString PluginID
Definition: Types.h:209
void OnImportMIDI(const CommandContext &context)
void OnShowMeterToolBar(const CommandContext &context)
void PrevFrame(const CommandContext &context)
void OnShowTranscriptionToolBar(const CommandContext &context)
void OnResample(const CommandContext &context)
const WaveTrack * waveTrack
Definition: Menus.h:319
FoundClip FindNextClip(const WaveTrack *wt, double t0, double t1)
void OnSetLeftSelection(const CommandContext &context)
bool DoAudacityCommand(const PluginID &ID, const CommandContext &, int flags)
void OnLockPlayRegion(const CommandContext &context)
void OnCursorSelStart(const CommandContext &context)
void OnTimeShiftTool(const CommandContext &context)
void OnImportRaw(const CommandContext &context)
void OnSelExtendLeft(const CommandContext &context)
FoundClipBoundary FindNextClipBoundary(const WaveTrack *wt, double time)
void OnSelectCursorToNextClipBoundary(const CommandContext &context)
int FindClips(double t0, double t1, bool next, std::vector< FoundClip > &results)
CommandContext provides addiitonal information to an 'Apply()' command. It provides the project...
void OnFullScreen(const CommandContext &context)
void OnUndo(const CommandContext &context)
void OnPageSetup(const CommandContext &context)
void OnCutLabels(const CommandContext &context)
void OnShowClipping(const CommandContext &context)
void OnAlignNoSync(const CommandContext &context)
bool clipStart2
Definition: Menus.h:444
void DoEditLabels(LabelTrack *lt=nullptr, int index=-1)
bool channel
Definition: Menus.h:321
void OnSelectPrevClip(const CommandContext &context)
void OnZoomToggle(const CommandContext &context)
void OnDisjoinLabels(const CommandContext &context)
void OnKaraoke(const CommandContext &context)
void OnPrint(const CommandContext &context)
void OnMoveToPrevLabel(const CommandContext &context)
void ModifyUndoMenuItems()
void OnShiftUp(const CommandContext &context)
wxArrayString PluginIDList
void OnPanTracks(float PanValue)
void OnSelectTrackStartToEnd(const CommandContext &context)
bool clipStart1
Definition: Menus.h:442
void OnPlayBeforeSelectionEnd(const CommandContext &context)
void OnOutputDevice(const CommandContext &context)
void OnMacMinimizeAll(const CommandContext &context)
void OnJoin(const CommandContext &context)
void OnSelectionRestore(const CommandContext &context)
void OnDelete(const CommandContext &context)
void OnEditMetadata(const CommandContext &context)
void OnPlayBeforeAndAfterSelectionEnd(const CommandContext &context)
void OnOpen(const CommandContext &context)
void OnSeekRightShort(const CommandContext &context)
void OnTrackMoveBottom(const CommandContext &context)
void OnAlign(const CommandContext &context)
FoundClip FindPrevClip(const WaveTrack *wt, double t0, double t1)
A LabelTrack is a Track that holds labels (LabelStruct).
Definition: LabelTrack.h:113
void OnTrackMenu(const CommandContext &context)
void OnMoveSelectionWithTracks(const CommandContext &context)
void OnNextHigherPeakFrequency(const CommandContext &context)
void OnCursorTrackEnd(const CommandContext &context)
void OnPreferences(const CommandContext &context)
void OnShowMixerToolBar(const CommandContext &context)
void OnNewStereoTrack(const CommandContext &context)
void ModifyAllProjectToolbarMenus()
void OnSeekRightLong(const CommandContext &context)
void OnShiftDown(const CommandContext &context)
void MayCheckForUpdates()
void OnTrackPanLeft(const CommandContext &context)
AudacityProject provides the main window, with tools and tracks contained within it.
Definition: Project.h:176
void OnUnmuteAllTracks(const CommandContext &context)
SelectedRegion mRegionSave
Definition: Menus.h:426
void OnSelSetExtendRight(const CommandContext &context)
void OnSimulateRecordingErrors(const CommandContext &context)
void OnShowLog(const CommandContext &context)
int DoAddLabel(const SelectedRegion &region, bool preserveFocus=false)
void OnTrackGain(const CommandContext &context)
void OnManageEffects(const CommandContext &context)
bool ChannelsHaveSameClipBoundaries(const WaveTrack *wt)
void OnSnapToOff(const CommandContext &context)
void OnMuteAllTracks(const CommandContext &context)
void OnFirstTrack(const CommandContext &context)
void OnClose(const CommandContext &context)
void OnImportLabels(const CommandContext &context)
void OnShowEditToolBar(const CommandContext &context)
Defines a selected portion of a project.
void OnInputGain(const CommandContext &context)
void OnMoveToLabel(bool next)
void OnSelectTimeAndTracks(bool bAllTime, bool bAllTracks)
int CountSelectedTracks()
void OnCursorSelEnd(const CommandContext &context)
void OnTrackPan(const CommandContext &context)
void OnBoundaryMove(int step)
void OnSelContractRight(const CommandContext &context)
void OnPaste(const CommandContext &context)
int FindClipBoundaries(double time, bool next, std::vector< FoundClipBoundary > &results)
void DoNextPeakFrequency(bool up)
void OnSplitLabels(const CommandContext &context)
void OnImport(const CommandContext &context)
void OnNewWaveTrack(const CommandContext &context)
void OnSelToEnd(const CommandContext &context)
void OnCursorRight(const CommandContext &context)
void OnTrackMoveTop(const CommandContext &context)
void OnPlayAfterSelectionEnd(const CommandContext &context)
double GridMove(double t, int minPix)
void OnGoSelStart(const CommandContext &context)
void OnExportOgg(const CommandContext &context)
void OnNewLabelTrack(const CommandContext &context)
void OnSelectAllTracks(const CommandContext &context)
A Track that contains audio waveform data.
Definition: WaveTrack.h:60
void OnInputGainInc(const CommandContext &context)
void OnPanLeft(const CommandContext &context)
void OnSelectCursorEnd(const CommandContext &context)
void OnToggleSpectralSelection(const CommandContext &context)
void NextWindow(const CommandContext &context)
CommandFlag GetUpdateFlags(bool checkActive=false)
FoundClipBoundary FindPrevClipBoundary(const WaveTrack *wt, double time)
Fundamental data object of Audacity, placed in the TrackPanel. Classes derived form it include the Wa...
Definition: Track.h:101
void OnLastTrack(const CommandContext &context)
void OnNextTool(const CommandContext &context)
void OnSaveAs(const CommandContext &context)
bool DoEditMetadata(const wxString &title, const wxString &shortUndoDescription, bool force)
CommandManager implements a system for organizing all user-callable commands.
void CreateRecentFilesMenu(CommandManager *c)
void OnSelectPrevClipBoundaryToCursor(const CommandContext &context)
static wxString ClipBoundaryMessage(const std::vector< FoundClipBoundary > &results)
void OnRepeatLastEffect(const CommandContext &context)
void OnZeroCrossing(const CommandContext &context)
void OnToggleSoundActivated(const CommandContext &context)
void OnSnapToPrior(const CommandContext &context)
void OnApplyMacrosPalette(const CommandContext &context)
size_t mAlignLabelsCount
Definition: Menus.h:460
void OnTimerRecord(const CommandContext &context)
bool HandlePasteNothingSelected()
void OnDeleteLabels(const CommandContext &context)
void OnSetRightSelection(const CommandContext &context)
void OnScreenshot(const CommandContext &context)
bool DoEffect(const PluginID &ID, const CommandContext &context, int flags)
void OnExportAudio(const CommandContext &context)
void OnCursorPositionStore(const CommandContext &context)
double GetTime(const Track *t)
void OnTogglePlayRecording(const CommandContext &context)
void OnPlotSpectrum(const CommandContext &context)
void OnPlayAtSpeedLooped(const CommandContext &context)
void DoZoomFitV()
void OnCursorShortJumpRight(const CommandContext &context)
void OnZoomNormal(const CommandContext &context)
void OnCut(const CommandContext &context)
void OnQuickHelp(const CommandContext &context)
void OnContrast(const CommandContext &context)
void OnSetPlaySpeed(const CommandContext &context)
static void DoMacMinimize(AudacityProject *project)
void OnSelToStart(const CommandContext &context)
static const int kNone
Definition: Menus.h:487
double startTime
Definition: Menus.h:327
void OnAbout(const CommandContext &context)
void OnShowRecordMeterToolBar(const CommandContext &context)
void ModifyToolbarMenus()
void OnManual(const CommandContext &context)
void OnSelectionSave(const CommandContext &context)
void OnExportWav(const CommandContext &context)
double NearestZeroCrossing(double t0)
CommandFlag GetFocusedFrame()
bool HandlePasteText()
void OnMacBringAllToFront(const CommandContext &context)
void OnAudioDeviceInfo(const CommandContext &context)
void PopulateMacrosMenu(CommandManager *c, CommandFlag flags)
void OnSoundActivated(const CommandContext &context)
void OnSilenceLabels(const CommandContext &context)
void OnRescanDevices(const CommandContext &context)
void HandleAlign(int index, bool moveSel)
double AdjustForFindingEndTimes(const std::vector< const WaveClip * > &clips, double time)
CommandFlag
Definition: CommandFlag.h:16
void OnCursorNextClipBoundary(const CommandContext &context)
double mCursorPositionStored
Definition: Menus.h:428
void OnHistory(const CommandContext &context)
void OnSelExtendRight(const CommandContext &context)
bool MakeReadyToPlay(bool loop=false, bool cutpreview=false)
void OnSelContractLeft(const CommandContext &context)
EffectType
void OnZoomFitV(const CommandContext &context)
void OnDisjoin(const CommandContext &context)
void OnStopSelect(const CommandContext &context)
int CountSelectedWaveTracks()
void OnPlayAtSpeedCutPreview(const CommandContext &context)
void OnSilence(const CommandContext &context)
void OnSelectTool(const CommandContext &context)
void OnDuplicate(const CommandContext &context)
void OnSelSetExtendLeft(const CommandContext &context)
void OnCursorDown(const CommandContext &context)
void SetTool(int tool)
void OnPlayStopSelect(const CommandContext &context)
void OnPanCenter(const CommandContext &context)
void OnManageAnalyzers(const CommandContext &context)
double OffsetTime(double t, double offset, TimeUnit timeUnit, int snapToTime)
void OnShowDeviceToolBar(const CommandContext &context)
void OnTrackPanRight(const CommandContext &context)
double mLastF1
Definition: Menus.h:306
void OnDrawTool(const CommandContext &context)
void OnTrackSolo(const CommandContext &context)
int DialogForLabelName(const wxString &initialValue, wxString &value)
void OnCursorMove(double seekStep)
void OnPlayStop(const CommandContext &context)
void OnExportMultiple(const CommandContext &context)
void OnStereoToMono(const CommandContext &context)
void OnRedo(const CommandContext &context)
void OnApplyMacroDirectly(const CommandContext &context)
MoveChoice
Definition: Menus.h:119
void OnInputDevice(const CommandContext &context)
void OnAudacityCommand(const CommandContext &context)
void OnJoinLabels(const CommandContext &context)
void OnSortTime(const CommandContext &context)
void OnManageMacros(const CommandContext &context)
void OnNewTimeTrack(const CommandContext &context)
void OnResetToolBars(const CommandContext &context)
void CreateMenusAndCommands()
void OnSortName(const CommandContext &context)
void MoveTrack(Track *target, MoveChoice choice)
void OnCursorShortJumpLeft(const CommandContext &context)
void OnAddLabel(const CommandContext &context)
void OnPlayOneSecond(const CommandContext &context)
void OnInputGainDec(const CommandContext &context)
void OnDetectUpstreamDropouts(const CommandContext &context)
void OnBenchmark(const CommandContext &context)
std::unique_ptr< Track > Holder
Definition: Track.h:263
static double OnClipMove(ViewInfo &viewInfo, Track *track, TrackList &trackList, bool syncLocked, bool right)
double mLastF0
Definition: Menus.h:305
bool mCursorPositionHasBeenStored
Definition: Menus.h:427
void OnNextTrack(bool shift)
void PrevWindow(const CommandContext &context)
void OnPause(const CommandContext &context)
void OnManageTools(const CommandContext &context)
bool found
Definition: Menus.h:326
wxString ComposeTrackName() const
bool OnlyHandleKeyUp(const CommandContext &context)
void OnSelectNextClip(const CommandContext &context)
void OnSeekLeftShort(const CommandContext &context)
void OnHelpWelcome(const CommandContext &context)
void SeekLeftOrRight(double direction, SelectionOperation operation)
void OnSplit(const CommandContext &context)
void OnSnapToNearest(const CommandContext &context)
void OnToggleTypeToCreateLabel(const CommandContext &context)
void OnPlayCutPreview(const CommandContext &context)
void OnZoomTool(const CommandContext &context)
void OnTogglePinnedHead(const CommandContext &context)
void OnSkipEnd(const CommandContext &context)
void OnCopy(const CommandContext &context)
void OnSplitNew(const CommandContext &context)
void OnCursorTrackStart(const CommandContext &context)
double endTime
Definition: Menus.h:328
void OnNew(const CommandContext &context)
void OnSelectSomething(const CommandContext &context)
void OnAddLabelPlaying(const CommandContext &context)
void OnOutputGainDec(const CommandContext &context)
void OnPlayAtSpeed(const CommandContext &context)
void OnPanRight(const CommandContext &context)
void SeekWhenAudioInactive(double seekStep, TimeUnit timeUnit, SelectionOperation operation)
double time
Definition: Menus.h:440
void AddEffectMenuItems(CommandManager *c, std::vector< const PluginDescriptor * > &plugs, CommandFlag batchflags, CommandFlag realflags, bool isDefault)
void OnGoSelEnd(const CommandContext &context)
void OnMacMinimize(const CommandContext &context)
void OnManagePluginsMenu(EffectType Type)
void OnPlaySpeedInc(const CommandContext &context)
void OnExportLabels(const CommandContext &context)
double AdjustForFindingStartTimes(const std::vector< const WaveClip * > &clips, double time)
void OnAudioHost(const CommandContext &context)
void OnExportSelection(const CommandContext &context)
void OnEnvelopeTool(const CommandContext &context)
void OnSelectStartCursor(const CommandContext &context)
void OnPrevTrack(bool shift)
void OnCheckDependencies(const CommandContext &context)
void OnSelectAllTime(const CommandContext &context)
void OnUnlockPlayRegion(const CommandContext &context)
void OnMoveToNextLabel(const CommandContext &context)
void OnPlayBeforeAndAfterSelectionStart(const CommandContext &context)
void OnTrackMoveDown(const CommandContext &context)
void HandleMixAndRender(bool toNewTrack)