Audacity 3.2.0
ProjectWindowBase.h
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5ProjectWindowBase.h
6
7Paul Licameli split from ProjectWindow.h
8
9**********************************************************************/
10
11#ifndef __AUDACITY_PROJECT_WINDOW_BASE__
12#define __AUDACITY_PROJECT_WINDOW_BASE__
13
14#include <wx/frame.h> // to inherit
15#include <memory>
16
17class AudacityProject;
18
20class ProjectWindowBase /* not final */ : public wxFrame
21{
22public:
23 explicit ProjectWindowBase(
24 wxWindow * parent, wxWindowID id,
25 const wxPoint & pos, const wxSize &size,
26 AudacityProject &project );
27
28 ~ProjectWindowBase() override;
29
30 std::shared_ptr<AudacityProject> FindProject()
31 { return mwProject.lock(); }
32 std::shared_ptr<const AudacityProject> FindProject() const
33 { return mwProject.lock(); }
34
35protected:
36 std::weak_ptr<AudacityProject> mwProject;
37};
38
39AUDACITY_DLL_API AudacityProject *FindProjectFromWindow( wxWindow *pWindow );
40const AudacityProject *FindProjectFromWindow( const wxWindow *pWindow );
41
42#endif
43
AUDACITY_DLL_API AudacityProject * FindProjectFromWindow(wxWindow *pWindow)
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:89
A top-level window associated with a project.
ProjectWindowBase(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, AudacityProject &project)
std::shared_ptr< AudacityProject > FindProject()
~ProjectWindowBase() override
std::shared_ptr< const AudacityProject > FindProject() const
std::weak_ptr< AudacityProject > mwProject