S.GetParent() for all windows passed to ShuttleGui::AddWindow()...

... Verified that this makes no real change.
This commit is contained in:
Paul Licameli 2017-10-20 12:45:27 -04:00
parent dabf5c0e39
commit 0cf90d65e6
9 changed files with 24 additions and 28 deletions

View File

@ -292,7 +292,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
S.StartVerticalLay(2);
{
vRuler = safenew RulerPanel(
this, wxID_ANY, wxVERTICAL,
S.GetParent(), wxID_ANY, wxVERTICAL,
wxSize{ 100, 100 }, // Ruler can't handle small sizes
RulerPanel::Range{ 0.0, -dBRange },
Ruler::LinearDBFormat,
@ -310,7 +310,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
}
S.EndVerticalLay();
mFreqPlot = safenew FreqPlot(this, wxID_ANY);
mFreqPlot = safenew FreqPlot(S.GetParent(), wxID_ANY);
S.Prop(1)
.Position(wxEXPAND)
.MinSize( { wxDefaultCoord, FREQ_WINDOW_HEIGHT } )
@ -320,7 +320,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
{
S.StartVerticalLay();
{
mPanScroller = safenew wxScrollBar(this, FreqPanScrollerID,
mPanScroller = safenew wxScrollBar(S.GetParent(), FreqPanScrollerID,
wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL);
#if wxUSE_ACCESSIBILITY
// so that name can be set on a standard control
@ -336,13 +336,13 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
S.StartVerticalLay();
{
wxStaticBitmap *zi = safenew wxStaticBitmap(this, wxID_ANY, wxBitmap(ZoomIn));
wxStaticBitmap *zi = safenew wxStaticBitmap(S.GetParent(), wxID_ANY, wxBitmap(ZoomIn));
S.Position(wxALIGN_CENTER)
.AddWindow(zi);
S.AddSpace(5);
mZoomSlider = safenew wxSliderWrapper(this, FreqZoomSliderID, 100, 1, 100,
mZoomSlider = safenew wxSliderWrapper(S.GetParent(), FreqZoomSliderID, 100, 1, 100,
wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL);
S.Prop(1);
S
@ -356,7 +356,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
S.AddSpace(5);
wxStaticBitmap *zo = safenew wxStaticBitmap(this, wxID_ANY, wxBitmap(ZoomOut));
wxStaticBitmap *zo = safenew wxStaticBitmap(S.GetParent(), wxID_ANY, wxBitmap(ZoomOut));
S.Position(wxALIGN_CENTER)
.AddWindow(zo);
}
@ -375,7 +375,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
S.StartHorizontalLay(wxEXPAND, 0);
{
hRuler = safenew RulerPanel(
this, wxID_ANY, wxHORIZONTAL,
S.GetParent(), wxID_ANY, wxHORIZONTAL,
wxSize{ 100, 100 }, // Ruler can't handle small sizes
RulerPanel::Range{ 10, 20000 },
Ruler::RealFormat,
@ -508,7 +508,7 @@ FrequencyPlotDialog::FrequencyPlotDialog(wxWindow * parent, wxWindowID id,
S.AddSpace(5);
mProgress = safenew FreqGauge(this, wxID_ANY); //, wxST_SIZEGRIP);
mProgress = safenew FreqGauge(S.GetParent(), wxID_ANY); //, wxST_SIZEGRIP);
S.Position(wxEXPAND)
.AddWindow(mProgress);

View File

@ -255,7 +255,7 @@ void LabelDialog::PopulateOrExchange( ShuttleGui & S )
{
S.StartVerticalLay(wxEXPAND,1);
{
mGrid = safenew Grid(this, wxID_ANY);
mGrid = safenew Grid(S.GetParent(), wxID_ANY);
S.Prop(1).AddWindow( mGrid );
}
S.EndVerticalLay();

View File

@ -725,8 +725,6 @@ bool EffectEqualization::CloseUI()
void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
{
wxWindow *const parent = S.GetParent();
//LoadCurves();
auto trackList = inputTracks();
@ -770,7 +768,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
S.StartVerticalLay(wxEXPAND, 1);
{
mdBRuler = safenew RulerPanel(
parent, wxID_ANY, wxVERTICAL,
S.GetParent(), wxID_ANY, wxVERTICAL,
wxSize{ 100, 100 }, // Ruler can't handle small sizes
RulerPanel::Range{ 60.0, -120.0 },
Ruler::LinearDBFormat,
@ -789,7 +787,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
}
S.EndVerticalLay();
mPanel = safenew EqualizationPanel(parent, wxID_ANY, this);
mPanel = safenew EqualizationPanel(S.GetParent(), wxID_ANY, this);
S.Prop(1)
.Position(wxEXPAND)
.MinSize( { wxDefaultCoord, wxDefaultCoord } )
@ -827,7 +825,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
S.AddSpace(1, 1);
mFreqRuler = safenew RulerPanel(
parent, wxID_ANY, wxHORIZONTAL,
S.GetParent(), wxID_ANY, wxHORIZONTAL,
wxSize{ 100, 100 }, // Ruler can't handle small sizes
RulerPanel::Range{ mLoFreq, mHiFreq },
Ruler::IntFormat,

View File

@ -263,7 +263,7 @@ private:
wxSizerItem *mLeftSpacer;
EqualizationPanel *mPanel;
wxPanel *mGraphicPanel;
//wxPanel *mGraphicPanel;
wxRadioButton *mDraw;
wxRadioButton *mGraphic;
wxCheckBox *mLinFreq;

View File

@ -359,8 +359,6 @@ bool EffectScienFilter::Init()
void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
{
wxWindow *const parent = S.GetParent();
S.AddSpace(5);
S.SetSizerProportion(1);
S.StartMultiColumn(3, wxEXPAND);
@ -375,7 +373,7 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
S.StartVerticalLay();
{
mdBRuler = safenew RulerPanel(
parent, wxID_ANY, wxVERTICAL,
S.GetParent(), wxID_ANY, wxVERTICAL,
wxSize{ 100, 100 }, // Ruler can't handle small sizes
RulerPanel::Range{ 30.0, -120.0 },
Ruler::LinearDBFormat,
@ -394,7 +392,7 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
S.EndVerticalLay();
mPanel = safenew EffectScienFilterPanel(
parent, wxID_ANY,
S.GetParent(), wxID_ANY,
this, mLoFreq, mNyquist
);
@ -432,8 +430,8 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
S.AddSpace(1, 1);
mfreqRuler = safenew RulerPanel(
parent, wxID_ANY, wxHORIZONTAL,
mfreqRuler = safenew RulerPanel(
S.GetParent(), wxID_ANY, wxHORIZONTAL,
wxSize{ 100, 100 }, // Ruler can't handle small sizes
RulerPanel::Range{ mLoFreq, mNyquist },
Ruler::IntFormat,

View File

@ -551,7 +551,7 @@ PrefsDialog::PrefsDialog
{
wxASSERT(factories.size() > 0);
if (!uniquePage) {
mCategories = safenew wxTreebookExt(this, wxID_ANY, mTitlePrefix);
mCategories = safenew wxTreebookExt(S.GetParent(), wxID_ANY, mTitlePrefix);
#if wxUSE_ACCESSIBILITY
// so that name can be set on a standard control
mCategories->GetTreeCtrl()->SetAccessible(
@ -602,7 +602,7 @@ PrefsDialog::PrefsDialog
// Unique page, don't show the factory
const PrefsNode &node = factories[0];
const PrefsPanel::Factory &factory = node.factory;
mUniquePage = factory(this, wxID_ANY);
mUniquePage = factory(S.GetParent(), wxID_ANY);
wxWindow * uniquePageWindow = S.Prop(1)
.Position(wxEXPAND)
.AddWindow(mUniquePage);

View File

@ -125,7 +125,7 @@ void LabelTrackMenuTable::OnSetFont(wxCommandEvent &)
/* i18n-hint: (noun) The name of the typeface*/
S.AddPrompt(_("Face name"));
lb = safenew wxListBox(&dlg, wxID_ANY,
lb = safenew wxListBox(S.GetParent(), wxID_ANY,
wxDefaultPosition,
wxDefaultSize,
facenames,
@ -139,7 +139,7 @@ void LabelTrackMenuTable::OnSetFont(wxCommandEvent &)
/* i18n-hint: (noun) The size of the typeface*/
S.AddPrompt(_("Face size"));
sc = safenew wxSpinCtrl(&dlg, wxID_ANY,
sc = safenew wxSpinCtrl(S.GetParent(), wxID_ANY,
wxString::Format(wxT("%ld"), fontsize),
wxDefaultPosition,
wxDefaultSize,

View File

@ -283,7 +283,7 @@ SliderDialog::SliderDialog(wxWindow * parent, wxWindowID id,
mTextCtrl = S.Validator<wxTextValidator>(wxFILTER_NUMERIC)
.AddTextBox( {}, wxEmptyString, 15);
mSlider = safenew ASlider(this,
mSlider = safenew ASlider(S.GetParent(),
wxID_ANY,
title,
wxDefaultPosition,

View File

@ -160,7 +160,7 @@ void HelpSystem::ShowHtmlText(wxWindow *pParent,
pFrame->SetTransparent(0);
ShuttleGui S( pWnd, eIsCreating );
wxPanel *pPan = S.Style( wxNO_BORDER | wxTAB_TRAVERSAL )
S.Style( wxNO_BORDER | wxTAB_TRAVERSAL )
.Prop(true)
.StartPanel();
{
@ -181,7 +181,7 @@ void HelpSystem::ShowHtmlText(wxWindow *pParent,
}
S.EndHorizontalLay();
html = safenew LinkingHtmlWindow(pPan, wxID_ANY,
html = safenew LinkingHtmlWindow(S.GetParent(), wxID_ANY,
wxDefaultPosition,
bIsFile ? wxSize(500, 400) : wxSize(480, 240),
wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);