Audacity  2.2.2
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
AudacityProject Class Referencefinal

AudacityProject provides the main window, with tools and tracks contained within it. More...

#include <Project.h>

Inheritance diagram for AudacityProject:
TrackPanelListener SelectionBarListener SpectralSelectionBarListener XMLTagHandler AudioIOListener

Classes

struct  FoundClip
 
struct  FoundClipBoundary
 
struct  FoundTrack
 
class  OnEffectFlags
 
class  PlaybackScroller
 

Public Types

enum  MoveChoice { OnMoveUpID, OnMoveDownID, OnMoveTopID, OnMoveBottomID }
 
typedef void(WaveTrack::* EditFunction )(double, double)
 
typedef std::unique_ptr< Track >
(WaveTrack::* 
EditDestFunction )(double, double)
 

Public Member Functions

 AudacityProject (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size)
 
virtual ~AudacityProject ()
 
virtual void ApplyUpdatedTheme ()
 
AudioIOStartStreamOptions GetDefaultPlayOptions ()
 
TrackListGetTracks ()
 
const TrackListGetTracks () const
 
size_t GetTrackCount () const
 
UndoManagerGetUndoManager ()
 
sampleFormat GetDefaultFormat ()
 
double GetRate () const
 
bool ZoomInAvailable () const
 
bool ZoomOutAvailable () const
 
const SelectedRegionGetSelection () const
 
SelectedRegionGetSelection ()
 
double GetSel0 () const
 
double GetSel1 () const
 
const ZoomInfoGetZoomInfo () const
 
const ViewInfoGetViewInfo () const
 
ViewInfoGetViewInfo ()
 
std::shared_ptr< TrackGetFirstVisible ()
 
void GetPlayRegion (double *playRegionStart, double *playRegionEnd)
 
bool IsPlayRegionLocked ()
 
void SetSel0 (double)
 
void SetSel1 (double)
 
bool Clipboard ()
 
wxString GetName ()
 
const std::shared_ptr
< DirManager > & 
GetDirManager ()
 
TrackFactoryGetTrackFactory ()
 
AdornedRulerPanelGetRulerPanel ()
 
const TagsGetTags ()
 
int GetAudioIOToken () const
 
bool IsAudioActive () const
 
void SetAudioIOToken (int token)
 
bool IsActive ()
 
void OpenFile (const wxString &fileName, bool addtohistory=true)
 
bool WarnOfLegacyFile ()
 
bool Import (const wxString &fileName, WaveTrackArray *pTrackArray=NULL)
 
void ZoomAfterImport (Track *pTrack)
 
std::vector< std::shared_ptr
< Track > > 
AddImportedTracks (const wxString &fileName, TrackHolders &&newTracks)
 
bool Save ()
 
bool SaveAs (bool bWantSaveCompressed=false)
 
bool SaveAs (const wxString &newFileName, bool bWantSaveCompressed=false, bool addToHistory=true)
 
void Clear ()
 
const wxString & GetFileName ()
 
bool GetDirty ()
 
void SetProjectTitle (int number=-1)
 
wxPanel * GetTopPanel ()
 
TrackPanelGetTrackPanel ()
 
const TrackPanelGetTrackPanel () const
 
SelectionStateGetSelectionState ()
 
bool GetIsEmpty ()
 
bool GetTracksFitVerticallyZoomed ()
 
void SetTracksFitVerticallyZoomed (bool flag)
 
bool GetShowId3Dialog ()
 
void SetShowId3Dialog (bool flag)
 
bool GetNormalizeOnLoad ()
 
void SetNormalizeOnLoad (bool flag)
 
void SetMissingAliasFileDialog (wxDialog *dialog)
 Sets the wxDialog that is being displayed Used by the custom dialog warning constructor and destructor. More...
 
wxDialog * GetMissingAliasFileDialog ()
 returns a pointer to the wxDialog if it is displayed, NULL otherwise. More...
 
bool SaveFromTimerRecording (wxFileName fnFile)
 
bool ExportFromTimerRecording (wxFileName fnFile, int iFormat, int iSubFormat, int iFilterIndex)
 
int GetOpenProjectCount ()
 
bool IsProjectSaved ()
 
bool ProjectHasTracks ()
 
int GetEstimatedRecordingMinsLeftOnDisk (long lCaptureChannels=0)
 
wxString GetHoursMinsString (int iMinutes)
 
CommandFlag GetUpdateFlags (bool checkActive=false)
 
int DoAddLabel (const SelectedRegion &region, bool preserveFocus=false)
 
void OnStop (const CommandContext &context)
 
void OnPause (const CommandContext &context)
 
void OnRecord (const CommandContext &context)
 
void OnRecord2ndChoice (const CommandContext &context)
 
void OnStopSelect (const CommandContext &context)
 
void OnSkipStart (const CommandContext &context)
 
void OnSkipEnd (const CommandContext &context)
 
void OnSeekLeftShort (const CommandContext &context)
 
void OnSeekRightShort (const CommandContext &context)
 
void OnSeekLeftLong (const CommandContext &context)
 
void OnSeekRightLong (const CommandContext &context)
 
bool MakeReadyToPlay (bool loop=false, bool cutpreview=false)
 
void OnPlayStop (const CommandContext &context)
 
bool DoPlayStopSelect (bool click, bool shift)
 
void OnPlayStopSelect (const CommandContext &context)
 
void OnPlayOneSecond (const CommandContext &context)
 
void OnPlayToSelection (const CommandContext &context)
 
void OnPlayBeforeSelectionStart (const CommandContext &context)
 
void OnPlayAfterSelectionStart (const CommandContext &context)
 
void OnPlayBeforeSelectionEnd (const CommandContext &context)
 
void OnPlayAfterSelectionEnd (const CommandContext &context)
 
void OnPlayBeforeAndAfterSelectionStart (const CommandContext &context)
 
void OnPlayBeforeAndAfterSelectionEnd (const CommandContext &context)
 
void OnPlayLooped (const CommandContext &context)
 
void OnPlayCutPreview (const CommandContext &context)
 
void OnTrackPan (const CommandContext &context)
 
void OnTrackPanLeft (const CommandContext &context)
 
void OnTrackPanRight (const CommandContext &context)
 
void OnTrackGain (const CommandContext &context)
 
void OnTrackGainInc (const CommandContext &context)
 
void OnTrackGainDec (const CommandContext &context)
 
void OnTrackMenu (const CommandContext &context)
 
void OnTrackMute (const CommandContext &context)
 
void OnTrackSolo (const CommandContext &context)
 
void OnTrackClose (const CommandContext &context)
 
void OnTrackMoveUp (const CommandContext &context)
 
void OnTrackMoveDown (const CommandContext &context)
 
void OnTrackMoveTop (const CommandContext &context)
 
void OnTrackMoveBottom (const CommandContext &context)
 
void MoveTrack (Track *target, MoveChoice choice)
 Move a track up, down, to top or to bottom. More...
 
void OnInputDevice (const CommandContext &context)
 
void OnOutputDevice (const CommandContext &context)
 
void OnAudioHost (const CommandContext &context)
 
void OnInputChannels (const CommandContext &context)
 
void OnOutputGain (const CommandContext &context)
 
void OnInputGain (const CommandContext &context)
 
void OnOutputGainInc (const CommandContext &context)
 
void OnOutputGainDec (const CommandContext &context)
 
void OnInputGainInc (const CommandContext &context)
 
void OnInputGainDec (const CommandContext &context)
 
void OnPlayAtSpeed (const CommandContext &context)
 
void OnPlayAtSpeedLooped (const CommandContext &context)
 
void OnPlayAtSpeedCutPreview (const CommandContext &context)
 
void OnSetPlaySpeed (const CommandContext &context)
 
void OnPlaySpeedInc (const CommandContext &context)
 
void OnPlaySpeedDec (const CommandContext &context)
 
void OnPrevTrack (bool shift)
 
void OnNextTrack (bool shift)
 
void OnCursorUp (const CommandContext &context)
 
void OnCursorDown (const CommandContext &context)
 
void OnFirstTrack (const CommandContext &context)
 
void OnLastTrack (const CommandContext &context)
 
void OnShiftUp (const CommandContext &context)
 
void OnShiftDown (const CommandContext &context)
 
void OnToggle (const CommandContext &context)
 
void HandleListSelection (Track *t, bool shift, bool ctrl, bool modifyState)
 
void OnCursorLeft (const CommandContext &context)
 
void OnCursorRight (const CommandContext &context)
 
void OnSelExtendLeft (const CommandContext &context)
 
void OnSelExtendRight (const CommandContext &context)
 
void OnSelContractLeft (const CommandContext &context)
 
void OnSelContractRight (const CommandContext &context)
 
void DoClipLeftOrRight (bool right, bool keyUp)
 
void OnClipLeft (const CommandContext &context)
 
void OnClipRight (const CommandContext &context)
 
void OnCursorShortJumpLeft (const CommandContext &context)
 
void OnCursorShortJumpRight (const CommandContext &context)
 
void OnCursorLongJumpLeft (const CommandContext &context)
 
void OnCursorLongJumpRight (const CommandContext &context)
 
void OnSelSetExtendLeft (const CommandContext &context)
 
void OnSelSetExtendRight (const CommandContext &context)
 
void OnSetLeftSelection (const CommandContext &context)
 
void OnSetRightSelection (const CommandContext &context)
 
void OnSelToStart (const CommandContext &context)
 
void OnSelToEnd (const CommandContext &context)
 
void OnMoveToNextLabel (const CommandContext &context)
 
void OnMoveToPrevLabel (const CommandContext &context)
 
void OnMoveToLabel (bool next)
 
void OnZeroCrossing (const CommandContext &context)
 
void OnLockPlayRegion (const CommandContext &context)
 
void OnUnlockPlayRegion (const CommandContext &context)
 
double GetTime (const Track *t)
 
void OnSortTime (const CommandContext &context)
 
void OnSortName (const CommandContext &context)
 
void OnSnapToOff (const CommandContext &context)
 
void OnSnapToNearest (const CommandContext &context)
 
void OnSnapToPrior (const CommandContext &context)
 
void OnFullScreen (const CommandContext &context)
 
void OnMacMinimize (const CommandContext &context)
 
void OnMacMinimizeAll (const CommandContext &context)
 
void OnMacZoom (const CommandContext &context)
 
void OnMacBringAllToFront (const CommandContext &context)
 
void OnNew (const CommandContext &context)
 
void OnOpen (const CommandContext &context)
 
void OnClose (const CommandContext &context)
 
void OnSave (const CommandContext &context)
 
void OnSaveAs (const CommandContext &context)
 
void OnCheckDependencies (const CommandContext &context)
 
void OnExport (const wxString &Format)
 
void OnExportAudio (const CommandContext &context)
 
void OnExportMp3 (const CommandContext &context)
 
void OnExportWav (const CommandContext &context)
 
void OnExportOgg (const CommandContext &context)
 
void OnExportSelection (const CommandContext &context)
 
void OnExportMultiple (const CommandContext &context)
 
void OnExportLabels (const CommandContext &context)
 
void OnExportMIDI (const CommandContext &context)
 
void OnPreferences (const CommandContext &context)
 
void OnPageSetup (const CommandContext &context)
 
void OnPrint (const CommandContext &context)
 
void OnExit (const CommandContext &context)
 
void OnUndo (const CommandContext &context)
 
void OnRedo (const CommandContext &context)
 
void OnCut (const CommandContext &context)
 
void OnSplitCut (const CommandContext &context)
 
void OnCopy (const CommandContext &context)
 
void OnPaste (const CommandContext &context)
 
void OnPasteNewLabel (const CommandContext &context)
 
void OnPasteOver (const CommandContext &context)
 
void OnTrim (const CommandContext &context)
 
void OnDelete (const CommandContext &context)
 
void OnSplitDelete (const CommandContext &context)
 
void OnSilence (const CommandContext &context)
 
void OnSplit (const CommandContext &context)
 
void OnSplitNew (const CommandContext &context)
 
void OnJoin (const CommandContext &context)
 
void OnDisjoin (const CommandContext &context)
 
void OnDuplicate (const CommandContext &context)
 
void OnCutLabels (const CommandContext &context)
 
void OnSplitCutLabels (const CommandContext &context)
 
void OnCopyLabels (const CommandContext &context)
 
void OnDeleteLabels (const CommandContext &context)
 
void OnSplitDeleteLabels (const CommandContext &context)
 
void OnSilenceLabels (const CommandContext &context)
 
void OnSplitLabels (const CommandContext &context)
 
void OnJoinLabels (const CommandContext &context)
 
void OnDisjoinLabels (const CommandContext &context)
 
void OnSelectTimeAndTracks (bool bAllTime, bool bAllTracks)
 
void OnSelectAllTime (const CommandContext &context)
 
void OnSelectAllTracks (const CommandContext &context)
 
void OnSelectAll (const CommandContext &context)
 
void OnSelectSomething (const CommandContext &context)
 
void OnSelectNone (const CommandContext &context)
 
void OnToggleSpectralSelection (const CommandContext &context)
 
void DoNextPeakFrequency (bool up)
 
void OnNextHigherPeakFrequency (const CommandContext &context)
 
void OnNextLowerPeakFrequency (const CommandContext &context)
 
void OnSelectCursorEnd (const CommandContext &context)
 
void OnSelectStartCursor (const CommandContext &context)
 
void OnSelectPrevClipBoundaryToCursor (const CommandContext &context)
 
void OnSelectCursorToNextClipBoundary (const CommandContext &context)
 
void OnSelectClipBoundary (bool next)
 
FoundClip FindNextClip (const WaveTrack *wt, double t0, double t1)
 
FoundClip FindPrevClip (const WaveTrack *wt, double t0, double t1)
 
int FindClips (double t0, double t1, bool next, std::vector< FoundClip > &results)
 
bool ChannelsHaveSameClipBoundaries (const WaveTrack *wt)
 
void OnSelectPrevClip (const CommandContext &context)
 
void OnSelectNextClip (const CommandContext &context)
 
void OnSelectClip (bool next)
 
void OnSelectCursorStoredCursor (const CommandContext &context)
 
void OnSelectSyncLockSel (const CommandContext &context)
 
void OnZoomIn (const CommandContext &context)
 
void OnZoomOut (const CommandContext &context)
 
void OnZoomToggle (const CommandContext &context)
 
void OnZoomNormal (const CommandContext &context)
 
void OnZoomFit (const CommandContext &context)
 
void OnZoomFitV (const CommandContext &context)
 
void DoZoomFitV ()
 
void OnZoomSel (const CommandContext &context)
 
void OnGoSelStart (const CommandContext &context)
 
void OnGoSelEnd (const CommandContext &context)
 
void OnExpandAllTracks (const CommandContext &context)
 
void OnCollapseAllTracks (const CommandContext &context)
 
void OnPanTracks (float PanValue)
 
void OnPanLeft (const CommandContext &context)
 
void OnPanRight (const CommandContext &context)
 
void OnPanCenter (const CommandContext &context)
 
void OnMuteAllTracks (const CommandContext &context)
 
void OnUnMuteAllTracks (const CommandContext &context)
 
void OnShowClipping (const CommandContext &context)
 
void OnShowExtraMenus (const CommandContext &context)
 
void OnHistory (const CommandContext &context)
 
void OnKaraoke (const CommandContext &context)
 
void OnMixerBoard (const CommandContext &context)
 
void OnPlotSpectrum (const CommandContext &context)
 
void OnContrast (const CommandContext &context)
 
void OnShowTransportToolBar (const CommandContext &context)
 
void OnShowDeviceToolBar (const CommandContext &context)
 
void OnShowEditToolBar (const CommandContext &context)
 
void OnShowMeterToolBar (const CommandContext &context)
 
void OnShowRecordMeterToolBar (const CommandContext &context)
 
void OnShowPlayMeterToolBar (const CommandContext &context)
 
void OnShowMixerToolBar (const CommandContext &context)
 
void OnShowSelectionToolBar (const CommandContext &context)
 
void OnShowSpectralSelectionToolBar (const CommandContext &context)
 
void OnShowScrubbingToolBar (const CommandContext &context)
 
void OnShowToolsToolBar (const CommandContext &context)
 
void OnShowTranscriptionToolBar (const CommandContext &context)
 
void OnResetToolBars (const CommandContext &context)
 
void OnSoundActivated (const CommandContext &context)
 
void OnToggleSoundActivated (const CommandContext &context)
 
void OnTogglePinnedHead (const CommandContext &context)
 
void OnTogglePlayRecording (const CommandContext &context)
 
void OnToggleSWPlaythrough (const CommandContext &context)
 
void OnRescanDevices (const CommandContext &context)
 
void OnImport (const CommandContext &context)
 
void OnImportLabels (const CommandContext &context)
 
void OnImportMIDI (const CommandContext &context)
 
void OnImportRaw (const CommandContext &context)
 
void OnEditMetadata (const CommandContext &context)
 
bool DoEditMetadata (const wxString &title, const wxString &shortUndoDescription, bool force)
 
void OnMixAndRender (const CommandContext &context)
 
void OnMixAndRenderToNewTrack (const CommandContext &context)
 
void HandleMixAndRender (bool toNewTrack)
 
void OnSelectionSave (const CommandContext &context)
 
void OnSelectionRestore (const CommandContext &context)
 
void OnCursorPositionStore (const CommandContext &context)
 
void OnCursorTrackStart (const CommandContext &context)
 
void OnCursorTrackEnd (const CommandContext &context)
 
void OnCursorSelStart (const CommandContext &context)
 
void OnCursorSelEnd (const CommandContext &context)
 
FoundClipBoundary FindNextClipBoundary (const WaveTrack *wt, double time)
 
FoundClipBoundary FindPrevClipBoundary (const WaveTrack *wt, double time)
 
double AdjustForFindingStartTimes (const std::vector< const WaveClip * > &clips, double time)
 
double AdjustForFindingEndTimes (const std::vector< const WaveClip * > &clips, double time)
 
int FindClipBoundaries (double time, bool next, std::vector< FoundClipBoundary > &results)
 
void OnCursorNextClipBoundary (const CommandContext &context)
 
void OnCursorPrevClipBoundary (const CommandContext &context)
 
void OnCursorClipBoundary (bool next)
 
void OnAlignNoSync (const CommandContext &context)
 
void OnAlign (const CommandContext &context)
 
void HandleAlign (int index, bool moveSel)
 
void OnNewWaveTrack (const CommandContext &context)
 
void OnNewStereoTrack (const CommandContext &context)
 
void OnNewLabelTrack (const CommandContext &context)
 
void OnNewTimeTrack (const CommandContext &context)
 
void OnTimerRecord (const CommandContext &context)
 
void OnRemoveTracks (const CommandContext &context)
 
void OnMoveSelectionWithTracks (const CommandContext &context)
 
void OnSyncLock (const CommandContext &context)
 
void OnAddLabel (const CommandContext &context)
 
void OnAddLabelPlaying (const CommandContext &context)
 
void DoEditLabels (LabelTrack *lt=nullptr, int index=-1)
 
void OnEditLabels (const CommandContext &context)
 
void OnToggleTypeToCreateLabel (const CommandContext &context)
 
bool DoEffect (const PluginID &ID, int flags)
 
void OnEffect (const CommandContext &context)
 
void OnRepeatLastEffect (const CommandContext &context)
 
void OnApplyChain (const CommandContext &context)
 
void OnEditChains (const CommandContext &context)
 
void OnStereoToMono (const CommandContext &context)
 
void OnManagePluginsMenu (EffectType Type)
 
void OnManageGenerators (const CommandContext &context)
 
void OnManageEffects (const CommandContext &context)
 
void OnManageAnalyzers (const CommandContext &context)
 
void OnAbout (const CommandContext &context)
 
void OnQuickHelp (const CommandContext &context)
 
void OnManual (const CommandContext &context)
 
void OnCheckForUpdates (const CommandContext &context)
 
void MayCheckForUpdates ()
 
void OnShowLog (const CommandContext &context)
 
void OnHelpWelcome (const CommandContext &context)
 
void OnBenchmark (const CommandContext &context)
 
void OnSimulateRecordingErrors (const CommandContext &context)
 
void OnDetectUpstreamDropouts (const CommandContext &context)
 
void OnScreenshot (const CommandContext &context)
 
void OnAudioDeviceInfo (const CommandContext &context)
 
void OnSeparator (const CommandContext &context)
 
void NextOrPrevFrame (bool next)
 
void PrevFrame (const CommandContext &context)
 
void NextFrame (const CommandContext &context)
 
void PrevWindow (const CommandContext &context)
 
void NextWindow (const CommandContext &context)
 
void OnResample (const CommandContext &context)
 
CommandManagerGetCommandManager ()
 
const CommandManagerGetCommandManager () const
 
void RebuildMenuBar ()
 
void RebuildOtherMenus ()
 
void MayStartMonitoring ()
 
void OnMenu (wxCommandEvent &event)
 
void OnUpdateUI (wxUpdateUIEvent &event)
 
void MacShowUndockedToolbars (bool show)
 
void OnActivate (wxActivateEvent &event)
 
void OnMouseEvent (wxMouseEvent &event)
 
void OnIconize (wxIconizeEvent &event)
 
void OnSize (wxSizeEvent &event)
 
void OnShow (wxShowEvent &event)
 
void OnMove (wxMoveEvent &event)
 
void DoScroll ()
 
void OnScroll (wxScrollEvent &event)
 
void OnCloseWindow (wxCloseEvent &event)
 
void OnTimer (wxTimerEvent &event)
 
void OnToolBarUpdate (wxCommandEvent &event)
 
void OnOpenAudioFile (wxCommandEvent &event)
 
void OnODTaskUpdate (wxCommandEvent &event)
 Handles the redrawing necessary for tasks as they partially update in the background. More...
 
void OnODTaskComplete (wxCommandEvent &event)
 
void HandleResize ()
 
void UpdateLayout ()
 
double GetScreenEndTime () const
 
void ZoomInByFactor (double ZoomFactor)
 
void ZoomOutByFactor (double ZoomFactor)
 
int GetProjectNumber ()
 
void UpdateMenus (bool checkActive=true)
 
void UpdatePrefs ()
 
void UpdatePrefsVariables ()
 
void RedrawProject (const bool bForceWaveTracks=false)
 
void RefreshCursor ()
 
void SelectNone ()
 
void SelectAllIfNone ()
 
void StopIfPaused ()
 
void Zoom (double level)
 
void ZoomBy (double multiplier)
 
void Rewind (bool shift)
 
void SkipEnd (bool shift)
 
void EditByLabel (EditFunction action, bool bSyncLockedTracks)
 
void EditClipboardByLabel (EditDestFunction action)
 
bool IsSyncLocked ()
 
void SetSyncLock (bool flag)
 
void DoTrackMute (Track *pTrack, bool exclusive)
 
void DoTrackSolo (Track *pTrack, bool exclusive)
 
void SetTrackGain (WaveTrack *track, LWSlider *slider)
 
void SetTrackPan (WaveTrack *track, LWSlider *slider)
 
void RemoveTrack (Track *toRemove)
 Removes the specified track. Called from HandleClosing. More...
 
void HandleTrackMute (Track *t, const bool exclusive)
 
void HandleTrackSolo (Track *t, const bool alternate)
 
void SetSnapTo (int snap)
 
int GetSnapTo () const
 
void SetSelectionFormat (const wxString &format)
 
const wxString & GetSelectionFormat () const
 
void SetFrequencySelectionFormatName (const wxString &format)
 
const wxString & GetFrequencySelectionFormatName () const
 
void SetBandwidthSelectionFormatName (const wxString &format)
 
const wxString & GetBandwidthSelectionFormatName () const
 
void OnScrollLeft ()
 
void OnScrollRight ()
 
void OnScrollLeftButton (wxScrollEvent &event)
 
void OnScrollRightButton (wxScrollEvent &event)
 
void FinishAutoScroll ()
 
void FixScrollbars ()
 
void SafeDisplayStatusMessage (const wxChar *msg)
 
bool MayScrollBeyondZero () const
 
double ScrollingLowerBoundTime () const
 
double PixelWidthBeforeTime (double scrollto) const
 
void SetHorizontalThumb (double scrollto)
 
wxSize GetTPTracksUsableArea ()
 
void RefreshTPTrack (Track *pTrk, bool refreshbacking=true)
 
void TP_DisplaySelection () override
 
void TP_DisplayStatusMessage (const wxString &msg) override
 
ToolsToolBarTP_GetToolsToolBar () override
 
void TP_PushState (const wxString &longDesc, const wxString &shortDesc, UndoPush flags) override
 
void TP_ModifyState (bool bWantsAutoSave) override
 
void TP_RedrawScrollbars () override
 
void TP_ScrollLeft () override
 
void TP_ScrollRight () override
 
void TP_ScrollWindow (double scrollto) override
 
bool TP_ScrollUpDown (int delta) override
 
void TP_HandleResize () override
 
ControlToolBarGetControlToolBar ()
 
DeviceToolBarGetDeviceToolBar ()
 
EditToolBarGetEditToolBar ()
 
MixerToolBarGetMixerToolBar ()
 
ScrubbingToolBarGetScrubbingToolBar ()
 
SelectionBarGetSelectionBar ()
 
SpectralSelectionBarGetSpectralSelectionBar ()
 
ToolsToolBarGetToolsToolBar ()
 
const ToolsToolBarGetToolsToolBar () const
 
TranscriptionToolBarGetTranscriptionToolBar ()
 
MeterPanelGetPlaybackMeter ()
 
void SetPlaybackMeter (MeterPanel *playback)
 
MeterPanelGetCaptureMeter ()
 
void SetCaptureMeter (MeterPanel *capture)
 
LyricsWindowGetLyricsWindow ()
 
MixerBoardGetMixerBoard ()
 
wxStatusBar * GetStatusBar ()
 
double AS_GetRate () override
 
void AS_SetRate (double rate) override
 
int AS_GetSnapTo () override
 
void AS_SetSnapTo (int snap) override
 
const wxString & AS_GetSelectionFormat () override
 
void AS_SetSelectionFormat (const wxString &format) override
 
void AS_ModifySelection (double &start, double &end, bool done) override
 
double SSBL_GetRate () const override
 
const wxString & SSBL_GetFrequencySelectionFormatName () override
 
void SSBL_SetFrequencySelectionFormatName (const wxString &formatName) override
 
const wxString & SSBL_GetBandwidthSelectionFormatName () override
 
void SSBL_SetBandwidthSelectionFormatName (const wxString &formatName) override
 
void SSBL_ModifySpectralSelection (double &bottom, double &top, bool done) override
 
void SetStateTo (unsigned int n)
 
bool HandleXMLTag (const wxChar *tag, const wxChar **attrs) override
 
XMLTagHandlerHandleXMLChild (const wxChar *tag) override
 
void WriteXML (XMLWriter &xmlFile, bool bWantSaveCompressed)
 
void WriteXMLHeader (XMLWriter &xmlFile) const
 
void OnAudioIORate (int rate) override
 
void OnAudioIOStartRecording () override
 
void OnAudioIOStopRecording () override
 
void OnAudioIONewBlockFiles (const AutoSaveFile &blockFileLog) override
 
bool ReportIfActionNotAllowed (const wxString &Name, CommandFlag &flags, CommandFlag flagsRqd, CommandFlag mask)
 
bool TryToMakeActionAllowed (CommandFlag &flags, CommandFlag flagsRqd, CommandFlag mask)
 
bool UndoAvailable ()
 
bool RedoAvailable ()
 
void PushState (const wxString &desc, const wxString &shortDesc)
 
void PushState (const wxString &desc, const wxString &shortDesc, UndoPush flags)
 
void RollbackState ()
 
void ModifyState (bool bWantsAutoSave)
 
void RecreateMixerBoard ()
 
bool IsSoloSimple () const
 
bool IsSoloNone () const
 
ToolManagerGetToolManager ()
 
void SetNormalizedWindowState (wxRect pSizeAndLocation)
 
wxRect GetNormalizedWindowState () const
 
bool IsTimerRecordCancelled ()
 
void ResetTimerRecordFlag ()
 
ScrubberGetScrubber ()
 
const ScrubberGetScrubber () const
 
PlaybackScrollerGetPlaybackScroller ()
 
std::shared_ptr< BackgroundCellGetBackgroundCell () const
 
- Public Member Functions inherited from TrackPanelListener
 TrackPanelListener ()
 
virtual ~TrackPanelListener ()
 
- Public Member Functions inherited from SelectionBarListener
 SelectionBarListener ()
 
virtual ~SelectionBarListener ()
 
- Public Member Functions inherited from SpectralSelectionBarListener
 SpectralSelectionBarListener ()
 
virtual ~SpectralSelectionBarListener ()
 
- Public Member Functions inherited from XMLTagHandler
 XMLTagHandler ()
 
virtual ~XMLTagHandler ()
 
virtual void HandleXMLEndTag (const wxChar *WXUNUSED(tag))
 
virtual void HandleXMLContent (const wxString &WXUNUSED(content))
 
bool ReadXMLTag (const char *tag, const char **attrs)
 
void ReadXMLEndTag (const char *tag)
 
void ReadXMLContent (const char *s, int len)
 
XMLTagHandlerReadXMLChild (const char *tag)
 
- Public Member Functions inherited from AudioIOListener
 AudioIOListener ()
 
virtual ~AudioIOListener ()
 

Static Public Member Functions

static wxArrayString ShowOpenDialog (const wxString &extraformat=wxEmptyString, const wxString &extrafilter=wxEmptyString)
 Show an open dialogue for opening audio files, and possibly other sorts of files. More...
 
static bool IsAlreadyOpen (const wxString &projPathName)
 
static void OpenFiles (AudacityProject *proj)
 
static AudacityProjectOpenProject (AudacityProject *pProject, const wxString &fileNameArg, bool addtohistory=true)
 
static double OnClipMove (ViewInfo &viewInfo, Track *track, TrackList &trackList, bool syncLocked, bool right)
 
static void DoMacMinimize (AudacityProject *project)
 
static AudacityProjectDoImportMIDI (AudacityProject *pProject, const wxString &fileName)
 
static wxString ClipBoundaryMessage (const std::vector< FoundClipBoundary > &results)
 
static void RebuildAllMenuBars ()
 
static bool HasKeyboardCapture (const wxWindow *handler)
 
static wxWindow * GetKeyboardCaptureHandler ()
 
static void CaptureKeyboard (wxWindow *handler)
 
static void ReleaseKeyboard (wxWindow *handler)
 
static TrackListGetClipboardTracks ()
 
static void ClearClipboard ()
 
static void DeleteClipboard ()
 
static int CountUnnamed ()
 
static void RefreshAllTitles (bool bShowProjectNumbers)
 
static ODLockAllProjectDeleteMutex ()
 Prevents DELETE from external thread - for e.g. use of GetActiveProject. More...
 

Public Attributes

double mLastF0
 
double mLastF1
 
size_t mAlignLabelsCount
 
PlayMode mLastPlayMode { PlayMode::normalPlay }
 
ViewInfo mViewInfo
 
bool mShowSplashScreen
 
wxString mHelpPref
 
wxString mSoloPref
 
bool mbBusyImporting { false }
 
std::unique_ptr< PlaybackScrollermPlaybackScroller
 

Private Member Functions

void EnqueueODTasks ()
 
bool DoSave (bool fromSaveAs, bool bWantSaveCompressed)
 
void CreateMenusAndCommands ()
 
void PopulateEffectsMenu (CommandManager *c, EffectType type, CommandFlag batchflags, CommandFlag realflags)
 
void AddEffectMenuItems (CommandManager *c, std::vector< const PluginDescriptor * > &plugs, CommandFlag batchflags, CommandFlag realflags, bool isDefault)
 
void AddEffectMenuItemGroup (CommandManager *c, const wxArrayString &names, const PluginIDList &plugs, const std::vector< CommandFlag > &flags, bool isDefault)
 
void CreateRecentFilesMenu (CommandManager *c)
 
void ModifyUndoMenuItems ()
 
void ModifyToolbarMenus ()
 
void ModifyAllProjectToolbarMenus ()
 
CommandFlag GetFocusedFrame ()
 
double NearestZeroCrossing (double t0)
 
void SetTool (int tool)
 Called by handlers that set tools. More...
 
void OnSelectTool (const CommandContext &context)
 Handler to set the select tool active. More...
 
void OnZoomTool (const CommandContext &context)
 Handler to set the Zoom tool active. More...
 
void OnEnvelopeTool (const CommandContext &context)
 Handler to set the Envelope tool active. More...
 
void OnTimeShiftTool (const CommandContext &context)
 Handler to set the Time shift tool active. More...
 
void OnDrawTool (const CommandContext &context)
 
void OnMultiTool (const CommandContext &context)
 
void OnNextTool (const CommandContext &context)
 
void OnPrevTool (const CommandContext &context)
 
bool HandlePasteText ()
 
bool HandlePasteNothingSelected ()
 
int CountSelectedWaveTracks ()
 
int CountSelectedTracks ()
 
void OnCursorLeft (bool shift, bool ctrl, bool keyup=false)
 
void OnCursorRight (bool shift, bool ctrl, bool keyup=false)
 
void OnCursorMove (bool forward, bool jump, bool longjump)
 
void OnBoundaryMove (bool left, bool boundaryContract)
 
void SeekLeftOrRight (bool left, bool shift, bool ctrl, bool keyup, int snapToTime, bool mayAccelerateQuiet, bool mayAccelerateAudio, double quietSeekStepPositive, bool quietStepIsPixels, double audioSeekStepPositive, bool audioStepIsPixels)
 
double GridMove (double t, int minPix)
 
bool SnapSelection ()
 
void OnCapture (wxCommandEvent &evt)
 
void InitialState ()
 
void PopState (const UndoState &state)
 
void UpdateLyrics ()
 
void UpdateMixerBoard ()
 
void GetRegionsByLabel (Regions &regions)
 
void AutoSave ()
 
void DeleteCurrentAutoSaveFile ()
 
double GetZoomOfToFit ()
 
double GetZoomOfSelection ()
 
double GetZoomOfPreset (int preset)
 
double GetZoomOfPref (const wxString &PresetPrefName, int defaultPreset)
 
void SortTracks (int flags)
 

Static Private Member Functions

static void FinishCopy (const Track *n, Track *dest)
 
static void FinishCopy (const Track *n, Track::Holder &&dest, TrackList &list)
 

Private Attributes

SelectedRegion mRegionSave {}
 
bool mCursorPositionHasBeenStored {false}
 
double mCursorPositionStored
 
wxString mFileName
 
bool mbLoadedFromAup
 
std::shared_ptr< DirManagermDirManager
 
int mProjectNo
 
double mRate
 
sampleFormat mDefaultFormat
 
wxMenu * mRecentFilesMenu
 
std::shared_ptr< TagsmTags
 
std::shared_ptr< TrackListmTracks
 
int mSnapTo
 
wxString mSelectionFormat
 
wxString mFrequencySelectionFormatName
 
wxString mBandwidthSelectionFormatName
 
std::shared_ptr< TrackListmLastSavedTracks
 
std::unique_ptr< UndoManagermUndoManager
 
bool mDirty { false }
 
CommandManager mCommandManager
 
CommandFlag mLastFlags
 
std::unique_ptr< wxTimer > mTimer
 
long mLastStatusUpdateTime
 
wxStatusBar * mStatusBar
 
AdornedRulerPanelmRuler {}
 
wxPanel * mTopPanel {}
 
TrackPanelmTrackPanel {}
 
SelectionState mSelectionState {}
 
bool mCircularTrackNavigation {}
 
std::unique_ptr< TrackFactorymTrackFactory {}
 
wxPanel * mMainPanel
 
wxScrollBar * mHsbar
 
wxScrollBar * mVsbar
 
bool mAutoScrolling { false }
 
bool mActive { true }
 
bool mIconized
 
HistoryWindowmHistoryWindow {}
 
LyricsWindowmLyricsWindow {}
 
MixerBoardFramemMixerBoardFrame {}
 
MixerBoardmMixerBoard {}
 
Destroy_ptr< FreqWindowmFreqWindow
 
Destroy_ptr< ContrastDialogmContrastDialog
 
wxDialog * mAliasMissingWarningDialog {}
 
bool mShownOnce { false }
 
MeterPanelmPlaybackMeter {}
 
MeterPanelmCaptureMeter {}
 
std::unique_ptr< ToolManagermToolManager
 
int mAudioIOToken { -1 }
 
bool mIsDeleting { false }
 
bool mTracksFitVerticallyZoomed { false }
 
bool mNormalizeOnLoad
 
bool mShowId3Dialog { true }
 
bool mEmptyCanBeDirty
 
int mWhatIfNoSelection
 
bool mStopIfWasPaused
 
bool mIsSyncLocked
 
bool mLockPlayRegion
 
std::unique_ptr
< ImportXMLTagHandler
mImportXMLTagHandler
 
wxString mAutoSaveFileName
 
bool mAutoSaving { false }
 
bool mIsRecovered { false }
 
wxString mRecoveryAutoSaveDataDir
 
std::unique_ptr
< RecordingRecoveryHandler
mRecordingRecoveryHandler
 
bool mImportedDependencies { false }
 
wxArrayString mStrOtherNamesArray
 
PluginID mLastEffect {}
 
wxRect mNormalizedWindowState
 
bool mTimerRecordCanceled { false }
 
bool mMenuClose { false }
 
bool mbInitializingScrollbar { false }
 
bool mIsCapturing { false }
 
wxWindow * mKeyboardCaptureHandler {}
 
double mSeekShort
 
double mSeekLong
 
wxLongLong mLastSelectionAdjustment
 
bool mIsBeingDeleted { false }
 
std::unique_ptr< OverlaymIndicatorOverlay
 
std::unique_ptr< OverlaymCursorOverlay
 
std::shared_ptr< BackgroundCellmBackgroundCell
 
std::unique_ptr< OverlaymScrubOverlay
 
std::unique_ptr< ScrubbermScrubber
 

Static Private Attributes

static int mProjectCounter =0
 
static std::shared_ptr< TrackListmsClipboard { TrackList::Create() }
 
static AudacityProjectmsClipProject = NULL
 
static double msClipT0 = 0.0
 
static double msClipT1 = 0.0
 

Friends

class CommandManager
 

Detailed Description

AudacityProject provides the main window, with tools and tracks contained within it.

In Audacity, the main window you work in is called a project. AudacityProjects can contain an arbitrary number of tracks of many different types, but if a project contains just one or two tracks then it can be saved in standard formats like WAV or AIFF. This window is the one that contains the menu bar (except on the Mac).

Attention
The menu functions for AudacityProject, those for creating the menu bars and acting on clicks, are found in file Menus.cpp

Definition at line 158 of file Project.h.

Member Typedef Documentation

typedef std::unique_ptr<Track>(WaveTrack::* AudacityProject::EditDestFunction)(double, double)

Definition at line 395 of file Project.h.

typedef void(WaveTrack::* AudacityProject::EditFunction)(double, double)

Definition at line 394 of file Project.h.

Member Enumeration Documentation

Enumerator
OnMoveUpID 
OnMoveDownID 
OnMoveTopID 
OnMoveBottomID 

Definition at line 116 of file Project.h.

Constructor & Destructor Documentation

AudacityProject::AudacityProject ( wxWindow *  parent,
wxWindowID  id,
const wxPoint &  pos,
const wxSize &  size 
)

Definition at line 912 of file Project.cpp.

References _(), AUDACITY_VERSION_STRING, AudacityProjectTimerID, ThemeBase::Bitmap(), ThemeBase::Colour(), TrackList::Create(), CreateMenusAndCommands(), TrackPanel::FactoryFunction, RefreshCode::FixScrollbars, AdornedRulerPanel::GetRulerHeight(), gPrefs, mainStatusBarField, mLastF0, mLastF1, OnCapture(), ViewInfo::OnTimer(), safenew, AudacityApp::SetMissingAliasedFileWarningShouldShow(), theTheme, TrackPanelID, SelectedRegion::UndefinedFrequency, and wxGetApp().

915  : wxFrame(parent, id, _TS("Audacity"), pos, size),
916  mRate((double) gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"), AudioIO::GetOptimalSupportedSampleRate())),
917  mDefaultFormat((sampleFormat) gPrefs->
918  Read(wxT("/SamplingRate/DefaultProjectSampleFormat"), floatSample)),
919  mSnapTo(gPrefs->Read(wxT("/SnapTo"), SNAP_OFF)),
920  mSelectionFormat(gPrefs->Read(wxT("/SelectionFormat"), wxT(""))),
921  mFrequencySelectionFormatName(gPrefs->Read(wxT("/FrequencySelectionFormatName"), wxT(""))),
922  mBandwidthSelectionFormatName(gPrefs->Read(wxT("/BandwidthSelectionFormatName"), wxT(""))),
923  mUndoManager(std::make_unique<UndoManager>()),
924  mViewInfo(0.0, 1.0, ZoomInfo::GetDefaultZoom()),
925  mbLoadedFromAup( false )
926 {
928 
929 #ifdef EXPERIMENTAL_DA2
930  SetBackgroundColour(theTheme.Colour( clrMedium ));
931 #endif
932  // Note that the first field of the status bar is a dummy, and it's width is set
933  // to zero latter in the code. This field is needed for wxWidgets 2.8.12 because
934  // if you move to the menu bar, the first field of the menu bar is cleared, which
935  // is undesirable behaviour.
936  // In addition, the help strings of menu items are by default sent to the first
937  // field. Currently there are no such help strings, but it they were introduced, then
938  // there would need to be an event handler to send them to the appropriate field.
939  mStatusBar = CreateStatusBar(4);
940  mProjectNo = mProjectCounter++; // Bug 322
941 
943 
944  // MM: DirManager is created dynamically, freed on demand via ref-counting
945  // MM: We don't need to Ref() here because it start with refcount=1
946  mDirManager = std::make_shared<DirManager>();
947 
948  mLastSavedTracks.reset();
949 
950  //
951  // Initialize view info (shared with TrackPanel)
952  //
953 
954  UpdatePrefs();
955 
956  mLockPlayRegion = false;
957 
958  // Make sure valgrind sees mIsSyncLocked is initialized, even
959  // though we're about to set it from prefs.
960  mIsSyncLocked = false;
961  gPrefs->Read(wxT("/GUI/SyncLockTracks"), &mIsSyncLocked, false);
962 
963  // LLL: Read this!!!
964  //
965  // Until the time (and cpu) required to refresh the track panel is
966  // reduced, leave the following window creations in the order specified.
967  // This will place the refresh of the track panel last, allowing all
968  // the others to get done quickly.
969  //
970  // Near as I can tell, this is only a problem under Windows.
971  //
972 
973 
974  // PRL: this panel groups the top tool dock and the ruler into one
975  // tab cycle.
976  // Must create it with non-default width equal to the main window width,
977  // or else the device toolbar doesn't make initial widths of the choice
978  // controls correct.
980  this, wxID_ANY, wxDefaultPosition,
981  wxSize{ this->GetSize().GetWidth(), -1 }
982  };
983  mTopPanel->SetName( "Top Panel" );// Not localised
984  mTopPanel->SetAutoLayout(true);
985 #ifdef EXPERIMENTAL_DA2
986  mTopPanel->SetBackgroundColour(theTheme.Colour( clrMedium ));
987 #endif
988 
989  //
990  // Create the ToolDock
991  //
992  mToolManager = std::make_unique<ToolManager>( this, mTopPanel );
993  GetSelectionBar()->SetListener(this);
994 #ifdef EXPERIMENTAL_SPECTRAL_EDITING
996 #endif
997  mToolManager->LayoutToolBars();
998 
999  //
1000  // Create the horizontal ruler
1001  //
1003  wxID_ANY,
1004  wxDefaultPosition,
1005  wxSize( -1, AdornedRulerPanel::GetRulerHeight(false) ),
1006  &mViewInfo );
1007 
1008  //
1009  // Create the TrackPanel and the scrollbars
1010  //
1011  wxWindow * pPage;
1012 
1013 #ifdef EXPERIMENTAL_NOTEBOOK
1014  // We are using a notebook (tabbed panel), so we create the notebook and add pages.
1015  GuiFactory Factory;
1016  wxNotebook * pNotebook;
1017  mMainPanel = Factory.AddPanel(
1018  this, wxPoint( left, top ), wxSize( width, height ) );
1019  pNotebook = Factory.AddNotebook( mMainPanel );
1020  /* i18n-hint: This is an experimental feature where the main panel in
1021  Audacity is put on a notebook tab, and this is the name on that tab.
1022  Other tabs in that notebook may have instruments, patch panels etc.*/
1023  pPage = Factory.AddPage( pNotebook, _("Main Mix"));
1024 #else
1025  // Not using a notebook, so we place the track panel inside another panel,
1026  // this keeps the notebook code and normal code consistant and also
1027  // paves the way for adding additional windows inside the track panel.
1028  mMainPanel = safenew wxPanelWrapper(this, -1,
1029  wxDefaultPosition,
1030  wxDefaultSize,
1031  wxNO_BORDER);
1032  mMainPanel->SetSizer( safenew wxBoxSizer(wxVERTICAL) );
1033  mMainPanel->SetName("Main Panel");// Not localised.
1034  pPage = mMainPanel;
1035  // Set the colour here to the track panel background to avoid
1036  // flicker when Audacity starts up.
1037  // However, that leads to areas next to the horizontal scroller
1038  // being painted in background colour and not scroller background
1039  // colour, so suppress this for now.
1040  //pPage->SetBackgroundColour( theTheme.Colour( clrDark ));
1041 #endif
1042 
1043 #ifdef EXPERIMENTAL_DA2
1044  pPage->SetBackgroundColour(theTheme.Colour( clrMedium ));
1045 #endif
1046 
1047  {
1048  auto ubs = std::make_unique<wxBoxSizer>(wxVERTICAL);
1049  ubs->Add(mToolManager->GetTopDock(), 0, wxEXPAND | wxALIGN_TOP);
1050  ubs->Add(mRuler, 0, wxEXPAND);
1051  mTopPanel->SetSizer(ubs.release());
1052  }
1053 
1054  wxBoxSizer *bs;
1055  {
1056  auto ubs = std::make_unique<wxBoxSizer>(wxVERTICAL);
1057  bs = ubs.get();
1058  bs->Add(mTopPanel, 0, wxEXPAND | wxALIGN_TOP);
1059  bs->Add(pPage, 1, wxEXPAND);
1060  bs->Add(mToolManager->GetBotDock(), 0, wxEXPAND);
1061  SetAutoLayout(true);
1062  SetSizer(ubs.release());
1063  }
1064  bs->Layout();
1065 
1066  // The right hand side translates to NEW TrackPanel(...) in normal
1067  // Audacity without additional DLLs.
1069  TrackPanelID,
1070  wxDefaultPosition,
1071  wxDefaultSize,
1072  mTracks,
1073  &mViewInfo,
1074  this,
1075  mRuler);
1077 
1078  mIndicatorOverlay = std::make_unique<PlayIndicatorOverlay>(this);
1079 
1080  mCursorOverlay = std::make_unique<EditCursorOverlay>(this);
1081 
1082  mBackgroundCell = std::make_shared<BackgroundCell>(this);
1083 
1084 #ifdef EXPERIMENTAL_SCRUBBING_BASIC
1085  mScrubOverlay = std::make_unique<ScrubbingOverlay>(this);
1086  mScrubber = std::make_unique<Scrubber>(this);
1087 #endif
1088 
1089  // More order dependencies here...
1090  // This must follow construction of *mIndicatorOverlay, because it must
1091  // attach its timer event handler later (so that its handler is invoked
1092  // earlier)
1093  mPlaybackScroller = std::make_unique<PlaybackScroller>(this);
1094 
1095  // This must follow construction of *mPlaybackScroller,
1096  // because it must
1097  // attach its timer event handler later (so that its handler is invoked
1098  // earlier)
1099  this->Bind(EVT_TRACK_PANEL_TIMER,
1101  &mViewInfo);
1102 
1103  // Add the overlays, in the sequence in which they will be painted
1105  mTrackPanel->AddOverlay(mCursorOverlay.get());
1106 #ifdef EXPERIMENTAL_SCRUBBING_BASIC
1107  mTrackPanel->AddOverlay(mScrubOverlay.get());
1108 #endif
1109 
1111 
1112  mTrackPanel->SetBackgroundCell(mBackgroundCell);
1113 
1114  // LLL: When Audacity starts or becomes active after returning from
1115  // another application, the first window that can accept focus
1116  // will be given the focus even if we try to SetFocus(). By
1117  // creating the scrollbars after the TrackPanel, we resolve
1118  // several focus problems.
1119  mHsbar = safenew ScrollBar(pPage, HSBarID, wxSB_HORIZONTAL);
1120  mVsbar = safenew ScrollBar(pPage, VSBarID, wxSB_VERTICAL);
1121  mHsbar->SetName(_("Horizontal Scrollbar"));
1122  mVsbar->SetName(_("Vertical Scrollbar"));
1123 
1124  // LLL: When Audacity starts or becomes active after returning from
1125  // another application, the first window that can accept focus
1126  // will be given the focus even if we try to SetFocus(). By
1127  // making the TrackPanel that first window, we resolve several
1128  // keyboard focus problems.
1129  pPage->MoveBeforeInTabOrder(mTopPanel);
1130 
1131  bs = (wxBoxSizer *)pPage->GetSizer();
1132 
1133  {
1134  // Top horizontal grouping
1135  auto hs = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
1136 
1137  // Track panel
1138  hs->Add(mTrackPanel, 1, wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP);
1139 
1140  {
1141  // Vertical grouping
1142  auto vs = std::make_unique<wxBoxSizer>(wxVERTICAL);
1143 
1144  // Vertical scroll bar
1145  vs->Add(mVsbar, 1, wxEXPAND | wxALIGN_TOP);
1146  hs->Add(vs.release(), 0, wxEXPAND | wxALIGN_TOP);
1147  }
1148 
1149  bs->Add(hs.release(), 1, wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP);
1150  }
1151 
1152  {
1153  // Bottom horizontal grouping
1154  auto hs = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
1155 
1156  // Bottom scrollbar
1157  hs->Add(mTrackPanel->GetLeftOffset() - 1, 0);
1158  hs->Add(mHsbar, 1, wxALIGN_BOTTOM);
1159  hs->Add(mVsbar->GetSize().GetWidth(), 0);
1160  bs->Add(hs.release(), 0, wxEXPAND | wxALIGN_LEFT);
1161  }
1162 
1163  // Lay it out
1164  pPage->SetAutoLayout(true);
1165  pPage->Layout();
1166 
1167 #ifdef EXPERIMENTAL_NOTEBOOK
1168  AddPages(this, Factory, pNotebook);
1169 #endif
1170 
1171  mMainPanel->Layout();
1172 
1173  wxASSERT( mTrackPanel->GetProject()==this);
1174 
1175  // MM: Give track panel the focus to ensure keyboard commands work
1176  mTrackPanel->SetFocus();
1177 
1178  // Create tags object
1179  mTags = std::make_shared<Tags>();
1180 
1181  InitialState();
1182  FixScrollbars();
1183  mRuler->SetLeftOffset(mTrackPanel->GetLeftOffset()); // bevel on AdornedRuler
1184 
1185  //
1186  // Set the Icon
1187  //
1188 
1189  // loads either the XPM or the windows resource, depending on the platform
1190 #if !defined(__WXMAC__) && !defined(__WXX11__)
1191  {
1192 #if defined(__WXMSW__)
1193  wxIcon ic{ wxICON(AudacityLogo) };
1194 #elif defined(__WXGTK__)
1195  wxIcon ic{wxICON(AudacityLogoAlpha)};
1196 #else
1197  wxIcon ic{};
1198  ic.CopyFromBitmap(theTheme.Bitmap(bmpAudacityLogo48x48));
1199 #endif
1200  SetIcon(ic);
1201  }
1202 #endif
1203  mIconized = false;
1204 
1205  mTrackFactory.reset(safenew TrackFactory{ mDirManager, &mViewInfo });
1206 
1207  int widths[] = {0, GetControlToolBar()->WidthForStatusBar(mStatusBar), -1, 150};
1208  mStatusBar->SetStatusWidths(4, widths);
1209  wxString msg = wxString::Format(_("Welcome to Audacity version %s"),
1211  mStatusBar->SetStatusText(msg, mainStatusBarField);
1213  mLastStatusUpdateTime = ::wxGetUTCTime();
1214 
1215  mTimer = std::make_unique<wxTimer>(this, AudacityProjectTimerID);
1216  mTimer->Start(200);
1217 
1218 #if wxUSE_DRAG_AND_DROP
1219  // We can import now, so become a drag target
1220 // SetDropTarget(safenew AudacityDropTarget(this));
1221 // mTrackPanel->SetDropTarget(safenew AudacityDropTarget(this));
1222 
1223  // SetDropTarget takes ownership
1224  mTrackPanel->SetDropTarget(safenew DropTarget(this));
1225 #endif
1226 
1227  wxTheApp->Bind(EVT_AUDIOIO_CAPTURE,
1229  this);
1230 
1231  //Initialize the last selection adjustment time.
1232  mLastSelectionAdjustment = ::wxGetLocalTimeMillis();
1233 #ifdef EXPERIMENTAL_DA2
1234  ClearBackground();// For wxGTK.
1235 #endif
1237 }
std::unique_ptr< Overlay > mIndicatorOverlay
Definition: Project.h:777
bool mbLoadedFromAup
Definition: Project.h:598
#define AUDACITY_VERSION_STRING
Definition: Audacity.h:81
AUDACITY_DLL_API Theme theTheme
Definition: Theme.cpp:209
void InitialState()
Definition: Project.cpp:4469
std::unique_ptr< PlaybackScroller > mPlaybackScroller
Definition: Project.h:813
double mLastF1
Definition: Project.h:301
bool mIsSyncLocked
Definition: Project.h:719
bool mIconized
Definition: Project.h:666
std::unique_ptr< wxTimer > mTimer
Definition: Project.h:650
wxString mBandwidthSelectionFormatName
Definition: Project.h:622
long mLastStatusUpdateTime
Definition: Project.h:651
void SetMissingAliasedFileWarningShouldShow(bool b)
Changes the behavior of missing aliased blockfiles warnings.
wxScrollBar * mVsbar
Definition: Project.h:663
void SetListener(SpectralSelectionBarListener *l)
bool mLockPlayRegion
Definition: Project.h:721
void UpdatePrefs()
Definition: TrackPanel.cpp:394
std::unique_ptr< Scrubber > mScrubber
Definition: Project.h:783
#define _TS(s)
Definition: Internat.h:27
sampleFormat mDefaultFormat
Definition: Project.h:605
std::shared_ptr< DirManager > mDirManager
Definition: Project.h:599
int GetRulerHeight()
Definition: Ruler.h:331
void OnCapture(wxCommandEvent &evt)
Definition: Project.cpp:1387
std::unique_ptr< TrackFactory > mTrackFactory
Definition: Project.h:660
static int GetOptimalSupportedSampleRate()
Get a supported sample rate which can be used a an optimal default.
Definition: AudioIO.cpp:3150
SpectralSelectionBar * GetSpectralSelectionBar()
Definition: Project.cpp:4857
std::unique_ptr< Overlay > mCursorOverlay
Definition: Project.h:777
wxString mFrequencySelectionFormatName
Definition: Project.h:621
#define safenew
Definition: Audacity.h:223
DropTarget, derived from wxFileDropTarget gives drag and drop functionality for audio files...
Definition: Snap.h:51
static std::shared_ptr< TrackList > Create()
Definition: Track.cpp:788
Used to create a WaveTrack, or a LabelTrack.. Implementation of the functions of this class are dispe...
Definition: Track.h:850
std::shared_ptr< Tags > mTags
Definition: Project.h:614
wxBitmap & Bitmap(int iIndex)
Definition: Theme.cpp:1227
void UpdateStatusBar(AudacityProject *pProject)
void FixScrollbars()
Definition: Project.cpp:1863
wxFileConfig * gPrefs
Definition: Prefs.cpp:72
std::shared_ptr< TrackList > mLastSavedTracks
Definition: Project.h:624
std::shared_ptr< BackgroundCell > mBackgroundCell
Definition: Project.h:779
double mRate
Definition: Project.h:604
AdornedRulerPanel * mRuler
Definition: Project.h:655
void SetListener(SelectionBarListener *l)
std::unique_ptr< UndoManager > mUndoManager
Definition: Project.h:639
ViewInfo mViewInfo
Definition: Project.h:542
const int AudacityProjectTimerID
Definition: Project.h:49
std::unique_ptr< Overlay > mScrubOverlay
Definition: Project.h:782
void SetBackgroundCell(const std::shared_ptr< TrackPanelCell > &pCell)
void UpdatePrefs()
Definition: Project.cpp:1313
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
void AddOverlay(Overlay *pOverlay)
void OnTimer(wxCommandEvent &event)
Definition: ViewInfo.cpp:203
int WidthForStatusBar(wxStatusBar *const)
wxStatusBar * mStatusBar
Definition: Project.h:653
ControlToolBar * GetControlToolBar()
Definition: Project.cpp:4803
wxScrollBar * mHsbar
Definition: Project.h:662
std::unique_ptr< ToolManager > mToolManager
Definition: Project.h:685
wxPanel * mTopPanel
Definition: Project.h:656
Works with HistoryWindow to provide the Undo functionality.
Definition: UndoManager.h:93
static int mProjectCounter
Definition: Project.h:601
wxString mSelectionFormat
Definition: Project.h:620
AudacityProject * GetProject() const
Definition: TrackPanel.cpp:433
SelectionBar * GetSelectionBar()
Definition: Project.cpp:4848
This is an Audacity Specific ruler panel which additionally has border, selection markers...
Definition: Ruler.h:314
wxColour & Colour(int iIndex)
Definition: Theme.cpp:1208
int GetLeftOffset() const
Definition: TrackPanel.h:287
void CreateMenusAndCommands()
Definition: Menus.cpp:294
AudacityApp & wxGetApp()
static TrackPanel *(* FactoryFunction)(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, const std::shared_ptr< TrackList > &tracks, ViewInfo *viewInfo, TrackPanelListener *listener, AdornedRulerPanel *ruler)
Definition: TrackPanel.h:395
double mLastF0
Definition: Project.h:300
static const int UndefinedFrequency
std::shared_ptr< TrackList > mTracks
Definition: Project.h:617
wxLongLong mLastSelectionAdjustment
Definition: Project.h:767
TrackPanel * mTrackPanel
Definition: Project.h:657
void SetLeftOffset(int offset)
Definition: Ruler.cpp:3224
wxPanel * mMainPanel
Definition: Project.h:661
AudacityProject::~AudacityProject ( )
virtual

Definition at line 1239 of file Project.cpp.

References AudacityApp::GetRecentFiles(), mCursorOverlay, mIndicatorOverlay, mRecentFilesMenu, mScrubOverlay, mTrackPanel, FileHistory::RemoveMenu(), OverlayPanel::RemoveOverlay(), and wxGetApp().

1240 {
1241  // Tool manager gives us capture sometimes
1242  if(HasCapture())
1243  ReleaseMouse();
1244 
1245  if (wxGetApp().GetRecentFiles())
1246  {
1248  }
1249 
1250  if(mTrackPanel) {
1251 #ifdef EXPERIMENTAL_SCRUBBING_BASIC
1253 #endif
1256  }
1257 }
std::unique_ptr< Overlay > mIndicatorOverlay
Definition: Project.h:777
wxMenu * mRecentFilesMenu
Definition: Project.h:608
bool RemoveOverlay(Overlay *pOverlay)
std::unique_ptr< Overlay > mCursorOverlay
Definition: Project.h:777
std::unique_ptr< Overlay > mScrubOverlay
Definition: Project.h:782
void RemoveMenu(wxMenu *menu)
FileHistory * GetRecentFiles()
Definition: AudacityApp.h:154
AudacityApp & wxGetApp()
TrackPanel * mTrackPanel
Definition: Project.h:657

Member Function Documentation

void AudacityProject::AddEffectMenuItemGroup ( CommandManager c,
const wxArrayString &  names,
const PluginIDList plugs,
const std::vector< CommandFlag > &  flags,
bool  isDefault 
)
private

Definition at line 1824 of file Menus.cpp.

References _(), CommandManager::AddItem(), CommandManager::BeginSubMenu(), CommandManager::EndSubMenu(), FN, PluginManager::Get(), PluginDescriptor::GetPath(), PluginManager::GetPlugin(), gPrefs, name, and OnEffect().

Referenced by AddEffectMenuItems().

1829 {
1830  int namesCnt = (int) names.GetCount();
1831  int perGroup;
1832 
1833 #if defined(__WXGTK__)
1834  gPrefs->Read(wxT("/Effects/MaxPerGroup"), &perGroup, 15);
1835 #else
1836  gPrefs->Read(wxT("/Effects/MaxPerGroup"), &perGroup, 0);
1837 #endif
1838 
1839  int groupCnt = namesCnt;
1840  for (int i = 0; i < namesCnt; i++)
1841  {
1842  while (i + 1 < namesCnt && names[i].IsSameAs(names[i + 1]))
1843  {
1844  i++;
1845  groupCnt--;
1846  }
1847  }
1848 
1849  // The "default" effects shouldn't be broken into subgroups
1850  if (namesCnt > 0 && isDefault)
1851  {
1852  perGroup = 0;
1853  }
1854 
1855  int max = perGroup;
1856  int items = perGroup;
1857 
1858  if (max > groupCnt)
1859  {
1860  max = 0;
1861  }
1862 
1863  int groupNdx = 0;
1864  for (int i = 0; i < namesCnt; i++)
1865  {
1866  if (max > 0 && items == max)
1867  {
1868  int end = groupNdx + max;
1869  if (end + 1 > groupCnt)
1870  {
1871  end = groupCnt;
1872  }
1873  c->BeginSubMenu(wxString::Format(_("Plug-in %d to %d"),
1874  groupNdx + 1,
1875  end));
1876  }
1877 
1878  if (i + 1 < namesCnt && names[i].IsSameAs(names[i + 1]))
1879  {
1880  wxString name = names[i];
1881  c->BeginSubMenu(name);
1882  while (i < namesCnt && names[i].IsSameAs(name))
1883  {
1884  wxString item = PluginManager::Get().GetPlugin(plugs[i])->GetPath();
1885  c->AddItem(item,
1886  item,
1887  FN(OnEffect),
1888  flags[i],
1889  flags[i], plugs[i]);
1890 
1891  i++;
1892  }
1893  c->EndSubMenu();
1894  i--;
1895  }
1896  else
1897  {
1898  c->AddItem(names[i],
1899  names[i],
1900  FN(OnEffect),
1901  flags[i],
1902  flags[i], plugs[i]);
1903  }
1904 
1905  if (max > 0)
1906  {
1907  groupNdx++;
1908  items--;
1909  if (items == 0 || i + 1 == namesCnt)
1910  {
1911  c->EndSubMenu();
1912  items = max;
1913  }
1914  }
1915  }
1916 
1917  return;
1918 }
static wxArrayString names()
Definition: Tags.cpp:697
wxMenu * BeginSubMenu(const wxString &tName)
void AddItem(const wxChar *name, const wxChar *label, CommandHandlerFinder finder, CommandFunctorPointer callback, CommandFlag flags=NoFlagsSpecifed, CommandMask mask=NoFlagsSpecifed, const CommandParameter &parameter=CommandParameter{})
const wxString & GetPath() const
wxFileConfig * gPrefs
Definition: Prefs.cpp:72
#define FN(X)
Definition: Menus.cpp:292
void OnEffect(const CommandContext &context)
Definition: Menus.cpp:4443
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
const wxChar * name
Definition: Distortion.cpp:94
static PluginManager & Get()
const PluginDescriptor * GetPlugin(const PluginID &ID)
void AudacityProject::AddEffectMenuItems ( CommandManager c,
std::vector< const PluginDescriptor * > &  plugs,
CommandFlag  batchflags,
CommandFlag  realflags,
bool  isDefault 
)
private

Definition at line 1690 of file Menus.cpp.

References _(), AddEffectMenuItemGroup(), CommandManager::BeginSubMenu(), CommandManager::EndSubMenu(), EffectManager::Get(), EffectManager::GetEffectFamilyName(), PluginDescriptor::GetID(), PluginDescriptor::GetTranslatedName(), PluginDescriptor::GetTranslatedVendor(), gPrefs, PluginDescriptor::IsEffectDefault(), PluginDescriptor::IsEffectInteractive(), PluginDescriptor::IsEffectRealtime(), and name.

Referenced by PopulateEffectsMenu().

1695 {
1696  size_t pluginCnt = plugs.size();
1697 
1698  wxString groupBy = gPrefs->Read(wxT("/Effects/GroupBy"), wxT("name"));
1699 
1700  bool grouped = false;
1701  if (groupBy.StartsWith(wxT("groupby")))
1702  {
1703  grouped = true;
1704  }
1705 
1706  wxArrayString groupNames;
1707  PluginIDList groupPlugs;
1708  std::vector<CommandFlag> groupFlags;
1709  if (grouped)
1710  {
1711  wxString last;
1712  wxString current;
1713 
1714  for (size_t i = 0; i < pluginCnt; i++)
1715  {
1716  const PluginDescriptor *plug = plugs[i];
1717 
1718  wxString name = plug->GetTranslatedName();
1719 
1720  if (plug->IsEffectInteractive())
1721  {
1722  name += wxT("...");
1723  }
1724 
1725  if (groupBy == wxT("groupby:publisher"))
1726  {
1727  current = plug->GetTranslatedVendor();
1728  if (current.IsEmpty())
1729  {
1730  current = _("Unknown");
1731  }
1732  }
1733  else if (groupBy == wxT("groupby:type"))
1734  {
1735  current = EffectManager::Get().GetEffectFamilyName(plug->GetID());
1736  if (current.IsEmpty())
1737  {
1738  current = _("Unknown");
1739  }
1740  }
1741 
1742  if (current != last)
1743  {
1744  if (!last.IsEmpty())
1745  {
1746  c->BeginSubMenu(last);
1747  }
1748 
1749  AddEffectMenuItemGroup(c, groupNames, groupPlugs, groupFlags, isDefault);
1750 
1751  if (!last.IsEmpty())
1752  {
1753  c->EndSubMenu();
1754  }
1755 
1756  groupNames.Clear();
1757  groupPlugs.Clear();
1758  groupFlags.clear();
1759  last = current;
1760  }
1761 
1762  groupNames.Add(name);
1763  groupPlugs.Add(plug->GetID());
1764  groupFlags.push_back(plug->IsEffectRealtime() ? realflags : batchflags);
1765  }
1766 
1767  if (groupNames.GetCount() > 0)
1768  {
1769  c->BeginSubMenu(current);
1770 
1771  AddEffectMenuItemGroup(c, groupNames, groupPlugs, groupFlags, isDefault);
1772 
1773  c->EndSubMenu();
1774  }
1775  }
1776  else
1777  {
1778  for (size_t i = 0; i < pluginCnt; i++)
1779  {
1780  const PluginDescriptor *plug = plugs[i];
1781 
1782  wxString name = plug->GetTranslatedName();
1783 
1784  if (plug->IsEffectInteractive())
1785  {
1786  name += wxT("...");
1787  }
1788 
1789  wxString group = wxEmptyString;
1790  if (groupBy == wxT("sortby:publisher:name"))
1791  {
1792  group = plug->GetTranslatedVendor();
1793  }
1794  else if (groupBy == wxT("sortby:type:name"))
1795  {
1796  group = EffectManager::Get().GetEffectFamilyName(plug->GetID());
1797  }
1798 
1799  if (plug->IsEffectDefault())
1800  {
1801  group = wxEmptyString;
1802  }
1803 
1804  if (!group.IsEmpty())
1805  {
1806  group += wxT(": ");
1807  }
1808 
1809  groupNames.Add(group + name);
1810  groupPlugs.Add(plug->GetID());
1811  groupFlags.push_back(plug->IsEffectRealtime() ? realflags : batchflags);
1812  }
1813 
1814  if (groupNames.GetCount() > 0)
1815  {
1816  AddEffectMenuItemGroup(c, groupNames, groupPlugs, groupFlags, isDefault);
1817  }
1818 
1819  }
1820 
1821  return;
1822 }
wxMenu * BeginSubMenu(const wxString &tName)
wxString GetTranslatedName() const
wxString GetEffectFamilyName(const PluginID &ID)
bool IsEffectInteractive() const
wxString GetTranslatedVendor() const
wxArrayString PluginIDList
wxFileConfig * gPrefs
Definition: Prefs.cpp:72
bool IsEffectRealtime() const
static EffectManager & Get()
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
bool IsEffectDefault() const
const wxChar * name
Definition: Distortion.cpp:94
const wxString & GetID() const
void AddEffectMenuItemGroup(CommandManager *c, const wxArrayString &names, const PluginIDList &plugs, const std::vector< CommandFlag > &flags, bool isDefault)
Definition: Menus.cpp:1824
std::vector< std::shared_ptr< Track > > AudacityProject::AddImportedTracks ( const wxString &  fileName,
TrackHolders &&  newTracks 
)

Definition at line 4148 of file Project.cpp.

References _(), SeqBlock::f, GetSelectionBar(), IsProjectSaved(), mbLoadedFromAup, mFileName, mImportedDependencies, mRate, mTracks, Track::Pointer(), PushState(), SelectNone(), SetProjectTitle(), SelectionBar::SetRate(), and Track::Wave.

Referenced by Import(), and OnImportRaw().

4150 {
4151  std::vector< std::shared_ptr< Track > > results;
4152 
4153  const auto numTracks = newTracks.size();
4154  SelectNone();
4155 
4156  bool initiallyEmpty = mTracks->empty();
4157  double newRate = 0;
4158  wxString trackNameBase = fileName.AfterLast(wxFILE_SEP_PATH).BeforeLast('.');
4159  bool isLinked = false;
4160  int i = -1;
4161  for (auto &uNewTrack : newTracks) {
4162  ++i;
4163 
4164  auto newTrack = mTracks->Add(std::move(uNewTrack));
4165  results.push_back(Track::Pointer(newTrack));
4166  if (newRate == 0 && newTrack->GetKind() == Track::Wave) {
4167  newRate = ((WaveTrack *)newTrack)->GetRate();
4168  }
4169  newTrack->SetSelected(true);
4170  //we need to check link status based on the first channel only.
4171  if(0==i)
4172  isLinked = newTrack->GetLinked();
4173  if (numTracks > 2 || (numTracks > 1 && !isLinked) ) {
4174  newTrack->SetName(trackNameBase + wxString::Format(wxT(" %d" ), i + 1));
4175  }
4176  else {
4177  newTrack->SetName(trackNameBase);
4178  }
4179 
4180  // Check if NEW track contains aliased blockfiles and if yes,
4181  // remember this to show a warning later
4182  if (newTrack->GetKind() == WaveTrack::Wave)
4183  {
4184  if (WaveClip* clip = ((WaveTrack*)newTrack)->GetClipByIndex(0)) {
4185  BlockArray &blocks = clip->GetSequence()->GetBlockArray();
4186  if (blocks.size())
4187  {
4188  SeqBlock& block = blocks[0];
4189  if (block.f->IsAlias())
4190  {
4191  mImportedDependencies = true;
4192  }
4193  }
4194  }
4195  }
4196  }
4197 
4198  // Automatically assign rate of imported file to whole project,
4199  // if this is the first file that is imported
4200  if (initiallyEmpty && newRate > 0) {
4201  mRate = newRate;
4203  }
4204 
4205  PushState(wxString::Format(_("Imported '%s'"), fileName),
4206  _("Import"));
4207 
4208 #if defined(__WXGTK__)
4209  // See bug #1224
4210  // The track panel hasn't we been fully created, so the OnZoomFit() will not give
4211  // expected results due to a window width of zero. Should be safe to yield here to
4212  // allow the creattion to complete. If this becomes a problem, it "might" be possible
4213  // to queue a dummy event to trigger the OnZoomFit().
4214  wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI | wxEVT_CATEGORY_USER_INPUT);
4215 #endif
4216 
4217  if (initiallyEmpty && !IsProjectSaved() ) {
4218  wxString name = fileName.AfterLast(wxFILE_SEP_PATH).BeforeLast(wxT('.'));
4219  mFileName =::wxPathOnly(fileName) + wxFILE_SEP_PATH + name + wxT(".aup");
4220  mbLoadedFromAup = false;
4221  SetProjectTitle();
4222  }
4223 
4224  // Moved this call to higher levels to prevent flicker redrawing everything on each file.
4225  // HandleResize();
4226 
4227  newTracks.clear();
4228 
4229  return results;
4230 }
Data structure containing pointer to a BlockFile and a start time. Element of a BlockArray.
Definition: Sequence.h:31
bool mbLoadedFromAup
Definition: Project.h:598
void SetRate(double rate)
wxString mFileName
Definition: Project.h:597
bool mImportedDependencies
Definition: Project.h:741
void SetProjectTitle(int number=-1)
Definition: Project.cpp:1447
double mRate
Definition: Project.h:604
This allows multiple clips to be a part of one WaveTrack.
Definition: WaveClip.h:176
A Track that contains audio waveform data.
Definition: WaveTrack.h:60
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
void PushState(const wxString &desc, const wxString &shortDesc)
Definition: Project.cpp:4502
const wxChar * name
Definition: Distortion.cpp:94
void SelectNone()
Definition: Menus.cpp:6019
BlockFilePtr f
Definition: Sequence.h:33
bool IsProjectSaved()
Definition: Project.cpp:5815
SelectionBar * GetSelectionBar()
Definition: Project.cpp:4848
static std::shared_ptr< Subclass > Pointer(Track *t)
Definition: Track.h:129
std::shared_ptr< TrackList > mTracks
Definition: Project.h:617
double AudacityProject::AdjustForFindingEndTimes ( const std::vector< const WaveClip * > &  clips,
double  time 
)

Definition at line 7314 of file Menus.cpp.

Referenced by FindNextClipBoundary(), and FindPrevClipBoundary().

7315 {
7316  auto q = std::find_if(clips.begin(), clips.end(), [&] (const WaveClip* const& clip) {
7317  return clip->GetStartTime() == time; });
7318  if (q != clips.end() && q != clips.begin() &&
7319  (*(q - 1))->SharesBoundaryWithNextClip(*q)) {
7320  time = (*(q-1))->GetEndTime();
7321  }
7322 
7323  return time;
7324 }
This allows multiple clips to be a part of one WaveTrack.
Definition: WaveClip.h:176
double AudacityProject::AdjustForFindingStartTimes ( const std::vector< const WaveClip * > &  clips,
double  time 
)

Definition at line 7296 of file Menus.cpp.

Referenced by FindNextClip(), FindNextClipBoundary(), FindPrevClip(), and FindPrevClipBoundary().

7297 {
7298  auto q = std::find_if(clips.begin(), clips.end(), [&] (const WaveClip* const& clip) {
7299  return clip->GetEndTime() == time; });
7300  if (q != clips.end() && q + 1 != clips.end() &&
7301  (*q)->SharesBoundaryWithNextClip(*(q+1))) {
7302  time = (*(q+1))->GetStartTime();
7303  }
7304 
7305  return time;
7306 }
This allows multiple clips to be a part of one WaveTrack.
Definition: WaveClip.h:176
ODLock & AudacityProject::AllProjectDeleteMutex ( )
static

Prevents DELETE from external thread - for e.g. use of GetActiveProject.

Definition at line 175 of file Project.cpp.

Referenced by ODTask::DoSome(), OnCloseWindow(), and ODManager::Start().

176 {
177  static ODLock theMutex;
178  return theMutex;
179 };
void AudacityProject::ApplyUpdatedTheme ( )
virtual

Definition at line 1259 of file Project.cpp.

References TrackPanel::ApplyUpdatedTheme(), ThemeBase::Colour(), mTrackPanel, and theTheme.

Referenced by Theme::ApplyUpdatedImages().

1260 {
1261  SetBackgroundColour(theTheme.Colour( clrMedium ));
1262  ClearBackground();// For wxGTK.
1264 }
AUDACITY_DLL_API Theme theTheme
Definition: Theme.cpp:209
void ApplyUpdatedTheme()
Definition: TrackPanel.cpp:415
wxColour & Colour(int iIndex)
Definition: Theme.cpp:1208
TrackPanel * mTrackPanel
Definition: Project.h:657
double AudacityProject::AS_GetRate ( )
overridevirtual

Implements SelectionBarListener.

Definition at line 1509 of file Project.cpp.

References mRate.

1510 {
1511  return mRate;
1512 }
double mRate
Definition: Project.h:604
const wxString & AudacityProject::AS_GetSelectionFormat ( )
overridevirtual

Implements SelectionBarListener.

Definition at line 1538 of file Project.cpp.

References GetSelectionFormat().

1539 {
1540  return GetSelectionFormat();
1541 }
const wxString & GetSelectionFormat() const
Definition: Project.cpp:1652
int AudacityProject::AS_GetSnapTo ( )
overridevirtual

Implements SelectionBarListener.

Definition at line 1519 of file Project.cpp.

References GetSnapTo().

1520 {
1521  return GetSnapTo();
1522 }
int GetSnapTo() const
Definition: Project.cpp:5472
void AudacityProject::AS_ModifySelection ( double &  start,
double &  end,
bool  done 
)
overridevirtual

Implements SelectionBarListener.

Definition at line 1658 of file Project.cpp.

References ModifyState(), mTrackPanel, mViewInfo, TrackPanel::Refresh(), ViewInfo::selectedRegion, and SelectedRegion::setTimes().

1659 {
1660  mViewInfo.selectedRegion.setTimes(start, end);
1661  mTrackPanel->Refresh(false);
1662  if (done) {
1663  ModifyState(false);
1664  }
1665 }
SelectedRegion selectedRegion
Definition: ViewInfo.h:160
ViewInfo mViewInfo
Definition: Project.h:542
void Refresh(bool eraseBackground=true, const wxRect *rect=(const wxRect *) NULL) override
void ModifyState(bool bWantsAutoSave)
Definition: Project.cpp:4547
bool setTimes(double t0, double t1)
TrackPanel * mTrackPanel
Definition: Project.h:657
void AudacityProject::AS_SetRate ( double  rate)
overridevirtual

Implements SelectionBarListener.

Definition at line 1514 of file Project.cpp.

References mRate.

1515 {
1516  mRate = rate;
1517 }
double mRate
Definition: Project.h:604
void AudacityProject::AS_SetSelectionFormat ( const wxString &  format)
overridevirtual

Implements SelectionBarListener.

Definition at line 1543 of file Project.cpp.

References format, GetTrackPanel(), gPrefs, mSelectionFormat, TrackPanel::Refresh(), and SnapSelection().

Referenced by SetSelectionFormat().

1544 {
1546 
1547  gPrefs->Write(wxT("/SelectionFormat"), mSelectionFormat);
1548  gPrefs->Flush();
1549 
1550  if (SnapSelection() && GetTrackPanel())
1551  GetTrackPanel()->Refresh(false);
1552 }
bool SnapSelection()
Definition: Project.cpp:1481
wxFileConfig * gPrefs
Definition: Prefs.cpp:72
int format
Definition: ExportPCM.cpp:56
void Refresh(bool eraseBackground=true, const wxRect *rect=(const wxRect *) NULL) override
wxString mSelectionFormat
Definition: Project.h:620
TrackPanel * GetTrackPanel()
Definition: Project.h:289
void AudacityProject::AS_SetSnapTo ( int  snap)
overridevirtual

Implements SelectionBarListener.

Definition at line 1524 of file Project.cpp.

References gPrefs, mSnapTo, RedrawProject(), and SnapSelection().

Referenced by SetSnapTo().

1525 {
1526  mSnapTo = snap;
1527 
1528 // LLL: TODO - what should this be changed to???
1529 // mCommandManager.Check(wxT("Snap"), mSnapTo);
1530  gPrefs->Write(wxT("/SnapTo"), mSnapTo);
1531  gPrefs->Flush();
1532 
1533  SnapSelection();
1534 
1535  RedrawProject();
1536 }
void RedrawProject(const bool bForceWaveTracks=false)
Definition: Project.cpp:1347
bool SnapSelection()
Definition: Project.cpp:1481
wxFileConfig * gPrefs
Definition: Prefs.cpp:72
void AudacityProject::AutoSave ( )
private

Definition at line 5276 of file Project.cpp.

References _(), AudacityMessageBox(), FileNames::AutoSaveDir(), CreateUniqueName(), DeleteCurrentAutoSaveFile(), mAutoSaveFileName, mAutoSaving, mFileName, mStrOtherNamesArray, AutoSaveFile::Write(), WriteXML(), and WriteXMLHeader().

Referenced by ModifyState(), OnAudioIOStartRecording(), OnAudioIOStopRecording(), PopState(), and PushState().

5277 {
5278  // SonifyBeginAutoSave(); // part of RBD's r10680 stuff now backed out
5279 
5280  // To minimize the possibility of race conditions, we first write to a
5281  // file with the extension ".tmp", then rename the file to .autosave
5282  wxString projName;
5283 
5284  if (mFileName.IsEmpty())
5285  projName = wxT("New Project");
5286  else
5287  projName = wxFileName(mFileName).GetName();
5288 
5289  wxString fn = wxFileName(FileNames::AutoSaveDir(),
5290  projName + wxString(wxT(" - ")) + CreateUniqueName()).GetFullPath();
5291 
5292  // PRL: I found a try-catch and rewrote it,
5293  // but this guard is unnecessary because AutoSaveFile does not throw
5294  bool success = GuardedCall< bool >( [&]
5295  {
5296  VarSetter<bool> setter(&mAutoSaving, true, false);
5297 
5298  AutoSaveFile buffer;
5299  WriteXMLHeader(buffer);
5300  WriteXML(buffer, false);
5301  mStrOtherNamesArray.Clear();
5302 
5303  wxFFile saveFile;
5304  saveFile.Open(fn + wxT(".tmp"), wxT("wb"));
5305  return buffer.Write(saveFile);
5306  } );
5307 
5308  if (!success)
5309  return;
5310 
5311  // Now that we have a NEW auto-save file, DELETE the old one
5313 
5314  if (!mAutoSaveFileName.IsEmpty())
5315  return; // could not remove auto-save file
5316 
5317  if (!wxRenameFile(fn + wxT(".tmp"), fn + wxT(".autosave")))
5318  {
5320  wxString::Format( _("Could not create autosave file: %s"),
5321  fn + wxT(".autosave") ),
5322  _("Error"), wxICON_STOP, this);
5323  return;
5324  }
5325 
5326  mAutoSaveFileName += fn + wxT(".autosave");
5327  // no-op cruft that's not #ifdefed for NoteTrack
5328  // See above for further comments.
5329  // SonifyEndAutoSave();
5330 }
void WriteXMLHeader(XMLWriter &xmlFile) const
Definition: Project.cpp:3623
void WriteXML(XMLWriter &xmlFile, bool bWantSaveCompressed)
Definition: Project.cpp:3638
int AudacityMessageBox(const wxString &message, const wxString &caption=AudacityMessageBoxCaptionStr(), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: ErrorDialog.h:92
wxString mFileName
Definition: Project.h:597
static wxString CreateUniqueName()
Definition: Project.cpp:871
wxArrayString mStrOtherNamesArray
Definition: Project.h:743
wxString mAutoSaveFileName
Definition: Project.h:726
void DeleteCurrentAutoSaveFile()
Definition: Project.cpp:5332
static wxString AutoSaveDir()
Definition: FileNames.cpp:109
bool mAutoSaving
Definition: Project.h:729
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
void Write(const wxString &data) override
a class wrapping reading and writing of arbitrary data in text or binary format to a file...
Definition: AutoRecovery.h:78
void AudacityProject::CaptureKeyboard ( wxWindow *  handler)
static

Definition at line 5780 of file Project.cpp.

References GetActiveProject(), and mKeyboardCaptureHandler.

Referenced by DeviceToolBar::OnFocus(), MixerToolBar::OnFocus(), MixerTrackSlider::OnFocus(), TranscriptionToolBar::OnFocus(), SelectionBar::OnFocus(), NumericTextCtrl::OnFocus(), and TrackPanel::SetFocusedTrack().

5781 {
5782  AudacityProject *project = GetActiveProject();
5783  if (project)
5784  {
5785 // wxASSERT(project->mKeyboardCaptureHandler == NULL);
5786  project->mKeyboardCaptureHandler = handler;
5787  }
5788 }
AudacityProject provides the main window, with tools and tracks contained within it.
Definition: Project.h:158
wxWindow * mKeyboardCaptureHandler
Definition: Project.h:762
AUDACITY_DLL_API AudacityProject * GetActiveProject()
Definition: Project.cpp:300
bool AudacityProject::ChannelsHaveSameClipBoundaries ( const WaveTrack wt)

Definition at line 6328 of file Menus.cpp.

References WaveTrack::GetClips(), Track::GetLink(), and Track::GetLinked().

Referenced by FindClipBoundaries(), and FindClips().

6329 {
6330  bool sameClips = false;
6331 
6332  if (wt->GetLinked() && wt->GetLink()) {
6333  auto& left = wt->GetClips();
6334  auto& right = static_cast<const WaveTrack*>(wt->GetLink())->GetClips();
6335  if (left.size() == right.size()) {
6336  sameClips = true;
6337  for (unsigned int i = 0; i < left.size(); i++) {
6338  if (left[i]->GetStartTime() != right[i]->GetStartTime() ||
6339  left[i]->GetEndTime() != right[i]->GetEndTime()) {
6340  sameClips = false;
6341  break;
6342  }
6343  }
6344  }
6345  }
6346 
6347  return sameClips;
6348 }
bool GetLinked() const
Definition: Track.h:271
A Track that contains audio waveform data.
Definition: WaveTrack.h:60
WaveClipHolders & GetClips()
Definition: WaveTrack.h:364
Track * GetLink() const
Definition: Track.cpp:267
void AudacityProject::Clear ( )

Definition at line 4710 of file Project.cpp.

References _(), Track::Clear(), SelectedRegion::collapseToT0(), SelectedRegion::duration(), TrackListIterator::First(), Track::GetSelected(), GetTracks(), Track::IsSyncLockSelected(), mViewInfo, TrackListIterator::Next(), PushState(), RedrawProject(), ViewInfo::selectedRegion, SelectedRegion::t0(), and SelectedRegion::t1().

Referenced by OnDelete().

4711 {
4712  TrackListIterator iter(GetTracks());
4713 
4714  Track *n = iter.First();
4715 
4716  while (n) {
4717  if (n->GetSelected() || n->IsSyncLockSelected()) {
4719  }
4720  n = iter.Next();
4721  }
4722 
4723  double seconds = mViewInfo.selectedRegion.duration();
4724 
4726 
4727  PushState(wxString::Format(_("Deleted %.2f seconds at t=%.2f"),
4728  seconds,
4730  _("Delete"));
4731 
4732  RedrawProject();
4733 }
void RedrawProject(const bool bForceWaveTracks=false)
Definition: Project.cpp:1347
double t0() const
SelectedRegion selectedRegion
Definition: ViewInfo.h:160
bool GetSelected() const
Definition: Track.h:268
bool IsSyncLockSelected() const
Definition: Track.cpp:291
double t1() const
Fundamental data object of Audacity, placed in the TrackPanel. Classes derived form it include the Wa...
Definition: Track.h:94
virtual void Clear(double WXUNUSED(t0), double WXUNUSED(t1))=0
ViewInfo mViewInfo
Definition: Project.h:542
An iterator for a TrackList.
Definition: Track.h:394
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
void PushState(const wxString &desc, const wxString &shortDesc)
Definition: Project.cpp:4502
TrackList * GetTracks()
Definition: Project.h:174
double duration() const
void AudacityProject::ClearClipboard ( )
static

Definition at line 4700 of file Project.cpp.

References msClipboard, msClipProject, msClipT0, and msClipT1.

Referenced by EditClipboardByLabel(), OnCopy(), OnCut(), HistoryWindow::OnDiscardClipboard(), and OnSplitCut().

4701 {
4702  msClipT0 = 0.0;
4703  msClipT1 = 0.0;
4704  msClipProject = NULL;
4705  if (msClipboard) {
4706  msClipboard->Clear();
4707  }
4708 }
static double msClipT0
Definition: Project.h:629
static double msClipT1
Definition: Project.h:630
static std::shared_ptr< TrackList > msClipboard
Definition: Project.h:627
static AudacityProject * msClipProject
Definition: Project.h:628
bool AudacityProject::Clipboard ( )
inline

Definition at line 200 of file Project.h.

200 { return (msClipT1 - msClipT0) > 0.0; }
static double msClipT0
Definition: Project.h:629
static double msClipT1
Definition: Project.h:630
wxString AudacityProject::ClipBoundaryMessage ( const std::vector< FoundClipBoundary > &  results)
static

Definition at line 7443 of file Menus.cpp.

References _(), format, and wxPLURAL.

Referenced by OnCursorClipBoundary(), and OnSelectClipBoundary().

7444 {
7445  wxString message;
7446  for (auto& result : results) {
7447 
7448  auto longName = result.ComposeTrackName();
7449 
7450  wxString str;
7451  auto nClips = result.waveTrack->GetNumClips();
7452  if (result.nFound < 2) {
7453  /* i18n-hint: in the string after this one,
7454  First %s is replaced with the noun "start" or "end"
7455  identifying one end of a clip,
7456  first number gives the position of that clip in a sequence
7457  of clips,
7458  last number counts all clips,
7459  and the last string is the name of the track containing the clips.
7460  */
7461  _("dummyStringClipBoundaryMessage");
7462  auto format = wxPLURAL(
7463  "%s %d of %d clip %s",
7464  "%s %d of %d clips %s",
7465  nClips
7466  );
7467  str = wxString::Format(format,
7468  result.clipStart1 ? _("start") : _("end"),
7469  result.index1 + 1,
7470  nClips,
7471  longName
7472  );
7473  }
7474  else {
7475  /* i18n-hint: in the string after this one,
7476  First two %s are each replaced with the noun "start"
7477  or with "end", identifying and end of a clip,
7478  first and second numbers give the position of those clips in
7479  a seqeunce of clips,
7480  last number counts all clips,
7481  and the last string is the name of the track containing the clips.
7482  */
7483  _("dummyStringClipBoundaryMessageLong");
7484  auto format = wxPLURAL(
7485  "%s %d and %s %d of %d clip %s",
7486  "%s %d and %s %d of %d clips %s",
7487  nClips
7488  );
7489  str = wxString::Format(format,
7490  result.clipStart1 ? _("start") : _("end"),
7491  result.index1 + 1,
7492  result.clipStart2 ? _("start") : _("end"),
7493  result.index2 + 1,
7494  nClips,
7495  longName
7496  );
7497  }
7498 
7499  if (message.empty())
7500  message = str;
7501  else
7502  message = wxString::Format(_("%s, %s"), message, str);
7503  }
7504 
7505  return message;
7506 }
#define wxPLURAL(sing, plur, n)
Definition: Internat.h:70
int format
Definition: ExportPCM.cpp:56
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
int AudacityProject::CountSelectedTracks ( )
private

Definition at line 5960 of file Menus.cpp.

References TrackListIterator::First(), Track::GetSelected(), GetTracks(), and TrackListIterator::Next().

Referenced by OnSelectSomething().

5961 {
5962  TrackListIterator iter(GetTracks());
5963 
5964  int count =0;
5965  for (Track *t = iter.First(); t; t = iter.Next()) {
5966  if( t->GetSelected() )
5967  count++;
5968  }
5969  return count;
5970 }
Fundamental data object of Audacity, placed in the TrackPanel. Classes derived form it include the Wa...
Definition: Track.h:94
An iterator for a TrackList.
Definition: Track.h:394
TrackList * GetTracks()
Definition: Project.h:174
int AudacityProject::CountSelectedWaveTracks ( )
private

Definition at line 5948 of file Menus.cpp.

References TrackListIterator::First(), Track::GetKind(), Track::GetSelected(), GetTracks(), TrackListIterator::Next(), and Track::Wave.

5949 {
5950  TrackListIterator iter(GetTracks());
5951 
5952  int count =0;
5953  for (Track *t = iter.First(); t; t = iter.Next()) {
5954  if( (t->GetKind() == Track::Wave) && t->GetSelected() )
5955  count++;
5956  }
5957  return count;
5958 }
Fundamental data object of Audacity, placed in the TrackPanel. Classes derived form it include the Wa...
Definition: Track.h:94
An iterator for a TrackList.
Definition: Track.h:394
TrackList * GetTracks()
Definition: Project.h:174
int AudacityProject::CountUnnamed ( )
static

Definition at line 2084 of file Project.cpp.

References gAudacityProjects, and GetName().

Referenced by TitleRestorer::TitleRestorer().

2085 {
2086  int j = 0;
2087  for ( size_t i = 0; i < gAudacityProjects.size(); i++) {
2088  if ( gAudacityProjects[i] )
2089  if ( gAudacityProjects[i]->GetName().IsEmpty() )
2090  j++;
2091  }
2092  return j;
2093 }
AProjectArray gAudacityProjects
Definition: Project.cpp:295
wxString GetName()
Definition: Project.cpp:1434
void AudacityProject::CreateMenusAndCommands ( )
private

Definition at line 294 of file Menus.cpp.

References _(), CommandManager::AddCheck(), CommandManager::AddGlobalCommand(), CommandManager::AddItem(), CommandManager::AddItemList(), CommandManager::AddMenuBar(), Scrubber::AddMenuItems(), CommandManager::AddSeparator(), AlwaysEnabledFlag, AudioIOBusyFlag, AudioIONotBusyFlag, AudioTracksSelectedFlag, CommandManager::BeginMenu(), CommandManager::BeginSubMenu(), CanStopAudioStreamFlag, CaptureNotBusyFlag, CreateRecentFilesMenu(), CutCopyAvailableFlag, CommandManager::EndMenu(), CommandManager::EndSubMenu(), FN, gAudioIO, EffectManager::Get(), PluginManager::Get(), EffectManager::GetEffectByIdentifier(), PluginManager::GetPlugin(), GetScrubber(), gPrefs, HasLastEffectFlag, PluginDescriptor::IsEnabled(), IsNotSyncLockedFlag, IsRealtimeNotActiveFlag, IsSyncLockedFlag, LabelsSelectedFlag, LabelTracksExistFlag, mAlignLabelsCount, mCommandManager, AudioIO::mDetectUpstreamDropouts, mLastEffect, mLastFlags, ModifyUndoMenuItems(), mRecentFilesMenu, AudioIO::mSimulateRecordingErrors, names(), NextFrame(), NextWindow(), NoAutoSelect, NoteTracksExistFlag, NoteTracksSelectedFlag, NotMinimizedFlag, OnAbout(), OnAddLabel(), OnAddLabelPlaying(), OnAlign(), OnAlignNoSync(), OnApplyChain(), OnAudioDeviceInfo(), OnAudioHost(), OnBenchmark(), OnCheckDependencies(), OnCheckForUpdates(), OnClipLeft(), OnClipRight(), OnClose(), OnCollapseAllTracks(), OnContrast(), OnCopy(), OnCopyLabels(), OnCursorDown(), OnCursorLeft(), OnCursorLongJumpLeft(), OnCursorLongJumpRight(), OnCursorNextClipBoundary(), OnCursorPositionStore(), OnCursorPrevClipBoundary(), OnCursorRight(), OnCursorSelEnd(), OnCursorSelStart(), OnCursorShortJumpLeft(), OnCursorShortJumpRight(), OnCursorTrackEnd(), OnCursorTrackStart(), OnCursorUp(), OnCut(), OnCutLabels(), OnDelete(), OnDeleteLabels(), OnDetectUpstreamDropouts(), OnDisjoin(), OnDisjoinLabels(), OnDrawTool(), OnDuplicate(), OnEditChains(), OnEditLabels(), OnEditMetadata(), OnEnvelopeTool(), OnExit(), OnExpandAllTracks(), OnExportAudio(), OnExportLabels(), OnExportMIDI(), OnExportMp3(), OnExportMultiple(), OnExportOgg(), OnExportSelection(), OnExportWav(), OnFirstTrack(), OnFullScreen(), OnGoSelEnd(), OnGoSelStart(), OnHistory(), OnImport(), OnImportLabels(), OnImportMIDI(), OnImportRaw(), OnInputChannels(), OnInputDevice(), OnInputGain(), OnInputGainDec(), OnInputGainInc(), OnJoin(), OnJoinLabels(), OnKaraoke(), OnLastTrack(), OnLockPlayRegion(), OnMacBringAllToFront(), OnMacMinimize(), OnMacMinimizeAll(), OnMacZoom(), OnManageAnalyzers(), OnManageEffects(), OnManageGenerators(), OnManual(), OnMixAndRender(), OnMixAndRenderToNewTrack(), OnMixerBoard(), OnMoveSelectionWithTracks(), OnMoveToNextLabel(), OnMoveToPrevLabel(), OnMultiTool(), OnMuteAllTracks(), OnNew(), OnNewLabelTrack(), OnNewStereoTrack(), OnNewTimeTrack(), OnNewWaveTrack(), OnNextHigherPeakFrequency(), OnNextLowerPeakFrequency(), OnNextTool(), OnOpen(), OnOutputDevice(), OnOutputGain(), OnOutputGainDec(), OnOutputGainInc(), OnPageSetup(), OnPanCenter(), OnPanLeft(), OnPanRight(), OnPaste(), OnPasteNewLabel(), OnPause(), OnPlayAfterSelectionEnd(), OnPlayAfterSelectionStart(), OnPlayAtSpeed(), OnPlayAtSpeedCutPreview(), OnPlayAtSpeedLooped(), OnPlayBeforeAndAfterSelectionEnd(), OnPlayBeforeAndAfterSelectionStart(), OnPlayBeforeSelectionEnd(), OnPlayBeforeSelectionStart(), OnPlayCutPreview(), OnPlayLooped(), OnPlayOneSecond(), OnPlaySpeedDec(), OnPlaySpeedInc(), OnPlayStop(), OnPlayStopSelect(), OnPlayToSelection(), OnPlotSpectrum(), OnPreferences(), OnPrevTool(), OnPrint(), OnQuickHelp(), OnRecord(), OnRecord2ndChoice(), OnRedo(), OnRemoveTracks(), OnRepeatLastEffect(), OnResample(), OnRescanDevices(), OnResetToolBars(), OnSave(), OnSaveAs(), OnScreenshot(), OnSeekLeftLong(), OnSeekLeftShort(), OnSeekRightLong(), OnSeekRightShort(), OnSelContractLeft(), OnSelContractRight(), OnSelectAll(), OnSelectAllTracks(), OnSelectCursorEnd(), OnSelectCursorStoredCursor(), OnSelectCursorToNextClipBoundary(), OnSelectionRestore(), OnSelectionSave(), OnSelectNextClip(), OnSelectNone(), OnSelectPrevClip(), OnSelectPrevClipBoundaryToCursor(), OnSelectStartCursor(), OnSelectSyncLockSel(), OnSelectTool(), OnSelExtendLeft(), OnSelExtendRight(), OnSelSetExtendLeft(), OnSelSetExtendRight(), OnSelToEnd(), OnSelToStart(), OnSetLeftSelection(), OnSetPlaySpeed(), OnSetRightSelection(), OnShiftDown(), OnShiftUp(), OnShowClipping(), OnShowDeviceToolBar(), OnShowEditToolBar(), OnShowExtraMenus(), OnShowLog(), OnShowMixerToolBar(), OnShowPlayMeterToolBar(), OnShowRecordMeterToolBar(), OnShowScrubbingToolBar(), OnShowSelectionToolBar(), OnShowSpectralSelectionToolBar(), OnShowToolsToolBar(), OnShowTranscriptionToolBar(), OnShowTransportToolBar(), OnSilence(), OnSilenceLabels(), OnSimulateRecordingErrors(), OnSkipEnd(), OnSkipStart(), OnSnapToNearest(), OnSnapToOff(), OnSnapToPrior(), OnSortName(), OnSortTime(), OnSoundActivated(), OnSplit(), OnSplitCut(), OnSplitCutLabels(), OnSplitDelete(), OnSplitDeleteLabels(), OnSplitLabels(), OnSplitNew(), OnStereoToMono(), OnStop(), OnSyncLock(), OnTimerRecord(), OnTimeShiftTool(), OnToggle(), OnTogglePinnedHead(), OnTogglePlayRecording(), OnToggleSoundActivated(), OnToggleSpectralSelection(), OnToggleSWPlaythrough(), OnToggleTypeToCreateLabel(), OnTrackClose(), OnTrackGain(), OnTrackGainDec(), OnTrackGainInc(), OnTrackMenu(), OnTrackMoveBottom(), OnTrackMoveDown(), OnTrackMoveTop(), OnTrackMoveUp(), OnTrackMute(), OnTrackPan(), OnTrackPanLeft(), OnTrackPanRight(), OnTrackSolo(), OnTrim(), OnUndo(), OnUnlockPlayRegion(), OnUnMuteAllTracks(), OnZeroCrossing(), OnZoomFit(), OnZoomFitV(), OnZoomIn(), OnZoomNormal(), OnZoomOut(), OnZoomSel(), OnZoomToggle(), OnZoomTool(), PlayableTracksExistFlag, PlayRegionLockedFlag, PlayRegionNotLockedFlag, PopulateEffectsMenu(), PrevFrame(), PrevWindow(), RedoAvailableFlag, CommandManager::SetCommandFlags(), CommandManager::SetDefaultFlags(), CommandManager::SetMaxList(), CommandManager::SetOccultCommands(), StereoRequiredFlag, TimeSelectedFlag, TrackPanelHasFocus, TracksExistFlag, TracksSelectedFlag, UndoAvailableFlag, UnsavedChangesFlag, WaveTracksExistFlag, WaveTracksSelectedFlag, wxGetApp(), ZoomInAvailableFlag, and ZoomOutAvailableFlag.

Referenced by RebuildMenuBar().

295 {
297  wxArrayString names;
298  std::vector<int> indices;
299 
300  // The list of defaults to exclude depends on
301  // preference wxT("/GUI/Shortcuts/FullDefaults"), which may have changed.
302  c->SetMaxList();
303 
304  {
305  auto menubar = c->AddMenuBar(wxT("appmenu"));
306  wxASSERT(menubar);
307  c->SetOccultCommands( false );
308 
310  // File menu
312 
313  c->BeginMenu(_("&File"));
315 
316  /*i18n-hint: "New" is an action (verb) to create a NEW project*/
317  c->AddItem(wxT("New"), _("&New"), FN(OnNew), wxT("Ctrl+N"),
320 
321  /*i18n-hint: (verb)*/
322  c->AddItem(wxT("Open"), _("&Open..."), FN(OnOpen), wxT("Ctrl+O"),
325 
327 
329 
331 
332  c->AddSeparator();
333 
334  c->AddItem(wxT("Close"), _("&Close"), FN(OnClose), wxT("Ctrl+W"));
335 
336  c->AddItem(wxT("Save"), _("&Save Project"), FN(OnSave), wxT("Ctrl+S"),
339  c->AddItem(wxT("SaveAs"), _("Save Project &As..."), FN(OnSaveAs));
340 
341  c->BeginSubMenu( _("&Export") );
342 
343  // Enable Export audio commands only when there are audio tracks.
344  c->AddItem(wxT("ExportMp3"), _("Export as MP&3"), FN(OnExportMp3), wxT(""),
347 
348  c->AddItem(wxT("ExportWav"), _("Export as &WAV"), FN(OnExportWav), wxT(""),
351 
352  c->AddItem(wxT("ExportOgg"), _("Export as &OGG"), FN(OnExportOgg), wxT(""),
355 
356  c->AddItem(wxT("Export"), _("&Export Audio..."), FN(OnExportAudio), wxT("Ctrl+Shift+E"),
359 
360  // Enable Export Selection commands only when there's a selection.
361  c->AddItem(wxT("ExportSel"), _("Expo&rt Selected Audio..."), FN(OnExportSelection),
364 
365  c->AddItem(wxT("ExportLabels"), _("Export &Labels..."), FN(OnExportLabels),
368  // Enable Export audio commands only when there are audio tracks.
369  c->AddItem(wxT("ExportMultiple"), _("Export &Multiple..."), FN(OnExportMultiple), wxT("Ctrl+Shift+L"),
372 #if defined(USE_MIDI)
373  c->AddItem(wxT("ExportMIDI"), _("Export MI&DI..."), FN(OnExportMIDI),
376 #endif
377 #ifdef USE_LIBVORBIS
378  c->AddSeparator();
379  c->AddItem(wxT("SaveCompressed"), _("&Save Compressed Copy of Project..."), FN(OnSaveCompressed));
380 #endif
381  c->EndSubMenu();
382  c->AddSeparator();
383  c->BeginSubMenu(_("&Import"));
384 
385  c->AddItem(wxT("ImportAudio"), _("&Audio..."), FN(OnImport), wxT("Ctrl+Shift+I"));
386  c->AddItem(wxT("ImportLabels"), _("&Labels..."), FN(OnImportLabels));
387 #ifdef USE_MIDI
388  c->AddItem(wxT("ImportMIDI"), _("&MIDI..."), FN(OnImportMIDI));
389 #endif // USE_MIDI
390  c->AddItem(wxT("ImportRaw"), _("&Raw Data..."), FN(OnImportRaw));
391 
392  c->EndSubMenu();
393  c->AddSeparator();
394 
396 
397  c->BeginSubMenu(_("C&hains"));
398  c->AddItem(wxT("ApplyChain"), _("Appl&y Chain..."), FN(OnApplyChain),
401  c->AddItem(wxT("EditChains"), _("Edit C&hains..."), FN(OnEditChains));
402  c->EndSubMenu();
403 
404  c->AddSeparator();
405 
406  c->AddItem(wxT("PageSetup"), _("Pa&ge Setup..."), FN(OnPageSetup),
409  /* i18n-hint: (verb) It's item on a menu. */
410  c->AddItem(wxT("Print"), _("&Print..."), FN(OnPrint),
413 
414  c->AddSeparator();
415 
416  // On the Mac, the Exit item doesn't actually go here...wxMac will pull it out
417  // and put it in the Audacity menu for us based on its ID.
418  /* i18n-hint: (verb) It's item on a menu. */
419  c->AddItem(wxT("Exit"), _("E&xit"), FN(OnExit), wxT("Ctrl+Q"),
422 
423  c->EndMenu();
424 
426  // Edit Menu
428 
429  c->BeginMenu(_("&Edit"));
430 
433 
434  c->AddItem(wxT("Undo"), _("&Undo"), FN(OnUndo), wxT("Ctrl+Z"),
437 
438  // The default shortcut key for Redo is different on different platforms.
439  wxString key =
440 #ifdef __WXMSW__
441  wxT("Ctrl+Y");
442 #else
443  wxT("Ctrl+Shift+Z");
444 #endif
445 
446  c->AddItem(wxT("Redo"), _("&Redo"), FN(OnRedo), key,
449 
451 
452  c->AddSeparator();
453 
454  // Basic Edit coomands
455  /* i18n-hint: (verb)*/
456  c->AddItem(wxT("Cut"), _("Cu&t"), FN(OnCut), wxT("Ctrl+X"),
459  c->AddItem(wxT("Delete"), _("&Delete"), FN(OnDelete), wxT("Ctrl+K"),
462  /* i18n-hint: (verb)*/
463  c->AddItem(wxT("Copy"), _("&Copy"), FN(OnCopy), wxT("Ctrl+C"),
466  /* i18n-hint: (verb)*/
467  c->AddItem(wxT("Paste"), _("&Paste"), FN(OnPaste), wxT("Ctrl+V"),
470  /* i18n-hint: (verb)*/
471  c->AddItem(wxT("Duplicate"), _("Duplic&ate"), FN(OnDuplicate), wxT("Ctrl+D"));
472 
473  c->AddSeparator();
474 
475  c->BeginSubMenu(_("R&emove Special"));
476  /* i18n-hint: (verb) Do a special kind of cut*/
477  c->AddItem(wxT("SplitCut"), _("Spl&it Cut"), FN(OnSplitCut), wxT("Ctrl+Alt+X"));
478  /* i18n-hint: (verb) Do a special kind of DELETE*/
479  c->AddItem(wxT("SplitDelete"), _("Split D&elete"), FN(OnSplitDelete), wxT("Ctrl+Alt+K"));
480 
481  c->AddSeparator();
482 
483  /* i18n-hint: (verb)*/
484  c->AddItem(wxT("Silence"), _("Silence Audi&o"), FN(OnSilence), wxT("Ctrl+L"),
487  /* i18n-hint: (verb)*/
488  c->AddItem(wxT("Trim"), _("Tri&m Audio"), FN(OnTrim), wxT("Ctrl+T"),
491  c->EndSubMenu();
492 
493  c->AddSeparator();
494 
496 
497  c->BeginSubMenu(_("Clip B&oundaries"));
498  /* i18n-hint: (verb) It's an item on a menu. */
499  c->AddItem(wxT("Split"), _("Sp&lit"), FN(OnSplit), wxT("Ctrl+I"),
502  c->AddItem(wxT("SplitNew"), _("Split Ne&w"), FN(OnSplitNew), wxT("Ctrl+Alt+I"),
505  c->AddSeparator();
506  /* i18n-hint: (verb)*/
507  c->AddItem(wxT("Join"), _("&Join"), FN(OnJoin), wxT("Ctrl+J"));
508  c->AddItem(wxT("Disjoin"), _("Detac&h at Silences"), FN(OnDisjoin), wxT("Ctrl+Alt+J"));
509  c->EndSubMenu();
510 
512 
513  c->BeginSubMenu(_("&Labels"));
514 
515  c->AddItem(wxT("EditLabels"), _("&Edit Labels..."), FN(OnEditLabels),
517 
518  c->AddSeparator();
519 
520  c->AddItem(wxT("AddLabel"), _("Add Label At &Selection"), FN(OnAddLabel), wxT("Ctrl+B"),
522  c->AddItem(wxT("AddLabelPlaying"), _("Add Label At &Playback Position"),
524 #ifdef __WXMAC__
525  wxT("Ctrl+."),
526 #else
527  wxT("Ctrl+M"),
528 #endif
530  AudioIOBusyFlag);
532  c->AddItem(wxT("PasteNewLabel"), _("Paste Te&xt to New Label"), FN(OnPasteNewLabel), wxT("Ctrl+Alt+V"),
534 
535  c->AddSeparator();
536 
537  c->AddCheck(wxT("TypeToCreateLabel"), _("&Type to Create a Label (on/off)"),
539 
540  c->EndSubMenu();
541 
543 
544  c->BeginSubMenu(_("La&beled Audio"));
545 
548 
549  /* i18n-hint: (verb)*/
550  c->AddItem(wxT("CutLabels"), _("&Cut"), FN(OnCutLabels), wxT("Alt+X"),
553  c->AddItem(wxT("DeleteLabels"), _("&Delete"), FN(OnDeleteLabels), wxT("Alt+K"),
556 
557  c->AddSeparator();
558 
559  /* i18n-hint: (verb) A special way to cut out a piece of audio*/
560  c->AddItem(wxT("SplitCutLabels"), _("&Split Cut"), FN(OnSplitCutLabels), wxT("Alt+Shift+X"));
561  c->AddItem(wxT("SplitDeleteLabels"), _("Sp&lit Delete"), FN(OnSplitDeleteLabels), wxT("Alt+Shift+K"));
562 
563  c->AddSeparator();
564 
565 
566  c->AddItem(wxT("SilenceLabels"), _("Silence &Audio"), FN(OnSilenceLabels), wxT("Alt+L"));
567  /* i18n-hint: (verb)*/
568  c->AddItem(wxT("CopyLabels"), _("Co&py"), FN(OnCopyLabels), wxT("Alt+Shift+C"));
569 
570  c->AddSeparator();
571 
572  /* i18n-hint: (verb)*/
573  c->AddItem(wxT("SplitLabels"), _("Spli&t"), FN(OnSplitLabels), wxT("Alt+I"),
576  /* i18n-hint: (verb)*/
577  c->AddItem(wxT("JoinLabels"), _("&Join"), FN(OnJoinLabels), wxT("Alt+J"));
578  c->AddItem(wxT("DisjoinLabels"), _("Detac&h at Silences"), FN(OnDisjoinLabels), wxT("Alt+Shift+J"));
579 
580  c->EndSubMenu();
581 
582  c->AddItem(wxT("EditMetaData"), _("Me&tadata..."), FN(OnEditMetadata),
584 
586 
587 #ifndef __WXMAC__
588  c->AddSeparator();
589 #endif
590 
591  // The default shortcut key for Preferences is different on different platforms.
592  key =
593 #ifdef __WXMAC__
594  wxT("Ctrl+,");
595 #else
596  wxT("Ctrl+P");
597 #endif
598 
599  c->AddItem(wxT("Preferences"), _("Pre&ferences..."), FN(OnPreferences), key,
602 
603  c->EndMenu();
604 
606  // Select Menu
608 
609  /* i18n-hint: (verb) It's an item on a menu. */
610  c->BeginMenu(_("&Select"));
612 
613  c->AddItem(wxT("SelectAll"), _("&All"), FN(OnSelectAll), wxT("Ctrl+A"));
614  c->AddItem(wxT("SelectNone"), _("&None"), FN(OnSelectNone), wxT("Ctrl+Shift+A"));
615 
617 
619 
620  c->BeginSubMenu(_("&Tracks"));
621  c->AddItem(wxT("SelAllTracks"), _("In All &Tracks"), FN(OnSelectAllTracks),
622  wxT("Ctrl+Shift+K"),
624 
625 #ifdef EXPERIMENTAL_SYNC_LOCK
626  c->AddItem(wxT("SelSyncLockTracks"), _("In All &Sync-Locked Tracks"),
627  FN(OnSelectSyncLockSel), wxT("Ctrl+Shift+Y"),
630 #endif
631 
632  c->EndSubMenu();
633 
635 
637 
638  c->BeginSubMenu(_("R&egion"));
639 
640  c->AddItem(wxT("SetLeftSelection"), _("&Left at Playback Position"), FN(OnSetLeftSelection), wxT("["));
641  c->AddItem(wxT("SetRightSelection"), _("&Right at Playback Position"), FN(OnSetRightSelection), wxT("]"));
643  c->AddItem(wxT("SelStartCursor"), _("Track &Start to Cursor"), FN(OnSelectStartCursor), wxT("Shift+J"),AlwaysEnabledFlag,AlwaysEnabledFlag);
644  c->AddItem(wxT("SelCursorEnd"), _("Cursor to Track &End"), FN(OnSelectCursorEnd), wxT("Shift+K"),AlwaysEnabledFlag,AlwaysEnabledFlag);
645  c->AddSeparator();
646  // GA: Audacity had 'Store Re&gion' here previously. There is no one-step
647  // way to restore the 'Saved Cursor Position' in Select Menu, so arguably
648  // using the word 'Selection' to do duty for both saving the region or the
649  // cursor is better. But it does not belong in a 'Region' submenu.
650  c->AddItem(wxT("SelSave"), _("S&tore Selection"), FN(OnSelectionSave),
653  // Audacity had 'Retrieve Regio&n' here previously.
654  c->AddItem(wxT("SelRestore"), _("Retrieve Selectio&n"), FN(OnSelectionRestore),
657 
658  c->EndSubMenu();
659 
661 
663 
664 #ifdef EXPERIMENTAL_SPECTRAL_EDITING
665  c->BeginSubMenu(_("S&pectral"));
666  c->AddItem(wxT("ToggleSpectralSelection"), _("To&ggle spectral selection"), FN(OnToggleSpectralSelection), wxT("Q"));
667  c->AddItem(wxT("NextHigherPeakFrequency"), _("Next &Higher Peak Frequency"), FN(OnNextHigherPeakFrequency));
668  c->AddItem(wxT("NextLowerPeakFrequency"), _("Next &Lower Peak Frequency"), FN(OnNextLowerPeakFrequency));
669  c->EndSubMenu();
670 #endif
671 
673 
675 
676  c->BeginSubMenu(_("Clip B&oundaries"));
677  c->AddItem(wxT("SelPrevClipBoundaryToCursor"), _("Pre&vious Clip Boundary to Cursor"),
680  c->AddItem(wxT("SelCursorToNextClipBoundary"), _("Cursor to Ne&xt Clip Boundary"),
683  c->AddItem(wxT("SelPrevClip"), _("Previo&us Clip"), FN(OnSelectPrevClip), wxT("Alt+P"),
685  c->AddItem(wxT("SelNextClip"), _("N&ext Clip"), FN(OnSelectNextClip), wxT("Alt+N"),
687 
688  c->EndSubMenu();
690 
691  c->AddSeparator();
692 
693  c->AddItem(wxT("SelCursorStoredCursor"), _("Cursor to Stored &Cursor Position"), FN(OnSelectCursorStoredCursor),
694  wxT(""), TracksExistFlag, TracksExistFlag);
695 
696  c->AddItem(wxT("StoreCursorPosition"), _("Store Cursor Pos&ition"), FN(OnCursorPositionStore),
699  // Save cursor position is used in some selections.
700  // Maybe there should be a restore for it?
701 
702  c->AddSeparator();
703 
704  c->AddItem(wxT("ZeroCross"), _("At &Zero Crossings"), FN(OnZeroCrossing), wxT("Z"));
705 
706  c->EndMenu();
707 
709  // View Menu
711 
712  c->BeginMenu(_("&View"));
714  c->BeginSubMenu(_("&Zoom"));
715 
716  c->AddItem(wxT("ZoomIn"), _("Zoom &In"), FN(OnZoomIn), wxT("Ctrl+1"),
719  c->AddItem(wxT("ZoomNormal"), _("Zoom &Normal"), FN(OnZoomNormal), wxT("Ctrl+2"));
720  c->AddItem(wxT("ZoomOut"), _("Zoom &Out"), FN(OnZoomOut), wxT("Ctrl+3"),
723  c->AddItem(wxT("ZoomSel"), _("&Zoom to Selection"), FN(OnZoomSel), wxT("Ctrl+E"),
726  c->AddItem(wxT("ZoomToggle"), _("Zoom &Toggle"), FN(OnZoomToggle), wxT("Shift+Z"),
729  c->EndSubMenu();
730 
731  c->BeginSubMenu(_("T&rack Size"));
732  c->AddItem(wxT("FitInWindow"), _("&Fit to Width"), FN(OnZoomFit), wxT("Ctrl+F"));
733  c->AddItem(wxT("FitV"), _("Fit to &Height"), FN(OnZoomFitV), wxT("Ctrl+Shift+F"));
734  c->AddItem(wxT("CollapseAllTracks"), _("&Collapse All Tracks"), FN(OnCollapseAllTracks), wxT("Ctrl+Shift+C"));
735  c->AddItem(wxT("ExpandAllTracks"), _("E&xpand Collapsed Tracks"), FN(OnExpandAllTracks), wxT("Ctrl+Shift+X"));
736  c->EndSubMenu();
737 
738  c->BeginSubMenu(_("Sk&ip to"));
739  c->AddItem(wxT("SkipSelStart"), _("Selection Sta&rt"), FN(OnGoSelStart), wxT("Ctrl+["),
741  c->AddItem(wxT("SkipSelEnd"), _("Selection En&d"), FN(OnGoSelEnd), wxT("Ctrl+]"),
743  c->EndSubMenu();
744 
745  c->AddSeparator();
746 
747  // History window should be available either for UndoAvailableFlag or RedoAvailableFlag,
748  // but we can't make the AddItem flags and mask have both, because they'd both have to be true for the
749  // command to be enabled.
750  // If user has Undone the entire stack, RedoAvailableFlag is on but UndoAvailableFlag is off.
751  // If user has done things but not Undone anything, RedoAvailableFlag is off but UndoAvailableFlag is on.
752  // So in either of those cases, (AudioIONotBusyFlag | UndoAvailableFlag | RedoAvailableFlag) mask
753  // would fail.
754  // The only way to fix this in the current architecture is to hack in special cases for RedoAvailableFlag
755  // in AudacityProject::UpdateMenus() (ugly) and CommandManager::HandleCommandEntry() (*really* ugly --
756  // shouldn't know about particular command names and flags).
757  // Here's the hack that would be necessary in AudacityProject::UpdateMenus(), if somebody decides to do it:
758  // // Because EnableUsingFlags requires all the flag bits match the corresponding mask bits,
759  // // "UndoHistory" specifies only AudioIONotBusyFlag | UndoAvailableFlag, because that
760  // // covers the majority of cases where it should be enabled.
761  // // If history is not empty but we've Undone the whole stack, we also want to enable,
762  // // to show the Redo's on stack.
763  // // "UndoHistory" might already be enabled, but add this check for RedoAvailableFlag.
764  // if (flags & RedoAvailableFlag)
765  // mCommandManager.Enable(wxT("UndoHistory"), true);
766  // So for now, enable the command regardless of stack. It will just show empty sometimes.
767  // FOR REDESIGN, clearly there are some limitations with the flags/mask bitmaps.
768 
769  /* i18n-hint: Clicking this menu item shows the various editing steps that have been taken.*/
770  c->AddItem(wxT("UndoHistory"), _("&History..."), FN(OnHistory),
773 
774  c->AddItem(wxT("Karaoke"), _("&Karaoke..."), FN(OnKaraoke), LabelTracksExistFlag, LabelTracksExistFlag);
775  c->AddItem(wxT("MixerBoard"), _("&Mixer Board..."), FN(OnMixerBoard), PlayableTracksExistFlag, PlayableTracksExistFlag);
776 
777  c->AddSeparator();
778 
780 
781  c->BeginSubMenu(_("&Toolbars"));
782 
783  /* i18n-hint: (verb)*/
784  c->AddItem(wxT("ResetToolbars"), _("Reset Toolb&ars"), FN(OnResetToolBars), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
785  c->AddSeparator();
786 
787  /* i18n-hint: Clicking this menu item shows the toolbar with the big buttons on it (play record etc)*/
788  c->AddCheck(wxT("ShowTransportTB"), _("&Transport Toolbar"), FN(OnShowTransportToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
789  /* i18n-hint: Clicking this menu item shows a toolbar that has some tools in it*/
790  c->AddCheck(wxT("ShowToolsTB"), _("T&ools Toolbar"), FN(OnShowToolsToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
791  /* i18n-hint: Clicking this menu item shows the toolbar with the recording level meters*/
792  c->AddCheck(wxT("ShowRecordMeterTB"), _("&Recording Meter Toolbar"), FN(OnShowRecordMeterToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
793  /* i18n-hint: Clicking this menu item shows the toolbar with the playback level meter*/
794  c->AddCheck(wxT("ShowPlayMeterTB"), _("&Playback Meter Toolbar"), FN(OnShowPlayMeterToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
795  /* --i18n-hint: Clicking this menu item shows the toolbar which has sound level meters*/
796  //c->AddCheck(wxT("ShowMeterTB"), _("Co&mbined Meter Toolbar"), FN(OnShowMeterToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
797  /* i18n-hint: Clicking this menu item shows the toolbar with the mixer*/
798  c->AddCheck(wxT("ShowMixerTB"), _("Mi&xer Toolbar"), FN(OnShowMixerToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
799  /* i18n-hint: Clicking this menu item shows the toolbar for editing*/
800  c->AddCheck(wxT("ShowEditTB"), _("&Edit Toolbar"), FN(OnShowEditToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
801  /* i18n-hint: Clicking this menu item shows the toolbar for transcription (currently just vary play speed)*/
802  c->AddCheck(wxT("ShowTranscriptionTB"), _("Tra&nscription Toolbar"), FN(OnShowTranscriptionToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
803  /* i18n-hint: Clicking this menu item shows the toolbar that enables Scrub or Seek playback and Scrub Ruler*/
804  c->AddCheck(wxT("ShowScrubbingTB"), _("Scru&b Toolbar"), FN(OnShowScrubbingToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
805  /* i18n-hint: Clicking this menu item shows the toolbar that manages devices*/
806  c->AddCheck(wxT("ShowDeviceTB"), _("&Device Toolbar"), FN(OnShowDeviceToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
807  /* i18n-hint: Clicking this menu item shows the toolbar for selecting a time range of audio*/
808  c->AddCheck(wxT("ShowSelectionTB"), _("&Selection Toolbar"), FN(OnShowSelectionToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
809 #ifdef EXPERIMENTAL_SPECTRAL_EDITING
810  /* i18n-hint: Clicking this menu item shows the toolbar for selecting a frequency range of audio*/
811  c->AddCheck(wxT("ShowSpectralSelectionTB"), _("Spe&ctral Selection Toolbar"), FN(OnShowSpectralSelectionToolBar), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
812 #endif
813 
814  c->EndSubMenu();
815 
816  c->AddSeparator();
817 
818  c->AddCheck(wxT("ShowExtraMenus"), _("&Extra Menus (on/off)"), FN(OnShowExtraMenus),
819  gPrefs->Read(wxT("/GUI/ShowExtraMenus"), 0L), AlwaysEnabledFlag, AlwaysEnabledFlag);
820  c->AddCheck(wxT("ShowClipping"), _("&Show Clipping (on/off)"), FN(OnShowClipping),
821  gPrefs->Read(wxT("/GUI/ShowClipping"), 0L), AlwaysEnabledFlag, AlwaysEnabledFlag);
822 #if defined(EXPERIMENTAL_EFFECTS_RACK)
823  c->AddCheck(wxT("ShowEffectsRack"), _("Show EffectsRack"), FN(OnShowEffectsRack), 0, AlwaysEnabledFlag, AlwaysEnabledFlag);
824 #endif
825 
826 
827  c->EndMenu();
828 
830  // Transport Menu
832 
833  /*i18n-hint: 'Transport' is the name given to the set of controls that
834  play, record, pause etc. */
835  c->BeginMenu(_("T&ransport"));
837  c->BeginSubMenu(_("Pl&ay"));
838  /* i18n-hint: (verb) Start or Stop audio playback*/
839  c->AddItem(wxT("PlayStop"), _("Pl&ay/Stop"), FN(OnPlayStop), wxT("Space"));
840  c->AddItem(wxT("PlayStopSelect"), _("Play/Stop and &Set Cursor"), FN(OnPlayStopSelect), wxT("X"));
841  c->AddItem(wxT("PlayLooped"), _("&Loop Play"), FN(OnPlayLooped), wxT("Shift+Space"),
844  c->AddItem(wxT("Pause"), _("&Pause"), FN(OnPause), wxT("P"));
845  c->EndSubMenu();
846 
847  c->BeginSubMenu( _("&Record"));
850  /* i18n-hint: (verb)*/
851  c->AddItem(wxT("Record1stChoice"), _("&Record"), FN(OnRecord), wxT("R"));
852  // The OnRecord2ndChoice function is: if normal record records beside,
853  // it records below, if normal record records below, it records beside.
854  // TODO: Do 'the right thing' with other options like TimerRecord.
855  bool bPreferNewTrack;
856  gPrefs->Read("/GUI/PreferNewTrackRecord",&bPreferNewTrack, false);
857  c->AddItem( wxT("Record2ndChoice"),
858  // Our first choice is bound to R (by default) and gets the prime position.
859  // We supply the name for the 'other one' here. It should be bound to Shift+R
860  bPreferNewTrack ? _("&Append Record") : _("Record &New Track"),
862  wxT("Shift+R")
863  );
864 
865  c->AddItem(wxT("TimerRecord"), _("&Timer Record..."), FN(OnTimerRecord), wxT("Shift+T"));
866  // JKC: I decided to duplicate this between play and record, rather than put it
867  // at the top level. AddItem can now cope with simple duplicated items.
868  // PRL: This second registration of wxT("Pause"), with unspecified flags,
869  // in fact will use the same flags as in the previous registration.
870  c->AddItem(wxT("Pause"), _("&Pause"), FN(OnPause), wxT("P"));
871  c->EndSubMenu();
872 
873  // Scrubbing sub-menu
875 
876  // JKC: ANSWER-ME: How is 'cursor to' different to 'Skip To' and how is it useful?
877  // GA: 'Skip to' moves the viewpoint to center of the track and preserves the
878  // selection. 'Cursor to' does neither. 'Center at' might describe it better than 'Skip'.
879  c->BeginSubMenu(_("&Cursor to"));
880 
881  c->AddItem(wxT("CursSelStart"), _("Selection Star&t"), FN(OnCursorSelStart),
883  c->AddItem(wxT("CursSelEnd"), _("Selection En&d"), FN(OnCursorSelEnd),
885 
886  // PRL: I thought these two should require TracksSelectedFlag but there
887  // was complaint about an unhelpful error message
888  c->AddItem(wxT("CursTrackStart"), _("Track &Start"), FN(OnCursorTrackStart), wxT("J"),
890  c->AddItem(wxT("CursTrackEnd"), _("Track &End"), FN(OnCursorTrackEnd), wxT("K"),
892 
893  c->AddItem(wxT("CursPrevClipBoundary"), _("Pre&vious Clip Boundary"), FN(OnCursorPrevClipBoundary), wxT(""),
895  c->AddItem(wxT("CursNextClipBoundary"), _("Ne&xt Clip Boundary"), FN(OnCursorNextClipBoundary), wxT(""),
897 
898  c->AddItem(wxT("CursProjectStart"), _("&Project Start"), FN(OnSkipStart), wxT("Home"));
899  c->AddItem(wxT("CursProjectEnd"), _("Project E&nd"), FN(OnSkipEnd), wxT("End"));
900 
901  c->EndSubMenu();
902 
903  c->AddSeparator();
904 
906 
907  c->BeginSubMenu(_("Pla&y Region"));
908 
909  c->AddItem(wxT("LockPlayRegion"), _("&Lock"), FN(OnLockPlayRegion),
912  c->AddItem(wxT("UnlockPlayRegion"), _("&Unlock"), FN(OnUnlockPlayRegion),
915 
916  c->EndSubMenu();
917 
918  c->AddSeparator();
919 
920  c->AddItem(wxT("RescanDevices"), _("R&escan Audio Devices"), FN(OnRescanDevices),
923 
924  c->BeginSubMenu(_("Transport &Options"));
925  // Sound Activated recording options
926  c->AddItem(wxT("SoundActivationLevel"), _("Sound Activation Le&vel..."), FN(OnSoundActivated),
929  c->AddCheck(wxT("SoundActivation"), _("Sound A&ctivated Recording (on/off)"), FN(OnToggleSoundActivated), 0,
932  c->AddSeparator();
933 
934  c->AddCheck(wxT("PinnedHead"), _("Pinned Play/Record &Head (on/off)"),
936  // Switching of scrolling on and off is permitted even during transport
938 
939  c->AddCheck(wxT("Duplex"), _("&Overdub (on/off)"), FN(OnTogglePlayRecording), 0,
942  c->AddCheck(wxT("SWPlaythrough"), _("So&ftware Playthrough (on/off)"), FN(OnToggleSWPlaythrough), 0,
945 
946 
947 #ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT
948  c->AddCheck(wxT("AutomatedInputLevelAdjustmentOnOff"), _("A&utomated Recording Level Adjustment (on/off)"), FN(OnToggleAutomatedInputLevelAdjustment), 0,
951 #endif
952  c->EndSubMenu();
953 
954  c->EndMenu();
955 
957  // Tracks Menu (formerly Project Menu)
959 
960  c->BeginMenu(_("&Tracks"));
962 
964 
965  c->BeginSubMenu(_("Add &New"));
966 
967  c->AddItem(wxT("NewMonoTrack"), _("&Mono Track"), FN(OnNewWaveTrack), wxT("Ctrl+Shift+N"));
968  c->AddItem(wxT("NewStereoTrack"), _("&Stereo Track"), FN(OnNewStereoTrack));
969  c->AddItem(wxT("NewLabelTrack"), _("&Label Track"), FN(OnNewLabelTrack));
970  c->AddItem(wxT("NewTimeTrack"), _("&Time Track"), FN(OnNewTimeTrack));
971 
972  c->EndSubMenu();
973 
975 
976  c->AddSeparator();
977 
978  c->BeginSubMenu(_("Mi&x") );
979  {
980  // Stereo to Mono is an oddball command that is also subject to control by the
981  // plug-in manager, as if an effect. Decide whether to show or hide it.
982  const PluginID ID = EffectManager::Get().GetEffectByIdentifier(wxT("StereoToMono"));
983  const PluginDescriptor *plug = PluginManager::Get().GetPlugin(ID);
984  if (plug && plug->IsEnabled())
985  c->AddItem(wxT("Stereo to Mono"), _("Mix Stereo down to &Mono"), FN(OnStereoToMono),
988  }
989  c->AddItem(wxT("MixAndRender"), _("Mi&x and Render"), FN(OnMixAndRender),
992  c->AddItem(wxT("MixAndRenderToNewTrack"), _("Mix and Render to Ne&w Track"), FN(OnMixAndRenderToNewTrack), wxT("Ctrl+Shift+M"),
995  c->EndSubMenu();
996 
997  c->AddItem(wxT("Resample"), _("&Resample..."), FN(OnResample),
1000 
1001  c->AddSeparator();
1002 
1003  c->AddItem(wxT("RemoveTracks"), _("Remo&ve Tracks"), FN(OnRemoveTracks),
1006 
1007  c->AddSeparator();
1008 
1009  c->BeginSubMenu(_("M&ute/Unmute"));
1010  c->AddItem(wxT("MuteAllTracks"), _("&Mute All Tracks"), FN(OnMuteAllTracks), wxT("Ctrl+U"));
1011  c->AddItem(wxT("UnMuteAllTracks"), _("&Unmute All Tracks"), FN(OnUnMuteAllTracks), wxT("Ctrl+Shift+U"));
1012  c->EndSubMenu();
1013 
1014  c->BeginSubMenu(_("&Pan"));
1015  c->AddItem(wxT("PanLeft"), _("&Left"), FN(OnPanLeft));
1016  c->AddItem(wxT("PanRight"), _("&Right"), FN(OnPanRight));
1017  c->AddItem(wxT("PanCenter"), _("&Center"), FN(OnPanCenter));
1018  c->EndSubMenu();
1019 
1020 
1021  c->AddSeparator();
1022 
1024 
1025  wxArrayString alignLabelsNoSync;
1026  alignLabelsNoSync.Add(_("&Align End to End"));
1027  alignLabelsNoSync.Add(_("Align &Together"));
1028 
1029  wxArrayString alignLabels;
1030  alignLabels.Add(_("Start to &Zero"));
1031  alignLabels.Add(_("Start to &Cursor/Selection Start"));
1032  alignLabels.Add(_("Start to Selection &End"));
1033  alignLabels.Add(_("End to Cu&rsor/Selection Start"));
1034  alignLabels.Add(_("End to Selection En&d"));
1035  mAlignLabelsCount = alignLabels.GetCount();
1036 
1037  // Calling c->SetCommandFlags() after AddItemList for "Align" and "AlignMove"
1038  // does not correctly set flags for submenus, so do it this way.
1041 
1042  c->BeginSubMenu(_("&Align Tracks"));
1043 
1044  //c->BeginSubMenu(_("Just Move Tracks"));
1045  c->AddItemList(wxT("Align"), alignLabelsNoSync, FN(OnAlignNoSync));
1046  c->AddSeparator();
1047  c->AddItemList(wxT("Align"), alignLabels, FN(OnAlign));
1048  c->AddSeparator();
1049  c->AddCheck(wxT("MoveSelectionWithTracks"), _("&Move Selection with Tracks (on/off)"),
1051  gPrefs->Read(wxT("/GUI/MoveSelectionWithTracks"), 0L),
1053  c->EndSubMenu();
1054 
1055 #if 0
1056  // TODO: Can these labels be made clearer? Do we need this sub-menu at all?
1057  c->BeginSubMenu(_("Move Sele&ction and Tracks"));
1058 
1059  c->AddItemList(wxT("AlignMove"), alignLabels, FN(OnAlignMoveSel));
1060  c->SetCommandFlags(wxT("AlignMove"),
1063 
1064  c->EndSubMenu();
1065 #endif
1066 
1068 
1069 
1071 
1072 #ifdef EXPERIMENTAL_SCOREALIGN
1073  c->AddItem(wxT("ScoreAlign"), _("Synchronize MIDI with Audio"), FN(OnScoreAlign),
1076 #endif // EXPERIMENTAL_SCOREALIGN
1077 
1079 
1080  c->BeginSubMenu(_("S&ort Tracks"));
1081 
1082  c->AddItem(wxT("SortByTime"), _("by &Start time"), FN(OnSortTime),
1084  TracksExistFlag);
1085  c->AddItem(wxT("SortByName"), _("by &Name"), FN(OnSortName),
1087  TracksExistFlag);
1088 
1089  c->EndSubMenu();
1090 
1092 
1093 #ifdef EXPERIMENTAL_SYNC_LOCK
1094  c->AddSeparator();
1095  c->AddCheck(wxT("SyncLock"), _("Sync-&Lock Tracks (on/off)"), FN(OnSyncLock),
1096  gPrefs->Read(wxT("/GUI/SyncLockTracks"), 0L),
1098 
1099 #endif
1100 
1101  c->EndMenu();
1102 
1103  // All of this is a bit hacky until we can get more things connected into
1104  // the plugin manager...sorry! :-(
1105 
1106  wxArrayString defaults;
1107 
1109  // Generate Menu
1111 
1112  c->BeginMenu(_("&Generate"));
1114 
1115 #ifdef EXPERIMENTAL_EFFECT_MANAGEMENT
1116  c->AddItem(wxT("ManageGenerators"), _("Add / Remove Plug-ins..."), FN(OnManageGenerators));
1117  c->AddSeparator();
1118 #endif
1119 
1120 
1122  EffectTypeGenerate,
1125 
1126  c->EndMenu();
1127 
1129  // Effect Menu
1131 
1132  c->BeginMenu(_("Effe&ct"));
1133 
1134  wxString buildMenuLabel;
1135  if (!mLastEffect.IsEmpty()) {
1136  buildMenuLabel.Printf(_("Repeat %s"),
1137  EffectManager::Get().GetEffectName(mLastEffect));
1138  }
1139  else
1140  buildMenuLabel = _("Repeat Last Effect");
1141 
1142 #ifdef EXPERIMENTAL_EFFECT_MANAGEMENT
1143  c->AddItem(wxT("ManageEffects"), _("Add / Remove Plug-ins..."), FN(OnManageEffects));
1144  c->AddSeparator();
1145 #endif
1146 
1147  c->AddItem(wxT("RepeatLastEffect"), buildMenuLabel, FN(OnRepeatLastEffect), wxT("Ctrl+R"),
1150 
1151  c->AddSeparator();
1152 
1154  EffectTypeProcess,
1157 
1158  c->EndMenu();
1159 
1161  // Analyze Menu
1163 
1164  c->BeginMenu(_("&Analyze"));
1165 
1166 #ifdef EXPERIMENTAL_EFFECT_MANAGEMENT
1167  c->AddItem(wxT("ManageAnalyzers"), _("Add / Remove Plug-ins..."), FN(OnManageAnalyzers));
1168  c->AddSeparator();
1169 #endif
1170 
1171 
1172  c->AddItem(wxT("ContrastAnalyser"), _("Contrast..."), FN(OnContrast), wxT("Ctrl+Shift+T"),
1175  c->AddItem(wxT("PlotSpectrum"), _("Plot Spectrum..."), FN(OnPlotSpectrum),
1178 
1180  EffectTypeAnalyze,
1183 
1184  c->EndMenu();
1185 
1186 #ifdef __WXMAC__
1187  // poor imitation of the Mac Windows Menu
1190 
1191  {
1192  c->BeginMenu(_("&Window"));
1193  /* i18n-hint: Standard Macintosh Window menu item: Make (the current
1194  * window) shrink to an icon on the dock */
1195  c->AddItem(wxT("MacMinimize"), _("&Minimize"), FN(OnMacMinimize),
1196  wxT("Ctrl+M"), NotMinimizedFlag, NotMinimizedFlag);
1197  /* i18n-hint: Standard Macintosh Window menu item: Make (the current
1198  * window) full sized */
1199  c->AddItem(wxT("MacZoom"), _("&Zoom"), FN(OnMacZoom),
1201  c->AddSeparator();
1202  /* i18n-hint: Standard Macintosh Window menu item: Make all project
1203  * windows un-hidden */
1204  c->AddItem(wxT("MacBringAllToFront"),
1205  _("&Bring All to Front"), FN(OnMacBringAllToFront),
1207  c->EndMenu();
1208  }
1209 #endif
1210 
1212  // Help Menu
1214 
1215 #ifdef __WXMAC__
1216  wxGetApp().s_macHelpMenuTitleName = _("&Help");
1217 #endif
1218 
1219  c->BeginMenu(_("&Help"));
1221 
1222 // DA: Emphasise it is the Audacity Manual (No separate DA manual).
1223 #ifdef EXPERIMENTAL_DA
1224  // 'Getting Started' rather than 'Quick Help' for DarkAudacity.
1225  // At the moment the video tutorials are aspirational (aka do not exist yet).
1226  // Emphasise that manual is for Audacity, not DarkAudacity.
1227  c->AddItem(wxT("QuickHelp"), _("&Getting Started"), FN(OnQuickHelp));
1228  c->AddItem(wxT("Manual"), wxT("Audacity &Manual"), FN(OnManual));
1229 #else
1230  c->AddItem(wxT("QuickHelp"), _("&Quick Help"), FN(OnQuickHelp));
1231  c->AddItem(wxT("Manual"), _("&Manual"), FN(OnManual));
1232 #endif
1233 
1234 
1235  c->AddSeparator();
1236 
1237  c->BeginSubMenu( _("&Tools") );
1238 
1239 #ifdef IS_ALPHA
1240  c->AddCheck(wxT("SimulateRecordingErrors"),
1241  _("Simulate Recording Errors"),
1244  c->AddCheck(wxT("DetectUpstreamDropouts"),
1245  _("Detect Upstream Dropouts"),
1248 #endif
1249 
1250  c->AddItem(wxT("Screenshot"), _("&Screenshot Tools..."), FN(OnScreenshot));
1251 
1252 // PRL: team consensus for 2.2.0 was, we let end users have this diagnostic,
1253 // as they used to in 1.3.x
1254 //#ifdef IS_ALPHA
1255  // TODO: What should we do here? Make benchmark a plug-in?
1256  // Easy enough to do. We'd call it mod-self-test.
1257 
1258  c->AddItem(wxT("Benchmark"), _("&Run Benchmark..."), FN(OnBenchmark));
1259 //#endif
1260 
1261  c->EndSubMenu();
1262  c->AddSeparator();
1263 
1264  c->BeginSubMenu(_("&Diagnostics"));
1265  c->AddItem(wxT("DeviceInfo"), _("Au&dio Device Info..."), FN(OnAudioDeviceInfo),
1268 #ifdef EXPERIMENTAL_MIDI_OUT
1269  c->AddItem(wxT("MidiDeviceInfo"), _("&MIDI Device Info..."), FN(OnMidiDeviceInfo),
1272 #endif
1273 
1274  c->AddItem(wxT("Log"), _("Show &Log..."), FN(OnShowLog));
1275 
1276 #if defined(EXPERIMENTAL_CRASH_REPORT)
1277  c->AddItem(wxT("CrashReport"), _("&Generate Support Data..."), FN(OnCrashReport));
1278 #endif
1279  c->AddItem(wxT("CheckDeps"), _("Chec&k Dependencies..."), FN(OnCheckDependencies),
1281  c->EndSubMenu();
1282 
1283 #ifndef __WXMAC__
1284  c->AddSeparator();
1285 #endif
1286 
1287 // DA: Does not fully support update checking.
1288 #ifndef EXPERIMENTAL_DA
1289  c->AddItem(wxT("Updates"), _("&Check for Updates..."), FN(OnCheckForUpdates));
1290 #endif
1291  c->AddItem(wxT("About"), _("&About Audacity..."), FN(OnAbout));
1292 
1293  c->EndMenu();
1294 
1296 
1297 
1299 
1300  bool bShowExtraMenus;
1301  gPrefs->Read(wxT("/GUI/ShowExtraMenus"), &bShowExtraMenus, false);
1302  std::unique_ptr<wxMenuBar> menubar2;
1303  if( !bShowExtraMenus )
1304  {
1305  menubar2 = c->AddMenuBar(wxT("ext-menu"));
1306  c->SetOccultCommands(true);
1307  }
1308 
1310  // Ext-Menu
1312 
1313  // i18n-hint: Extra is a menu with extra commands
1314  c->BeginMenu(_("E&xtra"));
1315 
1317 
1319  c->BeginSubMenu(_("T&ransport"));
1320 
1321  // PlayStop is already in the menus.
1322  /* i18n-hint: (verb) Start playing audio*/
1323  c->AddItem(wxT("Play"), _("Pl&ay"), FN(OnPlayStop),
1326  /* i18n-hint: (verb) Stop playing audio*/
1327  c->AddItem(wxT("Stop"), _("Sto&p"), FN(OnStop),
1328  AudioIOBusyFlag | CanStopAudioStreamFlag,
1329  AudioIOBusyFlag | CanStopAudioStreamFlag);
1330 
1332 
1333  c->AddItem(wxT("PlayOneSec"), _("Play &One Second"), FN(OnPlayOneSecond), wxT("1"),
1336  c->AddItem(wxT("PlayToSelection"), _("Play To &Selection"), FN(OnPlayToSelection), wxT("B"),
1339  c->AddItem(wxT("PlayBeforeSelectionStart"), _("Play &Before Selection Start"), FN(OnPlayBeforeSelectionStart), wxT("Shift+F5"));
1340  c->AddItem(wxT("PlayAfterSelectionStart"), _("Play Af&ter Selection Start"), FN(OnPlayAfterSelectionStart), wxT("Shift+F6"));
1341  c->AddItem(wxT("PlayBeforeSelectionEnd"), _("Play Be&fore Selection End"), FN(OnPlayBeforeSelectionEnd), wxT("Shift+F7"));
1342  c->AddItem(wxT("PlayAfterSelectionEnd"), _("Play Aft&er Selection End"), FN(OnPlayAfterSelectionEnd), wxT("Shift+F8"));
1343  c->AddItem(wxT("PlayBeforeAndAfterSelectionStart"), _("Play Before a&nd After Selection Start"), FN(OnPlayBeforeAndAfterSelectionStart), wxT("Ctrl+Shift+F5"));
1344  c->AddItem(wxT("PlayBeforeAndAfterSelectionEnd"), _("Play Before an&d After Selection End"), FN(OnPlayBeforeAndAfterSelectionEnd), wxT("Ctrl+Shift+F7"));
1345  c->AddItem(wxT("PlayCutPreview"), _("Play C&ut Preview"), FN(OnPlayCutPreview), wxT("C"),
1348  c->EndSubMenu();
1349 
1351 
1353  c->BeginSubMenu(_("T&ools"));
1354 
1355  c->AddItem(wxT("SelectTool"), _("&Selection Tool"), FN(OnSelectTool), wxT("F1"));
1356  c->AddItem(wxT("EnvelopeTool"), _("&Envelope Tool"), FN(OnEnvelopeTool), wxT("F2"));
1357  c->AddItem(wxT("DrawTool"), _("&Draw Tool"), FN(OnDrawTool), wxT("F3"));
1358  c->AddItem(wxT("ZoomTool"), _("&Zoom Tool"), FN(OnZoomTool), wxT("F4"));
1359  c->AddItem(wxT("TimeShiftTool"), _("&Time Shift Tool"), FN(OnTimeShiftTool), wxT("F5"));
1360  c->AddItem(wxT("MultiTool"), _("&Multi Tool"), FN(OnMultiTool), wxT("F6"));
1361 
1362  c->AddItem(wxT("PrevTool"), _("&Previous Tool"), FN(OnPrevTool), wxT("A"));
1363  c->AddItem(wxT("NextTool"), _("&Next Tool"), FN(OnNextTool), wxT("D"));
1364  c->EndSubMenu();
1365 
1367 
1369  c->BeginSubMenu(_("Mi&xer"));
1370 
1371  c->AddItem(wxT("OutputGain"), _("Ad&just playback volume"), FN(OnOutputGain));
1372  c->AddItem(wxT("OutputGainInc"), _("&Increase playback volume"), FN(OnOutputGainInc));
1373  c->AddItem(wxT("OutputGainDec"), _("&Decrease playback volume"), FN(OnOutputGainDec));
1374  c->AddItem(wxT("InputGain"), _("Adj&ust recording volume"), FN(OnInputGain));
1375  c->AddItem(wxT("InputGainInc"), _("I&ncrease recording volume"), FN(OnInputGainInc));
1376  c->AddItem(wxT("InputGainDec"), _("D&ecrease recording volume"), FN(OnInputGainDec));
1377  c->EndSubMenu();
1378 
1380 
1382  c->BeginSubMenu(_("&Edit"));
1383 
1384  c->AddItem(wxT("DeleteKey"), _("&DeleteKey"), FN(OnDelete), wxT("Backspace"),
1387 
1388  c->AddItem(wxT("DeleteKey2"), _("DeleteKey&2"), FN(OnDelete), wxT("Delete"),
1391  c->EndSubMenu();
1392 
1394 
1396  c->BeginSubMenu(_("Transcri&ption"));
1397 
1398  c->AddItem(wxT("PlayAtSpeed"), _("Pl&ay-at-Speed"), FN(OnPlayAtSpeed));
1399  c->AddItem(wxT("PlayAtSpeedLooped"), _("&Loop Play-at-Speed"), FN(OnPlayAtSpeedLooped));
1400  c->AddItem(wxT("PlayAtSpeedCutPreview"), _("Play C&ut Preview-at-Speed"), FN(OnPlayAtSpeedCutPreview));
1401  c->AddItem(wxT("SetPlaySpeed"), _("Ad&just playback speed"), FN(OnSetPlaySpeed));
1402  c->AddItem(wxT("PlaySpeedInc"), _("&Increase playback speed"), FN(OnPlaySpeedInc));
1403  c->AddItem(wxT("PlaySpeedDec"), _("&Decrease playback speed"), FN(OnPlaySpeedDec));
1404 
1405  // These were on the original transcription toolbar. But they are not on the
1406  // shortened one.
1407  c->AddItem(wxT("MoveToPrevLabel"), _("Move to &Previous Label"), FN(OnMoveToPrevLabel), wxT("Alt+Left"),
1409  c->AddItem(wxT("MoveToNextLabel"), _("Move to &Next Label"), FN(OnMoveToNextLabel), wxT("Alt+Right"),
1411  c->EndSubMenu();
1412 
1414 
1415  c->SetDefaultFlags(AudioIOBusyFlag, AudioIOBusyFlag);
1416  c->BeginSubMenu(_("See&k"));
1417 
1418  c->AddItem(wxT("SeekLeftShort"), _("Short seek &left during playback"), FN(OnSeekLeftShort), wxT("Left\tallowDup"));
1419  c->AddItem(wxT("SeekRightShort"), _("Short seek &right during playback"), FN(OnSeekRightShort), wxT("Right\tallowDup"));
1420  c->AddItem(wxT("SeekLeftLong"), _("Long seek le&ft during playback"), FN(OnSeekLeftLong), wxT("Shift+Left\tallowDup"));
1421  c->AddItem(wxT("SeekRightLong"), _("Long Seek rig&ht during playback"), FN(OnSeekRightLong), wxT("Shift+Right\tallowDup"));
1422  c->EndSubMenu();
1423 
1425 
1427  c->BeginSubMenu(_("De&vice"));
1428 
1429  c->AddItem(wxT("InputDevice"), _("Change &recording device"), FN(OnInputDevice), wxT("Shift+I"),
1432  c->AddItem(wxT("OutputDevice"), _("Change &playback device"), FN(OnOutputDevice), wxT("Shift+O"),
1435  c->AddItem(wxT("AudioHost"), _("Change audio &host"), FN(OnAudioHost), wxT("Shift+H"),
1438  c->AddItem(wxT("InputChannels"), _("Change recording cha&nnels"), FN(OnInputChannels), wxT("Shift+N"),
1441  c->EndSubMenu();
1442 
1444 
1446  c->BeginSubMenu(_("&Selection"));
1447 
1448  c->AddItem(wxT("SnapToOff"), _("Snap To &Off"), FN(OnSnapToOff));
1449  c->AddItem(wxT("SnapToNearest"), _("Snap To &Nearest"), FN(OnSnapToNearest));
1450  c->AddItem(wxT("SnapToPrior"), _("Snap To &Prior"), FN(OnSnapToPrior));
1451 
1452  c->AddItem(wxT("SelStart"), _("Selection to &Start"), FN(OnSelToStart), wxT("Shift+Home"));
1453  c->AddItem(wxT("SelEnd"), _("Selection to En&d"), FN(OnSelToEnd), wxT("Shift+End"));
1454  c->AddItem(wxT("SelExtLeft"), _("Selection Extend &Left"), FN(OnSelExtendLeft), wxT("Shift+Left\twantKeyup\tallowDup"),
1457  c->AddItem(wxT("SelExtRight"), _("Selection Extend &Right"), FN(OnSelExtendRight), wxT("Shift+Right\twantKeyup\tallowDup"),
1460 
1461  c->AddItem(wxT("SelSetExtLeft"), _("Set (or Extend) Le&ft Selection"), FN(OnSelSetExtendLeft),
1464  c->AddItem(wxT("SelSetExtRight"), _("Set (or Extend) Rig&ht Selection"), FN(OnSelSetExtendRight),
1467 
1468  c->AddItem(wxT("SelCntrLeft"), _("Selection Contract L&eft"), FN(OnSelContractLeft), wxT("Ctrl+Shift+Right\twantKeyup"),
1471  c->AddItem(wxT("SelCntrRight"), _("Selection Contract R&ight"), FN(OnSelContractRight), wxT("Ctrl+Shift+Left\twantKeyup"),
1474 
1475  c->EndSubMenu();
1476 
1477 
1479  c->AddSeparator();
1480 
1481  c->AddGlobalCommand(wxT("PrevWindow"), _("Move backward thru active windows"), FN(PrevWindow), wxT("Alt+Shift+F6"));
1482  c->AddGlobalCommand(wxT("NextWindow"), _("Move forward thru active windows"), FN(NextWindow), wxT("Alt+F6"));
1483 
1485 
1487  c->BeginSubMenu(_("F&ocus"));
1488 
1489  c->AddItem(wxT("PrevFrame"), _("Move &backward from toolbars to tracks"), FN(PrevFrame), wxT("Ctrl+Shift+F6"));
1490  c->AddItem(wxT("NextFrame"), _("Move f&orward from toolbars to tracks"), FN(NextFrame), wxT("Ctrl+F6"));
1491 
1494  c->AddItem(wxT("PrevTrack"), _("Move Focus to &Previous Track"), FN(OnCursorUp), wxT("Up"));
1495  c->AddItem(wxT("NextTrack"), _("Move Focus to &Next Track"), FN(OnCursorDown), wxT("Down"));
1496  c->AddItem(wxT("FirstTrack"), _("Move Focus to &First Track"), FN(OnFirstTrack), wxT("Ctrl+Home"));
1497  c->AddItem(wxT("LastTrack"), _("Move Focus to &Last Track"), FN(OnLastTrack), wxT("Ctrl+End"));
1498 
1499  c->AddItem(wxT("ShiftUp"), _("Move Focus to P&revious and Select"), FN(OnShiftUp), wxT("Shift+Up"));
1500  c->AddItem(wxT("ShiftDown"), _("Move Focus to N&ext and Select"), FN(OnShiftDown), wxT("Shift+Down"));
1501 
1502  c->AddItem(wxT("Toggle"), _("&Toggle Focused Track"), FN(OnToggle), wxT("Return"));
1503  c->AddItem(wxT("ToggleAlt"), _("Toggle Focuse&d Track"), FN(OnToggle), wxT("NUMPAD_ENTER"));
1504  c->EndSubMenu();
1505 
1507 
1509  c->BeginSubMenu(_("&Cursor"));
1510 
1511  c->AddItem(wxT("CursorLeft"), _("Cursor &Left"), FN(OnCursorLeft), wxT("Left\twantKeyup\tallowDup"),
1514  c->AddItem(wxT("CursorRight"), _("Cursor &Right"), FN(OnCursorRight), wxT("Right\twantKeyup\tallowDup"),
1517  c->AddItem(wxT("CursorShortJumpLeft"), _("Cursor Sh&ort Jump Left"), FN(OnCursorShortJumpLeft), wxT(","),
1520  c->AddItem(wxT("CursorShortJumpRight"), _("Cursor Shor&t Jump Right"), FN(OnCursorShortJumpRight), wxT("."),
1523  c->AddItem(wxT("CursorLongJumpLeft"), _("Cursor Long J&ump Left"), FN(OnCursorLongJumpLeft), wxT("Shift+,"),
1526  c->AddItem(wxT("CursorLongJumpRight"), _("Cursor Long Ju&mp Right"), FN(OnCursorLongJumpRight), wxT("Shift+."),
1529 
1530  c->AddItem(wxT("ClipLeft"), _("Clip L&eft"), FN(OnClipLeft), wxT("\twantKeyup"),
1533  c->AddItem(wxT("ClipRight"), _("Clip Rig&ht"), FN(OnClipRight), wxT("\twantKeyup"),
1536  c->EndSubMenu();
1537 
1539 
1541  c->BeginSubMenu(_("&Track"));
1542 
1543  c->AddItem(wxT("TrackPan"), _("Change p&an on focused track"), FN(OnTrackPan), wxT("Shift+P"),
1546  c->AddItem(wxT("TrackPanLeft"), _("Pan &left on focused track"), FN(OnTrackPanLeft), wxT("Alt+Shift+Left"),
1549  c->AddItem(wxT("TrackPanRight"), _("Pan &right on focused track"), FN(OnTrackPanRight), wxT("Alt+Shift+Right"),
1552  c->AddItem(wxT("TrackGain"), _("Change gai&n on focused track"), FN(OnTrackGain), wxT("Shift+G"),
1555  c->AddItem(wxT("TrackGainInc"), _("&Increase gain on focused track"), FN(OnTrackGainInc), wxT("Alt+Shift+Up"),
1558  c->AddItem(wxT("TrackGainDec"), _("&Decrease gain on focused track"), FN(OnTrackGainDec), wxT("Alt+Shift+Down"),
1561  c->AddItem(wxT("TrackMenu"), _("Op&en menu on focused track"), FN(OnTrackMenu), wxT("Shift+M\tskipKeydown"),
1564  c->AddItem(wxT("TrackMute"), _("M&ute/Unmute focused track"), FN(OnTrackMute), wxT("Shift+U"),
1567  c->AddItem(wxT("TrackSolo"), _("&Solo/Unsolo focused track"), FN(OnTrackSolo), wxT("Shift+S"),
1570  c->AddItem(wxT("TrackClose"), _("&Close focused track"), FN(OnTrackClose), wxT("Shift+C"),
1573  c->AddItem(wxT("TrackMoveUp"), _("Move focused track u&p"), FN(OnTrackMoveUp),
1576  c->AddItem(wxT("TrackMoveDown"), _("Move focused track do&wn"), FN(OnTrackMoveDown),
1579  c->AddItem(wxT("TrackMoveTop"), _("Move focused track to t&op"), FN(OnTrackMoveTop),
1582  c->AddItem(wxT("TrackMoveBottom"), _("Move focused track to &bottom"), FN(OnTrackMoveBottom),
1585  c->EndSubMenu();
1586 
1587  // Accel key is not bindable.
1588  c->AddItem(wxT("FullScreenOnOff"), _("&Full screen (on/off)"), FN(OnFullScreen),
1589 #ifdef __WXMAC__
1590  wxT("Ctrl+/"),
1591 #else
1592  wxT("F11"),
1593 #endif
1594  AlwaysEnabledFlag, AlwaysEnabledFlag,
1595  wxTopLevelWindow::IsFullScreen() ? 1:0); // Check Mark.
1596 
1597 #ifdef __WXMAC__
1598  /* i18n-hint: Shrink all project windows to icons on the Macintosh tooldock */
1599  c->AddItem(wxT("MacMinimizeAll"), _("Minimize all projects"),
1600  FN(OnMacMinimizeAll), wxT("Ctrl+Alt+M"),
1601  AlwaysEnabledFlag, AlwaysEnabledFlag);
1602 #endif
1603  c->EndMenu();
1604 
1605 
1606  SetMenuBar(menubar.release());
1607  // Bug 143 workaround.
1608  // The bug is in wxWidgets. For a menu that has scrollers, the
1609  // scrollers have an ID of 0 (not wxID_NONE which is -3).
1610  // Therefore wxWidgets attempts to find a help string. See
1611  // wxFrameBase::ShowMenuHelp(int menuId)
1612  // It finds a bogus automatic help string of "Recent &Files"
1613  // from that submenu.
1614  // So we set the help string for command with Id 0 to empty.
1615  mRecentFilesMenu->GetParent()->SetHelpString( 0, "" );
1616  }
1617 
1618 
1619 
1621 
1622 #if defined(__WXDEBUG__)
1623 // c->CheckDups();
1624 #endif
1625 }
void OnRedo(const CommandContext &context)
Definition: Menus.cpp:4825
void OnPlayToSelection(const CommandContext &context)
Definition: Menus.cpp:2505
void OnAudioHost(const CommandContext &context)
Definition: Menus.cpp:4108
void BeginMenu(const wxString &tName)
void OnImportMIDI(const CommandContext &context)
void OnPanCenter(const CommandContext &context)
Definition: Menus.cpp:8586
void OnShowDeviceToolBar(const CommandContext &context)
Definition: Menus.cpp:6740
void OnPlaySpeedDec(const CommandContext &context)
Definition: Menus.cpp:4212
static wxArrayString names()
Definition: Tags.cpp:697
void OnSelectionRestore(const CommandContext &context)
Definition: Menus.cpp:7114
void OnCopyLabels(const CommandContext &context)
Definition: Menus.cpp:5723
void OnManageGenerators(const CommandContext &context)
Definition: Menus.cpp:4481
void OnCursorSelStart(const CommandContext &context)
Definition: Menus.cpp:7182
void OnEnvelopeTool(const CommandContext &context)
Handler to set the Envelope tool active.
Definition: Menus.cpp:2401
void OnShiftUp(const CommandContext &context)
Definition: Menus.cpp:3390
void OnSelectPrevClip(const CommandContext &context)
Definition: Menus.cpp:6350
void OnPlayBeforeSelectionEnd(const CommandContext &context)
Definition: Menus.cpp:2572
void OnSelectSyncLockSel(const CommandContext &context)
Definition: Menus.cpp:6414
void OnSelectionSave(const CommandContext &context)
Definition: Menus.cpp:7103
wxMenu * mRecentFilesMenu
Definition: Project.h:608
void OnSelContractLeft(const CommandContext &context)
Definition: Menus.cpp:3492
void OnExit(const CommandContext &context)
Definition: Menus.cpp:4546
void OnMacMinimizeAll(const CommandContext &context)
Definition: MenusMac.cpp:53
wxMenu * BeginSubMenu(const wxString &tName)
void OnCutLabels(const CommandContext &context)
Definition: Menus.cpp:5678
void OnResample(const CommandContext &context)
Definition: Menus.cpp:8659
Scrubber & GetScrubber()
Definition: Project.h:785
void OnShiftDown(const CommandContext &context)
Definition: Menus.cpp:3395
void OnExportMultiple(const CommandContext &context)
Definition: Menus.cpp:4739
void OnGoSelStart(const CommandContext &context)
Definition: Menus.cpp:6630
void OnPreferences(const CommandContext &context)
Definition: Menus.cpp:4747
void OnZoomTool(const CommandContext &context)
Handler to set the Zoom tool active.
Definition: Menus.cpp:2395
void OnSetRightSelection(const CommandContext &context)
Definition: Menus.cpp:3656
void OnMacMinimize(const CommandContext &context)
Definition: MenusMac.cpp:48
void OnToggleSWPlaythrough(const CommandContext &context)
Definition: Menus.cpp:2860
void OnDrawTool(const CommandContext &context)
Definition: Menus.cpp:2412
void OnCursorDown(const CommandContext &context)
Definition: Menus.cpp:3353
void OnManual(const CommandContext &context)
Definition: Menus.cpp:8372
void OnPrint(const CommandContext &context)
Definition: Menus.cpp:4786
void OnZoomOut(const CommandContext &context)
Definition: Menus.cpp:6521
void OnInputGainDec(const CommandContext &context)
Definition: Menus.cpp:4164
void OnShowTransportToolBar(const CommandContext &context)
Definition: Menus.cpp:6734
void OnSplit(const CommandContext &context)
Definition: Menus.cpp:5836
void OnLockPlayRegion(const CommandContext &context)
Definition: Menus.cpp:8639
void OnToggle(const CommandContext &context)
Definition: Menus.cpp:3401
void OnUnMuteAllTracks(const CommandContext &context)
Definition: Menus.cpp:8614
std::unique_ptr< wxMenuBar > AddMenuBar(const wxString &sMenu)
void OnSelectAllTracks(const CommandContext &context)
Definition: Menus.cpp:5995
void OnTimerRecord(const CommandContext &context)
Definition: Menus.cpp:8063
void OnToggleSoundActivated(const CommandContext &context)
Definition: Menus.cpp:2817
void OnPlayOneSecond(const CommandContext &context)
Definition: Menus.cpp:2486
void OnSelSetExtendRight(const CommandContext &context)
Definition: Menus.cpp:3473
void OnDetectUpstreamDropouts(const CommandContext &context)
Definition: Menus.cpp:8424
void OnKaraoke(const CommandContext &context)
Definition: Menus.cpp:6674
bool mDetectUpstreamDropouts
Definition: AudioIO.h:816
void OnExportWav(const CommandContext &context)
Definition: Menus.cpp:4726
void OnCursorSelEnd(const CommandContext &context)
Definition: Menus.cpp:7190
void OnShowScrubbingToolBar(const CommandContext &context)
Definition: Menus.cpp:6789
const PluginID & GetEffectByIdentifier(const wxString &strTarget)
void OnPanLeft(const CommandContext &context)
Definition: Menus.cpp:8584
void OnShowPlayMeterToolBar(const CommandContext &context)
Definition: Menus.cpp:6773
void OnSkipEnd(const CommandContext &context)
Definition: Menus.cpp:3020
void OnUnlockPlayRegion(const CommandContext &context)
Definition: Menus.cpp:8653
void OnPlaySpeedInc(const CommandContext &context)
Definition: Menus.cpp:4204
void OnCollapseAllTracks(const CommandContext &context)
Definition: Menus.cpp:8523
void OnClipLeft(const CommandContext &context)
Definition: Menus.cpp:3599
void OnPlayAtSpeedLooped(const CommandContext &context)
Definition: Menus.cpp:4180
void OnSelectStartCursor(const CommandContext &context)
Definition: Menus.cpp:6123
void OnQuickHelp(const CommandContext &context)
Definition: Menus.cpp:8365
void OnImportRaw(const CommandContext &context)
Definition: Menus.cpp:6968