Audacity  2.2.0
Project.cpp File Reference

Implements AudacityProject, DropTarget, and FileObject.F Includes Menus.cpp. More...

#include "Audacity.h"
#include "Project.h"
#include <stdio.h>
#include <iostream>
#include <wx/wxprec.h>
#include <wx/apptrait.h>
#include <wx/defs.h>
#include <wx/app.h>
#include <wx/dc.h>
#include <wx/dcmemory.h>
#include <wx/dnd.h>
#include <wx/docview.h>
#include <wx/event.h>
#include <wx/ffile.h>
#include <wx/filedlg.h>
#include <wx/filefn.h>
#include <wx/filename.h>
#include <wx/intl.h>
#include <wx/log.h>
#include <wx/menu.h>
#include <wx/msgdlg.h>
#include <wx/notebook.h>
#include <wx/progdlg.h>
#include <wx/scrolbar.h>
#include <wx/sizer.h>
#include <wx/statusbr.h>
#include <wx/string.h>
#include <wx/textfile.h>
#include <wx/timer.h>
#include <wx/display.h>
#include <wx/arrimpl.cpp>
#include "AudacityException.h"
#include "FreqWindow.h"
#include "effects/Contrast.h"
#include "AutoRecovery.h"
#include "AudacityApp.h"
#include "AColor.h"
#include "AudioIO.h"
#include "Dependencies.h"
#include "Diags.h"
#include "HistoryWindow.h"
#include "Lyrics.h"
#include "LyricsWindow.h"
#include "MixerBoard.h"
#include "Internat.h"
#include "import/Import.h"
#include "LabelTrack.h"
#include "Legacy.h"
#include "Mix.h"
#include "NoteTrack.h"
#include "Prefs.h"
#include "Sequence.h"
#include "Snap.h"
#include "Tags.h"
#include "TimeTrack.h"
#include "TrackPanel.h"
#include "WaveTrack.h"
#include "DirManager.h"
#include "effects/Effect.h"
#include "prefs/PrefsDialog.h"
#include "widgets/LinkingHtmlWindow.h"
#include "widgets/ASlider.h"
#include "widgets/ErrorDialog.h"
#include "widgets/Ruler.h"
#include "widgets/Warning.h"
#include "xml/XMLFileReader.h"
#include "PlatformCompatibility.h"
#include "Experimental.h"
#include "export/Export.h"
#include "FileNames.h"
#include "BlockFile.h"
#include "ondemand/ODManager.h"
#include "ondemand/ODTask.h"
#include "ondemand/ODComputeSummaryTask.h"
#include "ModuleManager.h"
#include "Theme.h"
#include "AllThemeResources.h"
#include "FileDialog.h"
#include "UndoManager.h"
#include "toolbars/ToolManager.h"
#include "toolbars/ControlToolBar.h"
#include "toolbars/DeviceToolBar.h"
#include "toolbars/EditToolBar.h"
#include "toolbars/MeterToolBar.h"
#include "toolbars/MixerToolBar.h"
#include "toolbars/ScrubbingToolBar.h"
#include "toolbars/SelectionBar.h"
#include "toolbars/SpectralSelectionBar.h"
#include "toolbars/ToolsToolBar.h"
#include "toolbars/TranscriptionToolBar.h"
#include "tracks/ui/BackgroundCell.h"
#include "tracks/ui/EditCursorOverlay.h"
#include "tracks/ui/PlayIndicatorOverlay.h"
#include "tracks/ui/Scrubbing.h"
#include "commands/ScriptCommandRelay.h"
#include "commands/CommandDirectory.h"
#include "commands/CommandTargets.h"
#include "commands/Command.h"
#include "commands/CommandType.h"
#include "../images/AudacityLogoAlpha.xpm"

Classes

class  VarSetter< T >
 
class  ScrollBar
 
class  TitleRestorer
 

Enumerations

enum  { FirstID = 1000, HSBarID, VSBarID, TrackPanelID }
 

Functions

 DEFINE_EVENT_TYPE (EVT_CAPTURE_KEY)
 Custom events. More...
 
static void SetActiveProject (AudacityProject *project)
 
AUDACITY_DLL_API AudacityProjectGetActiveProject ()
 
AudacityProjectCreateNewAudacityProject ()
 
void RedrawAllProjects ()
 
void RefreshCursorForAllProjects ()
 
AUDACITY_DLL_API void CloseAllProjects ()
 
void GetDefaultWindowRect (wxRect *defRect)
 
bool IsWindowAccessible (wxRect *requestedRect)
 
int ScreenContaining (wxRect &r)
 
bool CornersOnScreen (wxRect &r)
 
void GetNextWindowPlacement (wxRect *nextRect, bool *pMaximized, bool *pIconized)
 
static wxString CreateUniqueName ()
 
static wxString gsLegacyFileWarning ()
 

Variables

const int sbarSpaceWidth = 15
 
const int sbarControlWidth = 15
 
const int sbarExtraLen = 0
 
const int sbarHjump = 30
 
static int gAudacityOffsetInc = 0
 
static int gAudacityPosInc = 0
 
static AudacityProjectgActiveProject
 
AProjectArray gAudacityProjects
 

Detailed Description

Implements AudacityProject, DropTarget, and FileObject.F Includes Menus.cpp.

Enumeration Type Documentation

anonymous enum
Enumerator
FirstID 
HSBarID 
VSBarID 
TrackPanelID 

Function Documentation

AUDACITY_DLL_API void CloseAllProjects ( )
bool CornersOnScreen ( wxRect &  r)

Referenced by GetNextWindowPlacement().

static wxString CreateUniqueName ( )
static
DEFINE_EVENT_TYPE ( EVT_CAPTURE_KEY  )

Custom events.

AUDACITY_DLL_API AudacityProject* GetActiveProject ( )

References gActiveProject.

Referenced by _(), Effect::Apply(), BatchCommands::ApplyChain(), BatchCommands::ApplyCommandInBatchMode(), BatchCommands::ApplyEffectCommand(), BatchCommands::ApplySpecialCommand(), audacityAudioCallback(), TrackSelectHandle::CalculateRearrangingThresholds(), ControlToolBar::CanStopAudioStream(), AudacityProject::CaptureKeyboard(), LabelTrack::Char(), TimeTrack::Clear(), WaveformPrefs::Commit(), KeyConfigPrefs::Commit(), ContrastDialog::ContrastDialog(), LabelTrack::DoCaptureKey(), Effect::Effect(), EffectUIHost::EffectUIHost(), DeviceToolBar::EnableDisableButtons(), ScrubbingToolBar::EnableDisableButtons(), TranscriptionToolBar::EnableDisableButtons(), ControlToolBar::EnableDisableButtons(), ExecCommand(), TimerRecordDialog::ExecutePostRecordActions(), CommandManagerEventMonitor::FilterEvent(), CommandManager::FilterKeyEvent(), EditToolBar::ForAllButtons(), FreqWindow::FreqWindow(), TrackInfo::GainSlider(), BatchCommands::GetAllCommands(), CommandManager::GetCategories(), ContrastDialog::GetDB(), BatchCommands::GetEndTime(), AudacityProject::GetKeyboardCaptureHandler(), CommandExecutionContext::GetProject(), TranscriptionToolBar::GetSamples(), Effect::GetSelectionFormat(), CommandManager::HandleCommandEntry(), AudacityProject::HandlePasteNothingSelected(), CommandManager::HandleTextualCommand(), Importer::Import(), EffectScienFilter::Init(), NyquistEffect::Init(), EffectEqualization::Init(), TrackMenuTable::InitMenu(), FormatMenuTable::InitMenu(), RateMenuTable::InitMenu(), WaveTrackMenuTable::InitMenu(), CommandManager::InsertItem(), BatchCommands::IsMono(), Track::IsSyncLockSelected(), LabelTrack::KeyDown(), AudacityApp::MRUOpen(), BatchProcessDialog::OnApplyToFiles(), TimerRecordDialog::OnAutoExportPathButton_Click(), TimerRecordDialog::OnAutoSavePathButton_Click(), ScrubbingToolBar::OnButton(), SelectionBar::OnButton(), EditToolBar::OnButton(), WaveTrackMenuTable::OnChannelChange(), LabelTrack::OnChar(), LabelTrack::OnContextMenu(), AudacityApp::OnExceptionInMainLoop(), ContrastDialog::OnExport(), ControlToolBar::OnFF(), FormatMenuTable::OnFormatChange(), ContrastDialog::OnGetBackground(), ContrastDialog::OnGetForeground(), AudacityApp::OnKeyDown(), LabelTrack::OnKeyDown(), ControlToolBar::OnKeyEvent(), Lyrics::OnKeyEvent(), MixerBoardFrame::OnKeyEvent(), WaveTrackMenuTable::OnMergeStereo(), Meter::OnMouse(), HighlightTextCtrl::OnMouseEvent(), AButton::OnMouseEvent(), LWSlider::OnMouseEvent(), TrackMenuTable::OnMoveTrack(), TimerRecordDialog::OnOK(), ControlToolBar::OnPause(), ControlToolBar::OnPlay(), Meter::OnPreferences(), CommandHandler::OnReceiveCommand(), ControlToolBar::OnRecord(), ControlToolBar::OnRewind(), LabelDialog::OnSelectCell(), TimeTrackMenuTable::OnSetTimeTrackRange(), MultiDialog::OnShowLog(), WaveTrackMenuTable::OnSpectrogramSettings(), SpectrumVRulerMenuTable::OnSpectrumScaleType(), WaveTrackMenuTable::OnSplitStereo(), WaveTrackMenuTable::OnSplitStereoMono(), ControlToolBar::OnStop(), WaveTrackMenuTable::OnSwapChannels(), AudacityApp::OnTimer(), TimeTrackMenuTable::OnTimeTrackLin(), TimeTrackMenuTable::OnTimeTrackLog(), TimeTrackMenuTable::OnTimeTrackLogInt(), AudacityProject::OnTogglePinnedHead(), ScreenFrame::OnUIUpdate(), WaveformVRulerMenuTable::OnWaveformScaleType(), WaveTrackVRulerMenuTable::OnZoomFitVertical(), WaveTrackVRulerMenuTable::OnZoomInVertical(), WaveTrackVRulerMenuTable::OnZoomOutVertical(), TrackInfo::PanSlider(), TimeTrack::Paste(), TranscriptionToolBar::PlayAtSpeed(), ControlToolBar::PlayCurrentRegion(), ControlToolBar::PlayPlayRegion(), KeyConfigPrefs::Populate(), EffectToneGen::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), POPUP_MENU_RADIO_ITEM(), TrackSelectHandle::Preview(), SpectrumPrefs::Preview(), EffectStereoToMono::Process(), Generator::Process(), NyquistEffect::Process(), EffectTruncSilence::ProcessIndependently(), EffectEqualization::ProcessOne(), Effect::ProcessTrack(), ScrubbingToolBar::RegenerateTooltips(), TrackSelectHandle::Release(), AudacityProject::ReleaseKeyboard(), SpectrumPrefs::Rollback(), TimerRecordDialog::RunWaitDialog(), EffectToneGen::SetAutomationParameters(), ToolBar::SetButtonToolTip(), AudioIO::SetMeters(), ControlToolBar::SetPlay(), RateMenuTable::SetRate(), ContrastDialog::SetStartAndEndTime(), ControlToolBar::SetupCutPreviewTracks(), SelectHandle::SetUseSnap(), ZoomInfo::SetZoom(), HelpSystem::ShowHelp(), SnapManager::Snap(), SnapManager::SnapManager(), ODManager::Start(), Meter::StartMonitoring(), AudioIO::StartPortAudioStream(), ControlToolBar::StartScrolling(), ControlToolBar::StartScrollingIfPreferred(), ControlToolBar::StateForStatusBar(), ControlToolBar::StopPlaying(), ControlToolBar::StopScrolling(), AudioIO::StopStream(), WaveTrack::SyncLockAdjust(), MuteButtonHandle::Tip(), CloseButtonHandle::Tip(), SoloButtonHandle::Tip(), MenuButtonHandle::Tip(), Lyrics::Update(), AudacityProject::UpdateMenus(), AButton::UpdateStatus(), WaveTrack::WaveTrack(), and BatchCommands::WriteMp3File().

void GetDefaultWindowRect ( wxRect *  defRect)
void GetNextWindowPlacement ( wxRect *  nextRect,
bool *  pMaximized,
bool *  pIconized 
)
static wxString gsLegacyFileWarning ( )
static
bool IsWindowAccessible ( wxRect *  requestedRect)

References monitor.

Referenced by GetNextWindowPlacement().

void RedrawAllProjects ( )

References gAudacityProjects.

Referenced by ToolsToolBar::OnTool().

void RefreshCursorForAllProjects ( )
int ScreenContaining ( wxRect &  r)

Referenced by GetNextWindowPlacement().

Variable Documentation

int gAudacityOffsetInc = 0
static

Referenced by CloseAllProjects().

int gAudacityPosInc = 0
static

Referenced by CloseAllProjects().

const int sbarControlWidth = 15
const int sbarExtraLen = 0
const int sbarSpaceWidth = 15