-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMenus.h
388 lines (298 loc) · 7.98 KB
/
Menus.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
/**********************************************************************
Audacity: A Digital Audio Editor
Menus.h
Dominic Mazzoni
**********************************************************************/
#ifndef __AUDACITY_MENUS__
#define __AUDACITY_MENUS__
#include "Experimental.h"
// These are all member functions of class AudacityProject.
// Vaughan, 2010-08-05:
// Note that this file is included in a "public" section of Project.h.
// Most of these methods do not need to be public, and because
// we do not subclass AudacityProject, they should be "private."
// Because the ones that need to be public are intermixed,
// I've added "private" in just a few cases.
private:
void CreateMenusAndCommands();
#ifdef EFFECT_CATEGORIES
/** Generate submenus for the categories that contain more than one effect
and return the effects from the categories that do not contain more than
submenuThreshold effects so the caller can add them to the current menu. */
EffectSet CreateEffectSubmenus(CommandManager* c,
const CategorySet& categories, int flags,
unsigned submenuThreshold = 1);
/** Add the set of effects to the current menu. */
void AddEffectsToMenu(CommandManager* c, const EffectSet& effects);
#endif
void CreateRecentFilesMenu(CommandManager *c);
void ModifyUndoMenuItems();
void ModifyToolbarMenus();
// Calls ModifyToolbarMenus() on all projects
void ModifyAllProjectToolbarMenus();
int GetFocusedFrame();
wxUint32 GetUpdateFlags();
double NearestZeroCrossing(double t0);
public:
//Adds label and returns index of label in labeltrack.
int DoAddLabel(double left, double right);
private:
// Selecting a tool from the keyboard
void SetTool(int tool);
void OnSelectTool();
void OnZoomTool();
void OnEnvelopeTool();
void OnTimeShiftTool();
void OnDrawTool();
void OnMultiTool();
void OnNextTool();
void OnPrevTool();
public:
// Audio I/O Commands
void OnStop();
void OnPause();
void OnRecord();
void OnRecordAppend();
void OnStopSelect();
void OnSkipStart();
void OnSkipEnd();
void OnSeekLeftShort();
void OnSeekRightShort();
void OnSeekLeftLong();
void OnSeekRightLong();
// Different posibilities for playing sound
bool MakeReadyToPlay(); // Helper function that sets button states etc.
void OnPlayStop();
void OnPlayStopSelect();
void OnPlayOneSecond();
void OnPlayToSelection();
void OnPlayLooped();
void OnPlayCutPreview();
// Wave track control
void OnTrackPan();
void OnTrackPanLeft();
void OnTrackPanRight();
void OnTrackGain();
void OnTrackGainInc();
void OnTrackGainDec();
void OnTrackMenu();
void OnTrackMute();
void OnTrackSolo();
void OnTrackClose();
// Device control
void OnInputDevice();
void OnOutputDevice();
void OnAudioHost();
void OnInputChannels();
// Mixer control
void OnOutputGain();
void OnInputGain();
void OnOutputGainInc();
void OnOutputGainDec();
void OnInputGainInc();
void OnInputGainDec();
// Transcription control
void OnPlayAtSpeed();
void OnSetPlaySpeed();
void OnPlaySpeedInc();
void OnPlaySpeedDec();
// Selection-Editing Commands
void OnCursorUp();
void OnShiftUp();
void OnCursorDown();
void OnShiftDown();
void OnToggle();
void OnCursorLeft(const wxEvent * evt);
void OnCursorRight(const wxEvent * evt);
void OnSelExtendLeft(const wxEvent * evt);
void OnSelExtendRight(const wxEvent * evt);
void OnSelContractLeft(const wxEvent * evt);
void OnSelContractRight(const wxEvent * evt);
void OnCursorShortJumpLeft();
void OnCursorShortJumpRight();
void OnCursorLongJumpLeft();
void OnCursorLongJumpRight();
void OnSelSetExtendLeft();
void OnSelSetExtendRight();
void OnSetLeftSelection();
void OnSetRightSelection();
void OnSelToStart();
void OnSelToEnd();
void OnZeroCrossing();
void OnLockPlayRegion();
void OnUnlockPlayRegion();
double GetTime(Track *t);
void OnSortTime();
void OnSortName();
void OnSnapToOff();
void OnSnapToNearest();
void OnSnapToPrior();
void OnFullScreen();
// File Menu
void OnNew();
void OnOpen();
void OnClose();
void OnSave();
void OnSaveAs();
#ifdef USE_LIBVORBIS
void OnSaveCompressed();
#endif
void OnCheckDependencies();
void OnExport();
void OnExportSelection();
void OnExportMultiple();
void OnExportLabels();
void OnExportMIDI();
void OnPreferences();
void OnPageSetup();
void OnPrint();
void OnExit();
// Edit Menu
public:
void OnUndo();
void OnRedo();
void OnCut();
void OnSplitCut();
void OnCopy();
void OnPaste();
private:
bool HandlePasteText(); // Handle text paste (into active label), if any. Return true if pasted.
bool HandlePasteNothingSelected(); // Return true if nothing selected, regardless of paste result.
public:
void OnPasteNewLabel();
void OnPasteOver();
void OnTrim();
void OnDelete();
void OnSplitDelete();
void OnSilence();
void OnSplit();
void OnSplitNew();
void OnJoin();
void OnDisjoin();
void OnDuplicate();
void OnCutLabels();
void OnSplitCutLabels();
void OnCopyLabels();
void OnDeleteLabels();
void OnSplitDeleteLabels();
void OnSilenceLabels();
void OnSplitLabels();
void OnJoinLabels();
void OnDisjoinLabels();
void OnSelectAll();
void OnSelectNone();
void OnSelectCursorEnd();
void OnSelectStartCursor();
void OnSelectSyncLockSel();
void OnSelectAllTracks();
// View Menu
void OnZoomIn();
void OnZoomOut();
void OnZoomToggle();
void OnZoomNormal();
void OnZoomFit();
void OnZoomFitV();
void DoZoomFitV();
void OnZoomSel();
void OnGoSelStart();
void OnGoSelEnd();
void OnExpandAllTracks();
void OnCollapseAllTracks();
void OnMuteAllTracks();
void OnUnMuteAllTracks();
void OnShowClipping();
void OnHistory();
void OnKaraoke();
void OnMixerBoard();
void OnPlotSpectrum();
void OnContrast();
void OnShowTransportToolBar();
void OnShowDeviceToolBar();
void OnShowEditToolBar();
void OnShowMeterToolBar();
void OnShowMixerToolBar();
void OnShowSelectionToolBar();
void OnShowToolsToolBar();
void OnShowTranscriptionToolBar();
void OnResetToolBars();
void OnSimplifiedView();
// Transport Menu
void OnSoundActivated();
void OnToggleSoundActivated();
void OnTogglePlayRecording();
void OnToggleSWPlaythrough();
#ifdef AUTOMATED_INPUT_LEVEL_ADJUSTMENT
void OnToogleAutomatedInputLevelAdjustment();
#endif
void OnRescanDevices();
// Import Submenu
void OnImport();
void OnImportLabels();
void OnImportMIDI();
void OnImportRaw();
void OnEditMetadata();
void OnMixAndRender();
void OnMixAndRenderToNewTrack();
void HandleMixAndRender(bool toNewTrack);
private:
double mSel0save;
double mSel1save;
public:
void OnSelectionSave();
void OnSelectionRestore();
void OnCursorTrackStart();
void OnCursorTrackEnd();
void OnCursorSelStart();
void OnCursorSelEnd();
void OnAlignNoSync(int index);
void OnAlign(int index);
void OnAlignMoveSel(int index);
void HandleAlign(int index, bool moveSel);
size_t mAlignLabelsCount;
#ifdef EXPERIMENTAL_SCOREALIGN
void OnScoreAlign();
#endif // EXPERIMENTAL_SCOREALIGN
// Tracks menu
void OnNewWaveTrack();
void OnNewStereoTrack();
void OnNewLabelTrack();
void OnNewTimeTrack();
void OnTimerRecord();
void OnRemoveTracks();
void OnSyncLock();
void OnAddLabel();
void OnAddLabelPlaying();
void OnEditLabels();
// Effect Menu
bool OnEffect(int type, Effect * f, wxString params = wxEmptyString, bool saveState = true);
void OnEffect(int type, int index);
void OnGenerateEffect(int index);
void OnGeneratePlugin(int index);
void OnRepeatLastEffect(int index);
void OnProcessAny(int index);
void OnProcessEffect(int index);
void OnProcessPlugin(int index);
void OnAnalyzeEffect(int index);
void OnAnalyzePlugin(int index);
void OnApplyChain();
void OnEditChains();
void OnStereoToMono(int index);
wxString BuildCleanFileName(wxString fileName, wxString extension);
// Help Menu
void OnAbout();
void OnQuickHelp();
void OnManual();
void OnShowLog();
void OnHelpWelcome();
void OnBenchmark();
void OnScreenshot();
void OnAudioDeviceInfo();
//
void OnSeparator();
// Keyboard navigation
void PrevFrame();
void NextFrame();
void OnResample();
// Make sure we return to "public" for subsequent declarations in Project.h.
public:
#endif