From 151cbb13051557b551d46ef6c25d1a7a373c28ba Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Fri, 20 Oct 2017 12:06:29 -0400 Subject: [PATCH] Follow wxWidgets argument conventions for other ctors --- src/FreqWindow.cpp | 12 ++++++------ src/FreqWindow.h | 4 ++-- src/effects/AutoDuck.cpp | 7 ++++--- src/effects/AutoDuck.h | 3 ++- src/effects/Compressor.cpp | 6 +++--- src/effects/Compressor.h | 2 +- src/effects/Equalization.cpp | 7 ++++--- src/effects/Equalization.h | 3 ++- src/effects/ScienFilter.cpp | 7 ++++--- src/effects/ScienFilter.h | 3 ++- src/export/Export.cpp | 10 ++++++---- src/export/Export.h | 5 +++-- 12 files changed, 39 insertions(+), 30 deletions(-) diff --git a/src/FreqWindow.cpp b/src/FreqWindow.cpp index 94563e820..89065d270 100644 --- a/src/FreqWindow.cpp +++ b/src/FreqWindow.cpp @@ -298,7 +298,7 @@ FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id, } S.EndVerticalLay(); - mFreqPlot = safenew FreqPlot(this); + mFreqPlot = safenew FreqPlot(this, wxID_ANY); mFreqPlot->SetMinSize(wxSize(wxDefaultCoord, FREQ_WINDOW_HEIGHT)); S.Prop(1); S.AddWindow(mFreqPlot, wxEXPAND); @@ -481,7 +481,7 @@ FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id, S.AddSpace(5); - mProgress = safenew FreqGauge(this); //, wxID_ANY, wxST_SIZEGRIP); + mProgress = safenew FreqGauge(this, wxID_ANY); //, wxST_SIZEGRIP); S.AddWindow(mProgress, wxEXPAND); // Log-frequency axis works for spectrum plots only. @@ -1109,8 +1109,8 @@ BEGIN_EVENT_TABLE(FreqPlot, wxWindow) EVT_MOUSE_EVENTS(FreqPlot::OnMouseEvent) END_EVENT_TABLE() -FreqPlot::FreqPlot(wxWindow *parent) -: wxWindow(parent, wxID_ANY) +FreqPlot::FreqPlot(wxWindow *parent, wxWindowID winid) +: wxWindow(parent, winid) { freqWindow = (FreqWindow *) parent; } @@ -1135,8 +1135,8 @@ void FreqPlot::OnMouseEvent(wxMouseEvent & event) freqWindow->PlotMouseEvent(event); } -FreqGauge::FreqGauge(wxWindow * parent) -: wxStatusBar(parent, wxID_ANY, wxST_SIZEGRIP) +FreqGauge::FreqGauge(wxWindow * parent, wxWindowID winid) +: wxStatusBar(parent, winid, wxST_SIZEGRIP) { mRange = 0; } diff --git a/src/FreqWindow.h b/src/FreqWindow.h index c99125d1c..98ded8968 100644 --- a/src/FreqWindow.h +++ b/src/FreqWindow.h @@ -86,7 +86,7 @@ private: class FreqGauge final : public wxStatusBar { public: - FreqGauge(wxWindow * parent); + FreqGauge(wxWindow * parent, wxWindowID winid); void SetRange(int range, int bar = 12, int gap = 3); void SetValue(int value); @@ -106,7 +106,7 @@ private: class FreqPlot final : public wxWindow { public: - FreqPlot(wxWindow *parent); + FreqPlot(wxWindow *parent, wxWindowID winid); // We don't need or want to accept focus. bool AcceptsFocus() const; diff --git a/src/effects/AutoDuck.cpp b/src/effects/AutoDuck.cpp index c9579efcd..026b1fd7e 100644 --- a/src/effects/AutoDuck.cpp +++ b/src/effects/AutoDuck.cpp @@ -428,7 +428,7 @@ void EffectAutoDuck::PopulateOrExchange(ShuttleGui & S) { S.AddSpace(0, 5); - mPanel = safenew EffectAutoDuckPanel(S.GetParent(), this); + mPanel = safenew EffectAutoDuckPanel(S.GetParent(), wxID_ANY, this); S.AddWindow(mPanel); S.AddSpace(0, 5); @@ -618,8 +618,9 @@ BEGIN_EVENT_TABLE(EffectAutoDuckPanel, wxPanelWrapper) EVT_MOTION(EffectAutoDuckPanel::OnMotion) END_EVENT_TABLE() -EffectAutoDuckPanel::EffectAutoDuckPanel(wxWindow *parent, EffectAutoDuck *effect) -: wxPanelWrapper(parent, wxID_ANY, wxDefaultPosition, wxSize(600, 300)) +EffectAutoDuckPanel::EffectAutoDuckPanel( + wxWindow *parent, wxWindowID winid, EffectAutoDuck *effect) +: wxPanelWrapper(parent, winid, wxDefaultPosition, wxSize(600, 300)) { mParent = parent; mEffect = effect; diff --git a/src/effects/AutoDuck.h b/src/effects/AutoDuck.h index 45aede7cd..e8be652b2 100644 --- a/src/effects/AutoDuck.h +++ b/src/effects/AutoDuck.h @@ -94,7 +94,8 @@ private: class EffectAutoDuckPanel final : public wxPanelWrapper { public: - EffectAutoDuckPanel(wxWindow *parent, EffectAutoDuck *effect); + EffectAutoDuckPanel( + wxWindow *parent, wxWindowID winid, EffectAutoDuck *effect); virtual ~EffectAutoDuckPanel(); private: diff --git a/src/effects/Compressor.cpp b/src/effects/Compressor.cpp index d2aea1329..2b60b19a7 100644 --- a/src/effects/Compressor.cpp +++ b/src/effects/Compressor.cpp @@ -196,7 +196,7 @@ void EffectCompressor::PopulateOrExchange(ShuttleGui & S) S.StartHorizontalLay(wxEXPAND, true); { S.SetBorder(10); - mPanel = safenew EffectCompressorPanel(S.GetParent(), + mPanel = safenew EffectCompressorPanel(S.GetParent(), wxID_ANY, mThresholdDB, mNoiseFloorDB, mRatio); @@ -644,11 +644,11 @@ BEGIN_EVENT_TABLE(EffectCompressorPanel, wxPanelWrapper) EVT_SIZE(EffectCompressorPanel::OnSize) END_EVENT_TABLE() -EffectCompressorPanel::EffectCompressorPanel(wxWindow *parent, +EffectCompressorPanel::EffectCompressorPanel(wxWindow *parent, wxWindowID winid, double & threshold, double & noiseFloor, double & ratio) -: wxPanelWrapper(parent), +: wxPanelWrapper(parent, winid), threshold(threshold), noiseFloor(noiseFloor), ratio(ratio) diff --git a/src/effects/Compressor.h b/src/effects/Compressor.h index 76f37cbaa..ee48f5f3b 100644 --- a/src/effects/Compressor.h +++ b/src/effects/Compressor.h @@ -138,7 +138,7 @@ private: class EffectCompressorPanel final : public wxPanelWrapper { public: - EffectCompressorPanel(wxWindow *parent, + EffectCompressorPanel(wxWindow *parent, wxWindowID winid, double & threshold, double & noiseFloor, double & ratio); diff --git a/src/effects/Equalization.cpp b/src/effects/Equalization.cpp index 34f0f1d40..b9a5aa655 100644 --- a/src/effects/Equalization.cpp +++ b/src/effects/Equalization.cpp @@ -642,7 +642,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S) } S.EndVerticalLay(); - mPanel = safenew EqualizationPanel(this, parent); + mPanel = safenew EqualizationPanel(parent, wxID_ANY, this); S.Prop(1); S.AddWindow(mPanel, wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP); S.SetSizeHints(wxDefaultCoord, wxDefaultCoord); @@ -2844,8 +2844,9 @@ BEGIN_EVENT_TABLE(EqualizationPanel, wxPanelWrapper) EVT_SIZE(EqualizationPanel::OnSize) END_EVENT_TABLE() -EqualizationPanel::EqualizationPanel(EffectEqualization *effect, wxWindow *parent) -: wxPanelWrapper(parent) +EqualizationPanel::EqualizationPanel( + wxWindow *parent, wxWindowID winid, EffectEqualization *effect) +: wxPanelWrapper(parent, winid) { mParent = parent; mEffect = effect; diff --git a/src/effects/Equalization.h b/src/effects/Equalization.h index ba5d5de3b..3b4d4ac05 100644 --- a/src/effects/Equalization.h +++ b/src/effects/Equalization.h @@ -287,7 +287,8 @@ private: class EqualizationPanel final : public wxPanelWrapper { public: - EqualizationPanel(EffectEqualization *effect, wxWindow *parent); + EqualizationPanel( + wxWindow *parent, wxWindowID winid, EffectEqualization *effect); ~EqualizationPanel(); // We don't need or want to accept focus. diff --git a/src/effects/ScienFilter.cpp b/src/effects/ScienFilter.cpp index b21e98ff6..01d2f1eed 100644 --- a/src/effects/ScienFilter.cpp +++ b/src/effects/ScienFilter.cpp @@ -395,7 +395,7 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S) } S.EndVerticalLay(); - mPanel = safenew EffectScienFilterPanel(this, parent); + mPanel = safenew EffectScienFilterPanel(parent, wxID_ANY, this); mPanel->SetFreqRange(mLoFreq, mNyquist); S.SetBorder(5); @@ -1010,8 +1010,9 @@ BEGIN_EVENT_TABLE(EffectScienFilterPanel, wxPanelWrapper) EVT_SIZE(EffectScienFilterPanel::OnSize) END_EVENT_TABLE() -EffectScienFilterPanel::EffectScienFilterPanel(EffectScienFilter *effect, wxWindow *parent) -: wxPanelWrapper(parent, wxID_ANY, wxDefaultPosition, wxSize(400, 200)) +EffectScienFilterPanel::EffectScienFilterPanel( + wxWindow *parent, wxWindowID winid, EffectScienFilter *effect) +: wxPanelWrapper(parent, winid, wxDefaultPosition, wxSize(400, 200)) { mEffect = effect; mParent = parent; diff --git a/src/effects/ScienFilter.h b/src/effects/ScienFilter.h index 1e8a89cac..cefd877c7 100644 --- a/src/effects/ScienFilter.h +++ b/src/effects/ScienFilter.h @@ -139,7 +139,8 @@ private: class EffectScienFilterPanel final : public wxPanelWrapper { public: - EffectScienFilterPanel(EffectScienFilter *effect, wxWindow *parent); + EffectScienFilterPanel( + wxWindow *parent, wxWindowID winid, EffectScienFilter *effect); virtual ~EffectScienFilterPanel(); // We don't need or want to accept focus. diff --git a/src/export/Export.cpp b/src/export/Export.cpp index b1fecec08..56157ce54 100644 --- a/src/export/Export.cpp +++ b/src/export/Export.cpp @@ -1019,8 +1019,9 @@ BEGIN_EVENT_TABLE(ExportMixerPanel, wxPanelWrapper) EVT_MOUSE_EVENTS(ExportMixerPanel::OnMouseEvent) END_EVENT_TABLE() -ExportMixerPanel::ExportMixerPanel( MixerSpec *mixerSpec, - wxArrayString trackNames,wxWindow *parent, wxWindowID id, +ExportMixerPanel::ExportMixerPanel( wxWindow *parent, wxWindowID id, + MixerSpec *mixerSpec, + wxArrayString trackNames, const wxPoint& pos, const wxSize& size): wxPanelWrapper(parent, id, pos, size) , mMixerSpec{mixerSpec} @@ -1311,8 +1312,9 @@ ExportMixerDialog::ExportMixerDialog( const TrackList *tracks, bool selectedOnly auto uVertSizer = std::make_unique(wxVERTICAL); vertSizer = uVertSizer.get(); - wxWindow *mixerPanel = safenew ExportMixerPanel(mMixerSpec.get(), mTrackNames, this, - ID_MIXERPANEL, wxDefaultPosition, wxSize(400, -1)); + wxWindow *mixerPanel = safenew ExportMixerPanel(this, ID_MIXERPANEL, + mMixerSpec.get(), mTrackNames, + wxDefaultPosition, wxSize(400, -1)); mixerPanel->SetName(_("Mixer Panel")); vertSizer->Add(mixerPanel, 1, wxEXPAND | wxALIGN_CENTRE | wxALL, 5); diff --git a/src/export/Export.h b/src/export/Export.h index 653c6be33..a55500180 100644 --- a/src/export/Export.h +++ b/src/export/Export.h @@ -233,8 +233,9 @@ private: class ExportMixerPanel final : public wxPanelWrapper { public: - ExportMixerPanel( MixerSpec *mixerSpec, wxArrayString trackNames, - wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, + ExportMixerPanel( wxWindow *parent, wxWindowID id, + MixerSpec *mixerSpec, wxArrayString trackNames, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize); virtual ~ExportMixerPanel();