1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

Follow wxWidgets argument conventions for other ctors

This commit is contained in:
Paul Licameli 2017-10-20 12:06:29 -04:00
parent ab5ff9060b
commit 151cbb1305
12 changed files with 39 additions and 30 deletions

View File

@ -298,7 +298,7 @@ FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id,
} }
S.EndVerticalLay(); S.EndVerticalLay();
mFreqPlot = safenew FreqPlot(this); mFreqPlot = safenew FreqPlot(this, wxID_ANY);
mFreqPlot->SetMinSize(wxSize(wxDefaultCoord, FREQ_WINDOW_HEIGHT)); mFreqPlot->SetMinSize(wxSize(wxDefaultCoord, FREQ_WINDOW_HEIGHT));
S.Prop(1); S.Prop(1);
S.AddWindow(mFreqPlot, wxEXPAND); S.AddWindow(mFreqPlot, wxEXPAND);
@ -481,7 +481,7 @@ FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id,
S.AddSpace(5); S.AddSpace(5);
mProgress = safenew FreqGauge(this); //, wxID_ANY, wxST_SIZEGRIP); mProgress = safenew FreqGauge(this, wxID_ANY); //, wxST_SIZEGRIP);
S.AddWindow(mProgress, wxEXPAND); S.AddWindow(mProgress, wxEXPAND);
// Log-frequency axis works for spectrum plots only. // Log-frequency axis works for spectrum plots only.
@ -1109,8 +1109,8 @@ BEGIN_EVENT_TABLE(FreqPlot, wxWindow)
EVT_MOUSE_EVENTS(FreqPlot::OnMouseEvent) EVT_MOUSE_EVENTS(FreqPlot::OnMouseEvent)
END_EVENT_TABLE() END_EVENT_TABLE()
FreqPlot::FreqPlot(wxWindow *parent) FreqPlot::FreqPlot(wxWindow *parent, wxWindowID winid)
: wxWindow(parent, wxID_ANY) : wxWindow(parent, winid)
{ {
freqWindow = (FreqWindow *) parent; freqWindow = (FreqWindow *) parent;
} }
@ -1135,8 +1135,8 @@ void FreqPlot::OnMouseEvent(wxMouseEvent & event)
freqWindow->PlotMouseEvent(event); freqWindow->PlotMouseEvent(event);
} }
FreqGauge::FreqGauge(wxWindow * parent) FreqGauge::FreqGauge(wxWindow * parent, wxWindowID winid)
: wxStatusBar(parent, wxID_ANY, wxST_SIZEGRIP) : wxStatusBar(parent, winid, wxST_SIZEGRIP)
{ {
mRange = 0; mRange = 0;
} }

View File

@ -86,7 +86,7 @@ private:
class FreqGauge final : public wxStatusBar class FreqGauge final : public wxStatusBar
{ {
public: public:
FreqGauge(wxWindow * parent); FreqGauge(wxWindow * parent, wxWindowID winid);
void SetRange(int range, int bar = 12, int gap = 3); void SetRange(int range, int bar = 12, int gap = 3);
void SetValue(int value); void SetValue(int value);
@ -106,7 +106,7 @@ private:
class FreqPlot final : public wxWindow class FreqPlot final : public wxWindow
{ {
public: public:
FreqPlot(wxWindow *parent); FreqPlot(wxWindow *parent, wxWindowID winid);
// We don't need or want to accept focus. // We don't need or want to accept focus.
bool AcceptsFocus() const; bool AcceptsFocus() const;

View File

@ -428,7 +428,7 @@ void EffectAutoDuck::PopulateOrExchange(ShuttleGui & S)
{ {
S.AddSpace(0, 5); S.AddSpace(0, 5);
mPanel = safenew EffectAutoDuckPanel(S.GetParent(), this); mPanel = safenew EffectAutoDuckPanel(S.GetParent(), wxID_ANY, this);
S.AddWindow(mPanel); S.AddWindow(mPanel);
S.AddSpace(0, 5); S.AddSpace(0, 5);
@ -618,8 +618,9 @@ BEGIN_EVENT_TABLE(EffectAutoDuckPanel, wxPanelWrapper)
EVT_MOTION(EffectAutoDuckPanel::OnMotion) EVT_MOTION(EffectAutoDuckPanel::OnMotion)
END_EVENT_TABLE() END_EVENT_TABLE()
EffectAutoDuckPanel::EffectAutoDuckPanel(wxWindow *parent, EffectAutoDuck *effect) EffectAutoDuckPanel::EffectAutoDuckPanel(
: wxPanelWrapper(parent, wxID_ANY, wxDefaultPosition, wxSize(600, 300)) wxWindow *parent, wxWindowID winid, EffectAutoDuck *effect)
: wxPanelWrapper(parent, winid, wxDefaultPosition, wxSize(600, 300))
{ {
mParent = parent; mParent = parent;
mEffect = effect; mEffect = effect;

View File

@ -94,7 +94,8 @@ private:
class EffectAutoDuckPanel final : public wxPanelWrapper class EffectAutoDuckPanel final : public wxPanelWrapper
{ {
public: public:
EffectAutoDuckPanel(wxWindow *parent, EffectAutoDuck *effect); EffectAutoDuckPanel(
wxWindow *parent, wxWindowID winid, EffectAutoDuck *effect);
virtual ~EffectAutoDuckPanel(); virtual ~EffectAutoDuckPanel();
private: private:

View File

@ -196,7 +196,7 @@ void EffectCompressor::PopulateOrExchange(ShuttleGui & S)
S.StartHorizontalLay(wxEXPAND, true); S.StartHorizontalLay(wxEXPAND, true);
{ {
S.SetBorder(10); S.SetBorder(10);
mPanel = safenew EffectCompressorPanel(S.GetParent(), mPanel = safenew EffectCompressorPanel(S.GetParent(), wxID_ANY,
mThresholdDB, mThresholdDB,
mNoiseFloorDB, mNoiseFloorDB,
mRatio); mRatio);
@ -644,11 +644,11 @@ BEGIN_EVENT_TABLE(EffectCompressorPanel, wxPanelWrapper)
EVT_SIZE(EffectCompressorPanel::OnSize) EVT_SIZE(EffectCompressorPanel::OnSize)
END_EVENT_TABLE() END_EVENT_TABLE()
EffectCompressorPanel::EffectCompressorPanel(wxWindow *parent, EffectCompressorPanel::EffectCompressorPanel(wxWindow *parent, wxWindowID winid,
double & threshold, double & threshold,
double & noiseFloor, double & noiseFloor,
double & ratio) double & ratio)
: wxPanelWrapper(parent), : wxPanelWrapper(parent, winid),
threshold(threshold), threshold(threshold),
noiseFloor(noiseFloor), noiseFloor(noiseFloor),
ratio(ratio) ratio(ratio)

View File

@ -138,7 +138,7 @@ private:
class EffectCompressorPanel final : public wxPanelWrapper class EffectCompressorPanel final : public wxPanelWrapper
{ {
public: public:
EffectCompressorPanel(wxWindow *parent, EffectCompressorPanel(wxWindow *parent, wxWindowID winid,
double & threshold, double & threshold,
double & noiseFloor, double & noiseFloor,
double & ratio); double & ratio);

View File

@ -642,7 +642,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
} }
S.EndVerticalLay(); S.EndVerticalLay();
mPanel = safenew EqualizationPanel(this, parent); mPanel = safenew EqualizationPanel(parent, wxID_ANY, this);
S.Prop(1); S.Prop(1);
S.AddWindow(mPanel, wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP); S.AddWindow(mPanel, wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP);
S.SetSizeHints(wxDefaultCoord, wxDefaultCoord); S.SetSizeHints(wxDefaultCoord, wxDefaultCoord);
@ -2844,8 +2844,9 @@ BEGIN_EVENT_TABLE(EqualizationPanel, wxPanelWrapper)
EVT_SIZE(EqualizationPanel::OnSize) EVT_SIZE(EqualizationPanel::OnSize)
END_EVENT_TABLE() END_EVENT_TABLE()
EqualizationPanel::EqualizationPanel(EffectEqualization *effect, wxWindow *parent) EqualizationPanel::EqualizationPanel(
: wxPanelWrapper(parent) wxWindow *parent, wxWindowID winid, EffectEqualization *effect)
: wxPanelWrapper(parent, winid)
{ {
mParent = parent; mParent = parent;
mEffect = effect; mEffect = effect;

View File

@ -287,7 +287,8 @@ private:
class EqualizationPanel final : public wxPanelWrapper class EqualizationPanel final : public wxPanelWrapper
{ {
public: public:
EqualizationPanel(EffectEqualization *effect, wxWindow *parent); EqualizationPanel(
wxWindow *parent, wxWindowID winid, EffectEqualization *effect);
~EqualizationPanel(); ~EqualizationPanel();
// We don't need or want to accept focus. // We don't need or want to accept focus.

View File

@ -395,7 +395,7 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
} }
S.EndVerticalLay(); S.EndVerticalLay();
mPanel = safenew EffectScienFilterPanel(this, parent); mPanel = safenew EffectScienFilterPanel(parent, wxID_ANY, this);
mPanel->SetFreqRange(mLoFreq, mNyquist); mPanel->SetFreqRange(mLoFreq, mNyquist);
S.SetBorder(5); S.SetBorder(5);
@ -1010,8 +1010,9 @@ BEGIN_EVENT_TABLE(EffectScienFilterPanel, wxPanelWrapper)
EVT_SIZE(EffectScienFilterPanel::OnSize) EVT_SIZE(EffectScienFilterPanel::OnSize)
END_EVENT_TABLE() END_EVENT_TABLE()
EffectScienFilterPanel::EffectScienFilterPanel(EffectScienFilter *effect, wxWindow *parent) EffectScienFilterPanel::EffectScienFilterPanel(
: wxPanelWrapper(parent, wxID_ANY, wxDefaultPosition, wxSize(400, 200)) wxWindow *parent, wxWindowID winid, EffectScienFilter *effect)
: wxPanelWrapper(parent, winid, wxDefaultPosition, wxSize(400, 200))
{ {
mEffect = effect; mEffect = effect;
mParent = parent; mParent = parent;

View File

@ -139,7 +139,8 @@ private:
class EffectScienFilterPanel final : public wxPanelWrapper class EffectScienFilterPanel final : public wxPanelWrapper
{ {
public: public:
EffectScienFilterPanel(EffectScienFilter *effect, wxWindow *parent); EffectScienFilterPanel(
wxWindow *parent, wxWindowID winid, EffectScienFilter *effect);
virtual ~EffectScienFilterPanel(); virtual ~EffectScienFilterPanel();
// We don't need or want to accept focus. // We don't need or want to accept focus.

View File

@ -1019,8 +1019,9 @@ BEGIN_EVENT_TABLE(ExportMixerPanel, wxPanelWrapper)
EVT_MOUSE_EVENTS(ExportMixerPanel::OnMouseEvent) EVT_MOUSE_EVENTS(ExportMixerPanel::OnMouseEvent)
END_EVENT_TABLE() END_EVENT_TABLE()
ExportMixerPanel::ExportMixerPanel( MixerSpec *mixerSpec, ExportMixerPanel::ExportMixerPanel( wxWindow *parent, wxWindowID id,
wxArrayString trackNames,wxWindow *parent, wxWindowID id, MixerSpec *mixerSpec,
wxArrayString trackNames,
const wxPoint& pos, const wxSize& size): const wxPoint& pos, const wxSize& size):
wxPanelWrapper(parent, id, pos, size) wxPanelWrapper(parent, id, pos, size)
, mMixerSpec{mixerSpec} , mMixerSpec{mixerSpec}
@ -1311,8 +1312,9 @@ ExportMixerDialog::ExportMixerDialog( const TrackList *tracks, bool selectedOnly
auto uVertSizer = std::make_unique<wxBoxSizer>(wxVERTICAL); auto uVertSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
vertSizer = uVertSizer.get(); vertSizer = uVertSizer.get();
wxWindow *mixerPanel = safenew ExportMixerPanel(mMixerSpec.get(), mTrackNames, this, wxWindow *mixerPanel = safenew ExportMixerPanel(this, ID_MIXERPANEL,
ID_MIXERPANEL, wxDefaultPosition, wxSize(400, -1)); mMixerSpec.get(), mTrackNames,
wxDefaultPosition, wxSize(400, -1));
mixerPanel->SetName(_("Mixer Panel")); mixerPanel->SetName(_("Mixer Panel"));
vertSizer->Add(mixerPanel, 1, wxEXPAND | wxALIGN_CENTRE | wxALL, 5); vertSizer->Add(mixerPanel, 1, wxEXPAND | wxALIGN_CENTRE | wxALL, 5);

View File

@ -233,8 +233,9 @@ private:
class ExportMixerPanel final : public wxPanelWrapper class ExportMixerPanel final : public wxPanelWrapper
{ {
public: public:
ExportMixerPanel( MixerSpec *mixerSpec, wxArrayString trackNames, ExportMixerPanel( wxWindow *parent, wxWindowID id,
wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, MixerSpec *mixerSpec, wxArrayString trackNames,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize); const wxSize& size = wxDefaultSize);
virtual ~ExportMixerPanel(); virtual ~ExportMixerPanel();