mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
GetProjectPanel analogous to GetProjectFrame breaks dependencies...
... in places that need the TrackPanel but only to invoke common wxWindow methods on it. This eliminates direct use of TrackPanel by Scrubbing and ProjectWindow
This commit is contained in:
@@ -132,6 +132,11 @@ void AudacityProject::SetFrame( wxFrame *pFrame )
|
||||
mFrame = pFrame;
|
||||
}
|
||||
|
||||
void AudacityProject::SetPanel( wxWindow *pPanel )
|
||||
{
|
||||
mPanel = pPanel;
|
||||
}
|
||||
|
||||
wxString AudacityProject::GetProjectName() const
|
||||
{
|
||||
wxString name = wxFileNameFromPath(mFileName);
|
||||
@@ -159,3 +164,20 @@ AUDACITY_DLL_API const wxFrame &GetProjectFrame( const AudacityProject &project
|
||||
THROW_INCONSISTENCY_EXCEPTION;
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
AUDACITY_DLL_API wxWindow &GetProjectPanel( AudacityProject &project )
|
||||
{
|
||||
auto ptr = project.GetPanel();
|
||||
if ( !ptr )
|
||||
THROW_INCONSISTENCY_EXCEPTION;
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
AUDACITY_DLL_API const wxWindow &GetProjectPanel(
|
||||
const AudacityProject &project )
|
||||
{
|
||||
auto ptr = project.GetPanel();
|
||||
if ( !ptr )
|
||||
THROW_INCONSISTENCY_EXCEPTION;
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user