Audacity 3.2.0
Classes | Namespaces | Functions
ProjectWindows.h File Reference

accessors for certain important windows associated with each project More...

#include "ClientData.h"
Include dependency graph for ProjectWindows.h:

Go to the source code of this file.

Classes

class  AttachedWindows
 

Namespaces

namespace  BasicUI
 

Functions

AUDACITY_DLL_API wxFrame & GetProjectFrame (AudacityProject &project)
 Get the top-level window associated with the project (as a wxFrame only, when you do not need to use the subclass ProjectWindow) More...
 
AUDACITY_DLL_API const wxFrame & GetProjectFrame (const AudacityProject &project)
 
AUDACITY_DLL_API wxFrame * FindProjectFrame (AudacityProject *project)
 Get a pointer to the window associated with a project, or null if the given pointer is null, or the window was not yet set. More...
 
AUDACITY_DLL_API const wxFrame * FindProjectFrame (const AudacityProject *project)
 Get a pointer to the window associated with a project, or null if the given pointer is null, or the window was not yet set. More...
 
AUDACITY_DLL_API wxWindow & GetProjectPanel (AudacityProject &project)
 Get the main sub-window of the project frame that displays track data. More...
 
AUDACITY_DLL_API const wxWindow & GetProjectPanel (const AudacityProject &project)
 
AUDACITY_DLL_API void SetProjectPanel (AudacityProject &project, wxWindow &panel)
 
AUDACITY_DLL_API void SetProjectFrame (AudacityProject &project, wxFrame &frame)
 
AUDACITY_DLL_API AttachedWindowsGetAttachedWindows (AudacityProject &project)
 

Detailed Description

accessors for certain important windows associated with each project


Audacity: A Digital Audio Editor

Paul Licameli split from Project.h

Definition in file ProjectWindows.h.

Function Documentation

◆ FindProjectFrame() [1/2]

AUDACITY_DLL_API wxFrame * FindProjectFrame ( AudacityProject project)

Get a pointer to the window associated with a project, or null if the given pointer is null, or the window was not yet set.

Definition at line 87 of file ProjectWindows.cpp.

87 {
88 if (!project)
89 return nullptr;
90 return ProjectWindows::Get(*project).mFrame;
91}
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:194

References BasicUI::Get().

Referenced by Exporter::DisplayOptions(), ToolManager::FilterEvent(), CommandManager::FilterKeyEvent(), anonymous_namespace{WaveTrackControls.cpp}::GainSliderDrawFunction(), AudacityApp::InitPart2(), NotMinimizedFlag(), Exporter::OnHelp(), MeterPanel::OnPreferences(), anonymous_namespace{WaveTrackControls.cpp}::PanSliderDrawFunction(), SetActiveProject(), ProjectFileIO::SetProjectTitle(), and ShowDependencyDialogIfNeeded().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindProjectFrame() [2/2]

AUDACITY_DLL_API const wxFrame * FindProjectFrame ( const AudacityProject project)

Get a pointer to the window associated with a project, or null if the given pointer is null, or the window was not yet set.

Definition at line 93 of file ProjectWindows.cpp.

93 {
94 if (!project)
95 return nullptr;
96 return ProjectWindows::Get(*project).mFrame;
97}

References BasicUI::Get().

Here is the call graph for this function:

◆ GetAttachedWindows()

AUDACITY_DLL_API AttachedWindows & GetAttachedWindows ( AudacityProject project)

Definition at line 104 of file ProjectWindows.cpp.

105{
106 return ProjectWindows::Get(project).mAttachedWindows;
107}

References BasicUI::Get().

Referenced by AdornedRulerPanel::Destroy(), TrackPanel::Destroy(), ProjectWindow::Find(), AdornedRulerPanel::Get(), ProjectWindow::Get(), RealtimeEffectPanel::Get(), TrackPanel::Get(), anonymous_namespace{BatchProcessDialog.cpp}::OnApplyMacrosPalette(), anonymous_namespace{Contrast.cpp}::anonymous_namespace{Contrast.cpp}::OnContrast(), anonymous_namespace{HistoryWindow.cpp}::OnHistory(), anonymous_namespace{LyricsWindow.cpp}::OnKaraoke(), anonymous_namespace{BatchProcessDialog.cpp}::OnManageMacros(), anonymous_namespace{MixerBoard.cpp}::OnMixerBoard(), and anonymous_namespace{FreqWindow.cpp}::OnPlotSpectrum().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetProjectFrame() [1/2]

AUDACITY_DLL_API wxFrame & GetProjectFrame ( AudacityProject project)

Get the top-level window associated with the project (as a wxFrame only, when you do not need to use the subclass ProjectWindow)

Definition at line 71 of file ProjectWindows.cpp.

72{
73 auto ptr = ProjectWindows::Get(project).mFrame;
74 if ( !ptr )
76 return *ptr;
77}
#define THROW_INCONSISTENCY_EXCEPTION
Throw InconsistencyException, using C++ preprocessor to identify the source code location.

References BasicUI::Get(), and THROW_INCONSISTENCY_EXCEPTION.

Referenced by DragCommand::Apply(), SetProjectCommand::Apply(), CloseAllProjects(), AudioSetupToolBar::CommonMenuItemSteps(), MenuCreator::CreateMenusAndCommands(), ToolManager::CreateWindows(), LabelTrackView::DialogForLabelName(), TagsEditorDialog::DoEditMetadata(), SplashDialog::DoHelpWelcome(), DoImportMIDIProject(), SelectUtilities::DoListSelection(), anonymous_namespace{PluginMenus.cpp}::DoManagePluginsMenu(), ToolManager::DoneDragging(), DoReloadPreferences(), ProjectFileManager::DoSave(), anonymous_namespace{DropoutDetector.cpp}::DropoutSubscription::DropoutSubscription(), anonymous_namespace{ExtraMenus.cpp}::ExtraMiscItems(), GetNextWindowPlacement(), MenuManager::GetUpdateFlags(), AUPImportFileHandle::HandleNoteTrack(), AUPImportFileHandle::HandleProject(), AUPImportFileHandle::HandleTimeTrack(), AUPImportFileHandle::Import(), anonymous_namespace{HelpMenus.cpp}::OnAbout(), anonymous_namespace{PluginMenus.cpp}::OnBenchmark(), anonymous_namespace{FileMenus.cpp}::OnExportLabels(), anonymous_namespace{ExportMIDI.cpp}::OnExportMIDI(), anonymous_namespace{ExtraMenus.cpp}::OnFullScreen(), ToolManager::OnGrabber(), ProjectWindow::OnIconize(), TrackPanel::OnIdle(), anonymous_namespace{ImportMIDI.cpp}::OnImportMIDI(), AudacityApp::OnInit0(), anonymous_namespace{HelpMenus.cpp}::OnManual(), ToolManager::OnMouse(), NavigationActions::Handler::OnNextWindow(), anonymous_namespace{Printing.cpp}::OnPageSetup(), anonymous_namespace{EditMenus.cpp}::OnPreferences(), NavigationActions::Handler::OnPrevWindow(), anonymous_namespace{Printing.cpp}::OnPrint(), anonymous_namespace{HelpMenus.cpp}::OnQuickFix(), anonymous_namespace{HelpMenus.cpp}::OnQuickHelp(), TrackMenuTable::OnSetName(), SelectUtilities::OnSetRegion(), anonymous_namespace{TransportMenus.cpp}::OnSoundActivated(), AudacityApp::OnTimer(), AUPImportFileHandle::Open(), ProjectAudioManager::PlayPlayRegion(), ProjectFileManager::ReadProjectFile(), MenuCreator::RebuildAllMenuBars(), MenuCreator::RebuildMenuBar(), RefreshAllTitles(), ProjectFileManager::SaveAs(), ProjectFileManager::SaveCopy(), GetInfoCommand::SendBoxes(), GetInfoCommand::SendMenus(), GetInfoCommand::SendPreferences(), LabelTrackView::ShowContextMenu(), ShowDiagnostics(), ScreenshotBigDialog::SizeMainWindow(), WaveTrackAffordanceControls::StartEditClipName(), ToolManager::Updated(), and ProjectManager::ProjectChooser::~ProjectChooser().

Here is the call graph for this function:

◆ GetProjectFrame() [2/2]

AUDACITY_DLL_API const wxFrame & GetProjectFrame ( const AudacityProject project)

Definition at line 79 of file ProjectWindows.cpp.

80{
81 auto ptr = ProjectWindows::Get(project).mFrame;
82 if ( !ptr )
84 return *ptr;
85}

References BasicUI::Get(), and THROW_INCONSISTENCY_EXCEPTION.

Here is the call graph for this function:

◆ GetProjectPanel() [1/2]

AUDACITY_DLL_API wxWindow & GetProjectPanel ( AudacityProject project)

Get the main sub-window of the project frame that displays track data.

Definition at line 48 of file ProjectWindows.cpp.

49{
50 auto ptr = ProjectWindows::Get(project).mPanel;
51 if ( !ptr )
53 return *ptr;
54}

References BasicUI::Get(), and THROW_INCONSISTENCY_EXCEPTION.

Referenced by AdornedRulerPanel::CreateOverlays(), ProjectWindow::DoScroll(), AdornedRulerPanel::DrawBothOverlays(), ProjectWindow::FixScrollbars(), ProjectWindow::OnActivate(), ProjectWindow::PlaybackScroller::OnTimer(), ScrubbingOverlay::OnTimer(), ProjectWindow::RedrawProject(), ProjectWindow::ScrollIntoView(), ProjectWindow::UpdateLayout(), and ProjectWindow::ZoomAfterImport().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetProjectPanel() [2/2]

AUDACITY_DLL_API const wxWindow & GetProjectPanel ( const AudacityProject project)

Definition at line 56 of file ProjectWindows.cpp.

58{
59 auto ptr = ProjectWindows::Get(project).mPanel;
60 if ( !ptr )
62 return *ptr;
63}

References BasicUI::Get(), and THROW_INCONSISTENCY_EXCEPTION.

Here is the call graph for this function:

◆ SetProjectFrame()

AUDACITY_DLL_API void SetProjectFrame ( AudacityProject project,
wxFrame &  frame 
)

Definition at line 99 of file ProjectWindows.cpp.

100{
101 ProjectWindows::Get(project).mFrame = &frame;
102}

References BasicUI::Get().

Referenced by ProjectWindowBase::ProjectWindowBase().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetProjectPanel()

AUDACITY_DLL_API void SetProjectPanel ( AudacityProject project,
wxWindow &  panel 
)

Definition at line 65 of file ProjectWindows.cpp.

67{
68 ProjectWindows::Get(project).mPanel = &panel;
69}

References BasicUI::Get().

Here is the call graph for this function: