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
37AUDACITY_DLL_API std::unique_ptr<const BasicUI::WindowPlacement>
39
41// (as a wxWindow only, when you do not need to use the subclass TrackPanel)
42AUDACITY_DLL_API wxWindow &GetProjectPanel( AudacityProject &project );
43AUDACITY_DLL_API const wxWindow &GetProjectPanel(
44 const AudacityProject &project );
45
46AUDACITY_DLL_API void SetProjectPanel(
47 AudacityProject &project, wxWindow &panel );
48AUDACITY_DLL_API void SetProjectFrame(
49 AudacityProject &project, wxFrame &frame );
50
51// Container of pointers to various windows associated with the project, which
52// is not responsible for destroying them -- wxWidgets handles that instead
54 AttachedWindows, wxWindow, ClientData::SkipCopying, ClientData::BarePtr
55>
56{
57public:
59 : mProject{project} {}
60 operator AudacityProject & () const { return mProject; }
61private:
63};
64
65AUDACITY_DLL_API AttachedWindows &GetAttachedWindows(AudacityProject &project);
66
67#endif
Utility ClientData::Site to register hooks into a host class that attach client data.
AUDACITY_DLL_API std::unique_ptr< const BasicUI::WindowPlacement > ProjectFramePlacement(AudacityProject *project)
Make a WindowPlacement object suitable for project (which may be null)
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)
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:89
Utility to register hooks into a host class that attach client data.
Definition: ClientData.h:220