Audacity 3.2.0
Public Member Functions | Protected Attributes | List of all members
ProjectWindowBase Class Reference

A top-level window associated with a project. More...

#include <ProjectWindowBase.h>

Inheritance diagram for ProjectWindowBase:
[legend]
Collaboration diagram for ProjectWindowBase:
[legend]

Public Member Functions

 ProjectWindowBase (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, AudacityProject &project)
 
 ~ProjectWindowBase () override
 
std::shared_ptr< AudacityProjectFindProject ()
 
std::shared_ptr< const AudacityProjectFindProject () const
 

Protected Attributes

std::weak_ptr< AudacityProjectmwProject
 

Detailed Description

A top-level window associated with a project.

Definition at line 20 of file ProjectWindowBase.h.

Constructor & Destructor Documentation

◆ ProjectWindowBase()

ProjectWindowBase::ProjectWindowBase ( wxWindow *  parent,
wxWindowID  id,
const wxPoint &  pos,
const wxSize &  size,
AudacityProject project 
)
explicit

Definition at line 16 of file ProjectWindowBase.cpp.

19 : wxFrame(parent, id, _TS("Audacity"), pos, size)
20 , mwProject{ project.weak_from_this() }
21{
22 SetProjectFrame( project, *this );
23
24 // Ensure a unique name of this window for journalling purposes
25 SetName(
26 wxString::Format( L"AudacityProject %d", project.GetProjectNumber() ) );
27};
#define _TS(s)
Definition: Internat.h:27
void SetProjectFrame(AudacityProject &project, wxFrame &frame)
int GetProjectNumber()
Definition: Project.h:100
std::weak_ptr< AudacityProject > mwProject

References AudacityProject::GetProjectNumber(), and SetProjectFrame().

Here is the call graph for this function:

◆ ~ProjectWindowBase()

ProjectWindowBase::~ProjectWindowBase ( )
override

Definition at line 29 of file ProjectWindowBase.cpp.

30{
31}

Member Function Documentation

◆ FindProject() [1/2]

std::shared_ptr< AudacityProject > ProjectWindowBase::FindProject ( )
inline

◆ FindProject() [2/2]

std::shared_ptr< const AudacityProject > ProjectWindowBase::FindProject ( ) const
inline

Definition at line 32 of file ProjectWindowBase.h.

33 { return mwProject.lock(); }

References mwProject.

Member Data Documentation

◆ mwProject

std::weak_ptr<AudacityProject> ProjectWindowBase::mwProject
protected

Definition at line 36 of file ProjectWindowBase.h.

Referenced by FindProject().


The documentation for this class was generated from the following files: