Audacity 3.2.0
ProjectWindows.h
Go to the documentation of this file.
1/*!********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file ProjectWindows.h
6 @brief accessors for certain important windows associated with each project
7
8 Paul Licameli split from Project.h
9
10**********************************************************************/
11
12#ifndef __AUDACITY_PROJECT_WINDOWS__
13#define __AUDACITY_PROJECT_WINDOWS__
14
15#include "ClientData.h"
16
17class AudacityProject;
18class wxFrame;
19class wxWindow;
20namespace BasicUI { class WindowPlacement; }
21
24AUDACITY_DLL_API wxFrame &GetProjectFrame( AudacityProject &project );
25AUDACITY_DLL_API const wxFrame &GetProjectFrame( const AudacityProject &project );
26
29AUDACITY_DLL_API wxFrame *FindProjectFrame( AudacityProject *project );
30
33AUDACITY_DLL_API const wxFrame *FindProjectFrame( const AudacityProject *project );
34
36// (as a wxWindow only, when you do not need to use the subclass TrackPanel)
37AUDACITY_DLL_API wxWindow &GetProjectPanel( AudacityProject &project );
38AUDACITY_DLL_API const wxWindow &GetProjectPanel(
39 const AudacityProject &project );
40
41AUDACITY_DLL_API void SetProjectPanel(
42 AudacityProject &project, wxWindow &panel );
43AUDACITY_DLL_API void SetProjectFrame(
44 AudacityProject &project, wxFrame &frame );
45
46// Container of pointers to various windows associated with the project, which
47// is not responsible for destroying them -- wxWidgets handles that instead
49 AttachedWindows, wxWindow, ClientData::SkipCopying, ClientData::BarePtr
50>
51{
52public:
54 : mProject{project} {}
55 operator AudacityProject & () const { return mProject; }
56private:
58};
59
61
62#endif
Utility ClientData::Site to register hooks into a host class that attach client data.
AUDACITY_DLL_API wxWindow & GetProjectPanel(AudacityProject &project)
Get the main sub-window of the project frame that displays track data.
AUDACITY_DLL_API void SetProjectPanel(AudacityProject &project, wxWindow &panel)
AUDACITY_DLL_API void SetProjectFrame(AudacityProject &project, wxFrame &frame)
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 ...
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,...
AUDACITY_DLL_API AttachedWindows & GetAttachedWindows(AudacityProject &project)
const auto project
AttachedWindows(AudacityProject &project)
AudacityProject & mProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
Subclasses may hold information such as a parent window pointer for a dialog.
Definition: BasicUI.h:30
Utility to register hooks into a host class that attach client data.
Definition: ClientData.h:229