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}
const auto project
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:202

References BasicUI::Get(), and project.

Referenced by ToolManager::FilterEvent(), MenuCreator::FilterKeyEvent(), AudacityApp::InitPart2(), NotMinimizedFlag(), MeterPanel::OnPreferences(), anonymous_namespace{WaveTrackControls.cpp}::PanSliderDrawFunction(), SetActiveProject(), ShowDependencyDialogIfNeeded(), anonymous_namespace{NoteTrackControls.cpp}::VelocitySliderDrawFunction(), and anonymous_namespace{WaveTrackControls.cpp}::VolumeSliderDrawFunction().

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(), and project.

Here is the call graph for this function:

◆ GetAttachedWindows()

AUDACITY_DLL_API AttachedWindows & GetAttachedWindows ( AudacityProject project)

◆ 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(), project, and THROW_INCONSISTENCY_EXCEPTION.

Referenced by DragCommand::Apply(), SetProjectCommand::Apply(), CloseAllProjects(), AudioSetupToolBar::CommonMenuItemSteps(), ToolManager::CreateWindows(), LabelTrackView::DialogForLabelName(), LabelTrackView::DoEditLabels(), EffectUI::DoEffect(), anonymous_namespace{FileMenus.cpp}::DoImport(), SelectUtilities::DoListSelection(), anonymous_namespace{PluginMenus.cpp}::DoManagePluginsMenu(), ToolManager::DoneDragging(), DoReloadPreferences(), ProjectFileManager::DoSave(), anonymous_namespace{DropoutDetector.cpp}::DropoutSubscription::DropoutSubscription(), TagsEditorDialog::EditProjectMetadata(), anonymous_namespace{ExtraMenus.cpp}::ExtraMiscItems(), anonymous_namespace{EditMenus.cpp}::FindSourceTracks(), GetNextWindowPlacement(), AUPImportFileHandle::HandleProject(), anonymous_namespace{HelpMenus.cpp}::OnAbout(), anonymous_namespace{BatchProcessDialog.cpp}::OnApplyMacroDirectlyByName(), anonymous_namespace{PluginMenus.cpp}::OnBenchmark(), anonymous_namespace{FileMenus.cpp}::OnClose(), anonymous_namespace{FileMenus.cpp}::OnExportLabels(), anonymous_namespace{ExportMIDI.cpp}::OnExportMIDI(), anonymous_namespace{ExtraMenus.cpp}::OnFullScreen(), ToolManager::OnGrabber(), ProjectWindow::OnIconize(), TrackPanel::OnIdle(), anonymous_namespace{FileMenus.cpp}::OnImportLabels(), anonymous_namespace{ImportMIDI.cpp}::OnImportMIDI(), anonymous_namespace{ProjectFileManager.cpp}::ImportProgress::OnImportResult(), AudacityApp::OnInit0(), anonymous_namespace{HelpMenus.cpp}::OnManual(), ToolManager::OnMouse(), NavigationActions::Handler::OnNextWindow(), anonymous_namespace{EditMenus.cpp}::OnPreferences(), NavigationActions::Handler::OnPrevWindow(), anonymous_namespace{HelpMenus.cpp}::OnQuickFix(), anonymous_namespace{HelpMenus.cpp}::OnQuickHelp(), anonymous_namespace{TrackMenus.cpp}::OnResample(), SelectUtilities::OnSetRegion(), anonymous_namespace{TransportMenus.cpp}::OnSoundActivated(), AudacityApp::OnTimer(), anonymous_namespace{TimerRecordDialog.cpp}::OnTimerRecord(), ProjectAudioManager::PlayPlayRegion(), MacroCommands::PromptForParamsFor(), AudacityCommand::PromptUser(), ProjectFileManager::ReadProjectFile(), MenuCreator::ReallyDoQuickCheck(), MenuCreator::RebuildAllMenuBars(), MenuCreator::RebuildMenuBar(), RefreshAllTitles(), ProjectFileManager::SaveAs(), ProjectFileManager::SaveCopy(), GetInfoCommand::SendBoxes(), GetInfoCommand::SendMenus(), GetInfoCommand::SendPreferences(), LabelTrackView::ShowContextMenu(), ShowDiagnostics(), 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(), project, 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(), project, and THROW_INCONSISTENCY_EXCEPTION.

Referenced by Scrubber::ContinueScrubbingPoll(), AdornedRulerPanel::CreateOverlays(), Scrubber::DoScrub(), AdornedRulerPanel::DrawBothOverlays(), ProjectWindow::OnActivate(), ProjectWindow::PlaybackScroller::OnTimer(), ScrubbingOverlay::OnTimer(), ProjectWindow::OnViewportMessage(), AudacityMirProject::ShouldBeReconfigured(), and ProjectWindow::UpdateLayout().

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(), project, 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(), and project.

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(), and project.

Here is the call graph for this function: