1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-19 09:17:54 +01:00

Toolbars accessed by static Get() functions, not through AudacityProject

This commit is contained in:
Paul Licameli
2019-05-24 15:48:36 -04:00
parent 7bb71257ed
commit 3416b5bad6
35 changed files with 333 additions and 303 deletions

View File

@@ -16,6 +16,7 @@
#include "../Audacity.h" // for USE_* macros
#include "DeviceToolBar.h"
#include "ToolManager.h"
// For compilers that support precompilation, includes "wx/wx.h".
#include <wx/wxprec.h>
@@ -80,6 +81,17 @@ DeviceToolBar::~DeviceToolBar()
{
}
DeviceToolBar &DeviceToolBar::Get( AudacityProject &project )
{
auto &toolManager = ToolManager::Get( project );
return *static_cast<DeviceToolBar*>( toolManager.GetToolBar(DeviceBarID) );
}
const DeviceToolBar &DeviceToolBar::Get( const AudacityProject &project )
{
return Get( const_cast<AudacityProject&>( project )) ;
}
void DeviceToolBar::Create(wxWindow *parent)
{
ToolBar::Create(parent);