Remove some unused functions and forward declarations

This commit is contained in:
Paul Licameli 2020-05-23 05:16:27 -04:00
parent 8756258e55
commit 7fb4652c88
11 changed files with 1 additions and 116 deletions

View File

@ -22,8 +22,6 @@
#include "Internat.h"
class wxString;
class AudacityException /* not final */
{
public:

View File

@ -18,7 +18,6 @@ Paul Licameli
#include "ClientData.h" // to inherit
class AudacityProject;
class wxString;
class wxWindow;
enum StatusBarField : int {

View File

@ -851,25 +851,6 @@ ShuttleGuiBase & ShuttleGuiBase::Prop( int iProp )
return *this;
}
wxMenuBar * ShuttleGuiBase::AddMenuBar( )
{
auto menuBar = std::make_unique<wxMenuBar>();
mpMenuBar = menuBar.get();
wxFrame * pFrame = (wxFrame*)mpParent;
pFrame->SetThemeEnabled( true );
mpMenuBar->SetThemeEnabled( true );
pFrame->SetMenuBar(menuBar.release());
return mpMenuBar;
}
wxMenu * ShuttleGuiBase::AddMenu( const TranslatableString & Title )
{
mpMenuBar->Append( (mpMenu = safenew wxMenu), Title.Translation() );
return mpMenu;
}
/// Starts a static box around a number of controls.
/// @param Str The text of the title for the box.
/// @param iProp The resizing proportion value.
@ -2239,47 +2220,6 @@ ShuttleGui & ShuttleGui::Optional( bool &bVar ){
};
GuiWaveTrack * ShuttleGui::AddGuiWaveTrack( const wxString & WXUNUSED(Name))
{
#ifdef EXPERIMENTAL_TRACK_PANEL
UseUpId();
if( mShuttleMode != eIsCreating )
return (GuiWaveTrack*)NULL;
// return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), GuiWaveTrack);
GuiWaveTrack * pGuiWaveTrack;
miProp=1;
mpWind = pGuiWaveTrack = safenew GuiWaveTrack(mpParent, miId, Name);
mpWind->SetMinSize(wxSize(100,50));
UpdateSizers();
return pGuiWaveTrack;
#else
return NULL;
#endif
}
//#include "./widgets/AttachableScrollBar.h"
#if 0
AttachableScrollBar * ShuttleGui::AddAttachableScrollBar( long style )
{
UseUpId();
if( mShuttleMode != eIsCreating )
return (AttachableScrollBar*)NULL;
// return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), AttachableScrollBar);
AttachableScrollBar * pAttachableScrollBar;
miProp=0;
mpWind = pAttachableScrollBar = safenew AttachableScrollBar(
mpParent,
miId,
wxDefaultPosition,
wxDefaultSize,
style
);
mpWind->SetMinSize(wxSize(10,20));
UpdateSizers();
return pAttachableScrollBar;
}
#endif
std::unique_ptr<wxSizer> CreateStdButtonSizer(wxWindow *parent, long buttons, wxWindow *extra)
{
wxASSERT(parent != NULL); // To justify safenew

View File

@ -66,8 +66,6 @@ class wxPanel;
class wxSizer;
class wxSizerItem;
class wxStaticBox;
class wxMenuBar;
class wxMenu;
class wxSpinCtrl;
class wxListBox;
class wxGrid;
@ -348,8 +346,6 @@ public:
const TranslatableStrings &choices, int Selected = -1 );
wxChoice * AddChoice( const TranslatableString &Prompt,
const TranslatableStrings &choices, const TranslatableString &selected );
wxMenuBar * AddMenuBar( );
wxMenu * AddMenu( const TranslatableString & Title );
void AddIcon( wxBitmap * pBmp);
void AddFixedText(
const TranslatableString & Str, bool bCenter = false, int wrapWidth = 0 );
@ -558,8 +554,6 @@ protected:
wxSizer * mpSizer;
wxWindow * mpParent;
wxWindow * mpWind;
wxMenuBar * mpMenuBar;
wxMenu * mpMenu;
private:
void DoDataShuttle( const wxString &Name, WrappedType & WrappedRef );
@ -741,9 +735,6 @@ public:
ShuttleGui &MinSize( wxSize sz )
{ std::move( mItem ).MinSize( sz ); return *this; }
GuiWaveTrack * AddGuiWaveTrack( const wxString & Name);
AttachableScrollBar * AddAttachableScrollBar( long style = wxSB_HORIZONTAL );
// The first of these buttons, if any, that is included will be default:
// Apply, Yes, OK
void AddStandardButtons(

View File

@ -19,7 +19,6 @@ Paul Licameli split from TrackPanel.cpp
class wxDC;
class wxPoint;
class wxRect;
class wxString;
class wxWindow;
class ButtonHandle;

View File

@ -27,7 +27,6 @@ small calculations of rectangles.
#include <wx/toplevel.h>
#include <wx/dcscreen.h>
#include <wx/dcmemory.h>
#include <wx/menu.h>
#include <wx/settings.h>
#include <wx/bitmap.h>
#include <wx/valgen.h>
@ -363,43 +362,6 @@ bool ScreenshotCommand::CaptureDock(
return Capture(context, FileName, win, wxRect(x, y, width, height));
}
void ExploreMenu(
const CommandContext & context,
wxMenu * pMenu, int Id, int depth ){
static_cast<void>(Id);//compiler food.
if( !pMenu )
return;
wxMenuItemList list = pMenu->GetMenuItems();
size_t lcnt = list.size();
wxMenuItem * item;
wxString Label;
wxString Accel;
for (size_t lndx = 0; lndx < lcnt; lndx++) {
item = list.Item(lndx)->GetData();
Label = item->GetItemLabelText();
Accel = item->GetItemLabel();
if( Accel.Contains("\t") )
Accel = Accel.AfterLast('\t');
else
Accel = "";
if( item->IsSeparator() )
Label = "----";
int flags = 0;
if (item->IsSubMenu())
flags +=1;
if (item->IsCheck() && item->IsChecked())
flags +=2;
if (item->IsSubMenu()) {
pMenu = item->GetSubMenu();
ExploreMenu( context, pMenu, item->GetId(), depth+1 );
}
}
}
// Handed a dialog, which it is given the option to capture.
bool ScreenshotCommand::MayCapture( wxDialog * pDlg )
{

View File

@ -12,7 +12,6 @@
#include "../widgets/wxPanelWrapper.h" // to inherit
class wxButton;
class wxString;
class wxTextCtrl;
class Envelope;

View File

@ -24,7 +24,6 @@
class wxButton;
class wxSizer;
class wxSlider;
class wxString;
class Envelope;
class WaveTrack;

View File

@ -55,7 +55,6 @@ extern int scorealign(
class wxButton;
class wxCheckBox;
class wxString;
class wxSlider;
class wxStaticText;

View File

@ -23,7 +23,6 @@ into a NoteTrack.
#if defined(USE_MIDI)
class wxString;
class AudacityProject;
class NoteTrack;

View File

@ -19,7 +19,7 @@ tables, and automatically attaches and detaches the event handlers.
#define __AUDACITY_POPUP_MENU_TABLE__
class wxCommandEvent;
class wxString;
#include <functional>
#include <vector>
#include <wx/menu.h> // to inherit wxMenu