1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 15:49:41 +02:00

Remove some unused things

This commit is contained in:
Paul Licameli 2020-05-23 05:58:51 -04:00
commit 71e5f150ed
31 changed files with 18 additions and 197 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

@ -80,18 +80,6 @@ enum {
CONTROL_GROUP_EXPORT
};
// Post Timer Recording Actions
// Ensure this matches the enum in Menus.cpp
enum {
POST_TIMER_RECORD_STOPPED = -3,
POST_TIMER_RECORD_CANCEL_WAIT,
POST_TIMER_RECORD_CANCEL,
POST_TIMER_RECORD_NOTHING,
POST_TIMER_RECORD_CLOSE,
POST_TIMER_RECORD_RESTART,
POST_TIMER_RECORD_SHUTDOWN
};
// The slow timer interval is used to update the start and end times, which only show
// time to the nearest second. So we only need an update once a second.
const int kSlowTimerInterval = 1000; // ms

View File

@ -30,14 +30,26 @@ class NumericTextCtrl;
class ShuttleGui;
class TimerRecordPathCtrl;
class wxArrayStringEx;
enum TimerRecordCompletedActions {
TR_ACTION_NOTHING = 0x00000000,
TR_ACTION_SAVED = 0x00000001,
TR_ACTION_EXPORTED = 0x00000002
};
enum {
POST_TIMER_RECORD_STOPPED = -3,
POST_TIMER_RECORD_CANCEL_WAIT,
POST_TIMER_RECORD_CANCEL,
POST_TIMER_RECORD_NOTHING = 0,
POST_TIMER_RECORD_CLOSE,
#ifdef __WINDOWS__
POST_TIMER_RECORD_RESTART,
POST_TIMER_RECORD_SHUTDOWN
#endif
};
class AudacityProject;
class TimerRecordPathCtrl final : public wxTextCtrl

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

@ -31,7 +31,6 @@
class wxMenu;
class wxMenuBar;
class wxArrayString;
class wxMenu;
class wxMenuBar;
using CommandParameter = CommandID;

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

@ -53,7 +53,6 @@ but little else.
#include "ImportRaw.h" // defines TrackHolders
class AudacityProject;
class wxArrayString;
class ProgressDialog;
enum class ProgressResult : unsigned;
class TrackFactory;

View File

@ -71,18 +71,6 @@ bool MakeReadyToPlay(AudacityProject &project)
return true;
}
// Post Timer Recording Actions
// Ensure this matches the enum in TimerRecordDialog.cpp
enum {
POST_TIMER_RECORD_STOPPED = -3,
POST_TIMER_RECORD_CANCEL_WAIT,
POST_TIMER_RECORD_CANCEL,
POST_TIMER_RECORD_NOTHING,
POST_TIMER_RECORD_CLOSE,
POST_TIMER_RECORD_RESTART,
POST_TIMER_RECORD_SHUTDOWN
};
// Returns true if this project was stopped, otherwise false.
// (it may though have stopped another project playing)
bool DoStopPlaying(const CommandContext &context)
@ -371,20 +359,19 @@ void OnTimerRecord(const CommandContext &context)
} );
ProjectManager::Get(project).SetSkipSavePrompt(true);
break;
#ifdef __WINDOWS__
case POST_TIMER_RECORD_RESTART:
// Restart System
ProjectManager::Get(project).SetSkipSavePrompt(true);
#ifdef __WINDOWS__
system("shutdown /r /f /t 30");
#endif
break;
case POST_TIMER_RECORD_SHUTDOWN:
// Shutdown System
ProjectManager::Get(project).SetSkipSavePrompt(true);
#ifdef __WINDOWS__
system("shutdown /s /f /t 30");
#endif
break;
#endif
}
}
}

View File

@ -18,7 +18,6 @@
class wxChoice;
class ShuttleGui;
class wxArrayStringEx;
#define DEVICE_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Device") }

View File

@ -19,7 +19,6 @@
class ChoiceSetting;
class ShuttleGui;
class wxArrayStringEx;
#define GUI_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("GUI") }

View File

@ -24,8 +24,6 @@ class ShuttleGui;
#include "PrefsPanel.h"
class wxArrayStringEx;
#define MIDI_IO_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Midi IO") }
class MidiIOPrefs final : public PrefsPanel

View File

@ -23,8 +23,6 @@ class ShuttleGui;
enum sampleFormat : unsigned;
enum DitherType : unsigned;
class wxArrayStringEx;
#define QUALITY_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Quality") }
class QualityPrefs final : public PrefsPanel

View File

@ -31,7 +31,6 @@
#include "PrefsPanel.h"
#include "SpectrogramSettings.h"
class wxArrayStringEx;
class wxChoice;
class wxCheckBox;
class wxTextCtrl;

View File

@ -18,7 +18,6 @@
class ChoiceSetting;
class ShuttleGui;
class wxArrayStringEx;
#define TRACKS_BEHAVIORS_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Tracks Behaviors") }

View File

@ -20,8 +20,6 @@ class WaveTrack;
class wxCheckBox;
class wxChoice;
class wxArrayStringEx;
#define WAVEFORM_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Waveform") }
class WaveformPrefs final : public PrefsPanel

View File

@ -51,7 +51,6 @@ with changes in the SelectionBar.
#include <wx/statline.h>
#include "../widgets/AButton.h"
#include "../AudioIOBase.h"
#include "../AColor.h"
#include "../KeyboardCapture.h"

View File

@ -46,7 +46,6 @@
#include "../AllThemeResources.h"
#include "../ImageManipulation.h"
#include "../Prefs.h"
#include "../widgets/AButton.h"
#include "../widgets/Grabber.h"
const ToolBarConfiguration::Position

View File

@ -193,24 +193,6 @@ int AButton::Listener::FilterEvent(wxEvent &event)
return Event_Skip;
}
AButton::AButton(wxWindow * parent,
wxWindowID id,
const wxPoint & pos,
const wxSize & size,
wxImage up,
wxImage over,
wxImage down,
wxImage overDown,
wxImage dis,
bool toggle):
wxWindow()
{
Init(parent, id, pos, size,
ImageRoll(up), ImageRoll(over),
ImageRoll(down), ImageRoll(overDown), ImageRoll(dis),
toggle);
}
AButton::AButton(wxWindow * parent,
wxWindowID id,
const wxPoint & pos,

View File

@ -41,19 +41,6 @@ class AButton final : public wxWindow {
ImageRoll dis,
bool toggle);
// Construct button, specifying images (button up, highlight, button down,
// and disabled) for the default state
AButton(wxWindow * parent,
wxWindowID id,
const wxPoint & pos,
const wxSize & size,
wxImage up,
wxImage over,
wxImage down,
wxImage overDown,
wxImage dis,
bool toggle);
virtual ~ AButton();
// hide the inherited function that takes naked wxString:

View File

@ -148,8 +148,6 @@ const int sliderFontSize = 12;
#define OPTIONAL_SLIDER_TICKS
#endif
class wxArrayString;
//
// TipWindow
//

View File

@ -18,7 +18,6 @@
#include <wx/timer.h> // member variable
#include "wxPanelWrapper.h" // to inherit
class wxArrayString;
class wxBitmap;
class wxSize;
class wxPoint;

View File

@ -19,8 +19,6 @@
#include "../commands/Keyboard.h"
class wxArrayString;
// Class holding all information about a node. Rather than a real tree
// we store these in an array and simulate a tree.
class KeyNode

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

View File

@ -17,7 +17,6 @@
#include <wx/colour.h> // member variable
#include <wx/pen.h> // member variable
class wxArrayString;
class wxDC;
class wxFont;