Rename ShuttleGui::SetSizeHints, chain-call it like other methods...
... And rewrite some other existing calls to SetMinSize
This commit is contained in:
parent
64a96e6f01
commit
b5ee7676fd
|
@ -216,8 +216,8 @@ void BenchmarkDialog::MakeBenchmarkDialog()
|
||||||
mText = S.Id(StaticTextID)
|
mText = S.Id(StaticTextID)
|
||||||
/* i18n-hint noun */
|
/* i18n-hint noun */
|
||||||
.Name(XO("Output"))
|
.Name(XO("Output"))
|
||||||
|
.MinSize( { 500, 200 } )
|
||||||
.AddTextWindow(wxT(""));
|
.AddTextWindow(wxT(""));
|
||||||
mText->SetSizeHints(wxSize(500,200));
|
|
||||||
|
|
||||||
//
|
//
|
||||||
S.SetBorder(10);
|
S.SetBorder(10);
|
||||||
|
|
|
@ -310,9 +310,9 @@ FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id,
|
||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
|
|
||||||
mFreqPlot = safenew FreqPlot(this, wxID_ANY);
|
mFreqPlot = safenew FreqPlot(this, wxID_ANY);
|
||||||
mFreqPlot->SetMinSize(wxSize(wxDefaultCoord, FREQ_WINDOW_HEIGHT));
|
S.Prop(1)
|
||||||
S.Prop(1);
|
.MinSize( { wxDefaultCoord, FREQ_WINDOW_HEIGHT } )
|
||||||
S.AddWindow(mFreqPlot, wxEXPAND);
|
.AddWindow(mFreqPlot, wxEXPAND);
|
||||||
|
|
||||||
S.StartHorizontalLay(wxEXPAND, 0);
|
S.StartHorizontalLay(wxEXPAND, 0);
|
||||||
{
|
{
|
||||||
|
@ -448,14 +448,14 @@ FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id,
|
||||||
S.AddSpace(5);
|
S.AddSpace(5);
|
||||||
|
|
||||||
mAlgChoice = S.Id(FreqAlgChoiceID).Focus()
|
mAlgChoice = S.Id(FreqAlgChoiceID).Focus()
|
||||||
|
.MinSize( { wxDefaultCoord, wxDefaultCoord } )
|
||||||
.AddChoice(_("&Algorithm:"), algChoices, mAlg);
|
.AddChoice(_("&Algorithm:"), algChoices, mAlg);
|
||||||
S.SetSizeHints(wxDefaultCoord, wxDefaultCoord);
|
|
||||||
|
|
||||||
S.AddSpace(5);
|
S.AddSpace(5);
|
||||||
|
|
||||||
mSizeChoice = S.Id(FreqSizeChoiceID)
|
mSizeChoice = S.Id(FreqSizeChoiceID)
|
||||||
|
.MinSize( { wxDefaultCoord, wxDefaultCoord } )
|
||||||
.AddChoice(_("&Size:"), sizeChoices, mSize);
|
.AddChoice(_("&Size:"), sizeChoices, mSize);
|
||||||
S.SetSizeHints(wxDefaultCoord, wxDefaultCoord);
|
|
||||||
|
|
||||||
S.AddSpace(5);
|
S.AddSpace(5);
|
||||||
|
|
||||||
|
@ -471,15 +471,15 @@ FreqWindow::FreqWindow(wxWindow * parent, wxWindowID id,
|
||||||
S.AddSpace(5);
|
S.AddSpace(5);
|
||||||
|
|
||||||
mFuncChoice = S.Id(FreqFuncChoiceID)
|
mFuncChoice = S.Id(FreqFuncChoiceID)
|
||||||
|
.MinSize( { wxDefaultCoord, wxDefaultCoord } )
|
||||||
.AddChoice(_("&Function:"), funcChoices, mFunc);
|
.AddChoice(_("&Function:"), funcChoices, mFunc);
|
||||||
S.SetSizeHints(wxDefaultCoord, wxDefaultCoord);
|
|
||||||
mFuncChoice->MoveAfterInTabOrder(mSizeChoice);
|
mFuncChoice->MoveAfterInTabOrder(mSizeChoice);
|
||||||
|
|
||||||
S.AddSpace(5);
|
S.AddSpace(5);
|
||||||
|
|
||||||
mAxisChoice = S.Id(FreqAxisChoiceID)
|
mAxisChoice = S.Id(FreqAxisChoiceID)
|
||||||
|
.MinSize( { wxDefaultCoord, wxDefaultCoord } )
|
||||||
.AddChoice(_("&Axis:"), axisChoices, mAxis);
|
.AddChoice(_("&Axis:"), axisChoices, mAxis);
|
||||||
S.SetSizeHints(wxDefaultCoord, wxDefaultCoord);
|
|
||||||
mAxisChoice->MoveAfterInTabOrder(mFuncChoice);
|
mAxisChoice->MoveAfterInTabOrder(mFuncChoice);
|
||||||
|
|
||||||
S.AddSpace(5);
|
S.AddSpace(5);
|
||||||
|
|
|
@ -84,6 +84,7 @@ HistoryWindow::HistoryWindow(AudacityProject *parent, UndoManager *manager):
|
||||||
S.StartStatic(_("&Manage History"), 1);
|
S.StartStatic(_("&Manage History"), 1);
|
||||||
{
|
{
|
||||||
mList = S
|
mList = S
|
||||||
|
.MinSize()
|
||||||
.AddListControlReportMode(
|
.AddListControlReportMode(
|
||||||
{ { _("Action"), wxLIST_FORMAT_LEFT, 260 },
|
{ { _("Action"), wxLIST_FORMAT_LEFT, 260 },
|
||||||
{ _("Reclaimable Space"), wxLIST_FORMAT_LEFT, 125 } },
|
{ _("Reclaimable Space"), wxLIST_FORMAT_LEFT, 125 } },
|
||||||
|
@ -139,7 +140,6 @@ HistoryWindow::HistoryWindow(AudacityProject *parent, UndoManager *manager):
|
||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
// ----------------------- End of main section --------------
|
// ----------------------- End of main section --------------
|
||||||
|
|
||||||
mList->SetMinSize(mList->GetSize());
|
|
||||||
Fit();
|
Fit();
|
||||||
SetMinSize(GetSize());
|
SetMinSize(GetSize());
|
||||||
mList->SetColumnWidth(0, mList->GetClientSize().x - mList->GetColumnWidth(1));
|
mList->SetColumnWidth(0, mList->GetClientSize().x - mList->GetColumnWidth(1));
|
||||||
|
|
|
@ -184,14 +184,6 @@ void ShuttleGuiBase::ResetId()
|
||||||
miIdNext = 3000;
|
miIdNext = 3000;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Used to modify an already placed Window.
|
|
||||||
void ShuttleGuiBase::SetSizeHints( int minX, int minY )
|
|
||||||
{
|
|
||||||
if( mShuttleMode != eIsCreating )
|
|
||||||
return;
|
|
||||||
mpLastWind->SetSizeHints( minX, minY );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Used to modify an already placed FlexGridSizer to make a column stretchy.
|
/// Used to modify an already placed FlexGridSizer to make a column stretchy.
|
||||||
void ShuttleGuiBase::SetStretchyCol( int i )
|
void ShuttleGuiBase::SetStretchyCol( int i )
|
||||||
|
@ -1460,6 +1452,7 @@ wxChoice * ShuttleGuiBase::DoTieChoice(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pChoice = AddChoice( Prompt, choices, WrappedRef.ReadAsInt() );
|
pChoice = AddChoice( Prompt, choices, WrappedRef.ReadAsInt() );
|
||||||
|
ShuttleGui::SetMinSize(pChoice, choices);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// IF setting internal storage from the controls.
|
// IF setting internal storage from the controls.
|
||||||
|
@ -1497,7 +1490,6 @@ wxChoice * ShuttleGuiBase::DoTieChoice(
|
||||||
wxASSERT( false );
|
wxASSERT( false );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
SetSizeHints(choices);
|
|
||||||
return pChoice;
|
return pChoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2086,6 +2078,11 @@ void ShuttleGuiBase::UpdateSizersCore(bool bPrepend, int Flags, bool prompt)
|
||||||
for (auto &pair : mItem.mRootConnections)
|
for (auto &pair : mItem.mRootConnections)
|
||||||
mpWind->Connect( pair.first, pair.second, nullptr, mpDlg );
|
mpWind->Connect( pair.first, pair.second, nullptr, mpDlg );
|
||||||
|
|
||||||
|
if( mItem.mUseBestSize )
|
||||||
|
mpWind->SetMinSize( mpWind->GetBestSize() );
|
||||||
|
else if( mItem.mHasMinSize )
|
||||||
|
mpWind->SetMinSize( mItem.mMinSize );
|
||||||
|
|
||||||
// Reset to defaults
|
// Reset to defaults
|
||||||
mItem = {};
|
mItem = {};
|
||||||
}
|
}
|
||||||
|
@ -2107,7 +2104,7 @@ void ShuttleGuiBase::UpdateSizersCore(bool bPrepend, int Flags, bool prompt)
|
||||||
mpSizer = pSubSizer;
|
mpSizer = pSubSizer;
|
||||||
PushSizer();
|
PushSizer();
|
||||||
}
|
}
|
||||||
mpLastWind = mpWind;
|
|
||||||
mpWind = NULL;
|
mpWind = NULL;
|
||||||
miProp = 0;
|
miProp = 0;
|
||||||
miSizerProp =0;
|
miSizerProp =0;
|
||||||
|
@ -2398,7 +2395,7 @@ wxSizerItem * ShuttleGui::AddSpace( int width, int height )
|
||||||
return mpSizer->Add( width, height, miProp);
|
return mpSizer->Add( width, height, miProp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShuttleGuiBase::SetSizeHints( wxWindow *window, const wxArrayStringEx & items )
|
void ShuttleGui::SetMinSize( wxWindow *window, const wxArrayStringEx & items )
|
||||||
{
|
{
|
||||||
int maxw = 0;
|
int maxw = 0;
|
||||||
|
|
||||||
|
@ -2429,10 +2426,16 @@ void ShuttleGuiBase::SetSizeHints( wxWindow *window, const wxArrayStringEx & ite
|
||||||
window->SetMinSize( { maxw, -1 } );
|
window->SetMinSize( { maxw, -1 } );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShuttleGuiBase::SetSizeHints( const wxArrayStringEx & items )
|
/*
|
||||||
|
void ShuttleGui::SetMinSize( wxWindow *window, const std::vector<int> & items )
|
||||||
{
|
{
|
||||||
if( mShuttleMode != eIsCreating )
|
wxArrayStringEx strs;
|
||||||
return;
|
|
||||||
|
|
||||||
SetSizeHints( mpLastWind, items );
|
for( size_t i = 0; i < items.size(); i++ )
|
||||||
|
{
|
||||||
|
strs.Add( wxString::Format( wxT("%d"), items[i] ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
SetMinSize( window, strs );
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
|
@ -203,6 +203,18 @@ struct Item {
|
||||||
return std::move( *this );
|
return std::move( *this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item&& MinSize() && // set best size as min size
|
||||||
|
{
|
||||||
|
mUseBestSize = true;
|
||||||
|
return std::move ( *this );
|
||||||
|
}
|
||||||
|
|
||||||
|
Item&& MinSize( wxSize sz ) &&
|
||||||
|
{
|
||||||
|
mMinSize = sz; mHasMinSize = true;
|
||||||
|
return std::move ( *this );
|
||||||
|
}
|
||||||
|
|
||||||
std::function< void(wxWindow*) > mValidatorSetter;
|
std::function< void(wxWindow*) > mValidatorSetter;
|
||||||
TranslatableString mToolTip;
|
TranslatableString mToolTip;
|
||||||
TranslatableString mName;
|
TranslatableString mName;
|
||||||
|
@ -212,8 +224,13 @@ struct Item {
|
||||||
|
|
||||||
long miStyle{};
|
long miStyle{};
|
||||||
|
|
||||||
|
wxSize mMinSize{ -1, -1 };
|
||||||
|
bool mHasMinSize{ false };
|
||||||
|
bool mUseBestSize{ false };
|
||||||
|
|
||||||
bool mFocused { false };
|
bool mFocused { false };
|
||||||
bool mDisabled { false };
|
bool mDisabled { false };
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -419,7 +436,6 @@ public:
|
||||||
const int max,
|
const int max,
|
||||||
const int min);
|
const int min);
|
||||||
//-- End of variants.
|
//-- End of variants.
|
||||||
void SetSizeHints( int minX, int minY );
|
|
||||||
void SetBorder( int Border ) {miBorder = Border;};
|
void SetBorder( int Border ) {miBorder = Border;};
|
||||||
void SetSizerProportion( int iProp ) {miSizerProp = iProp;};
|
void SetSizerProportion( int iProp ) {miSizerProp = iProp;};
|
||||||
void SetStretchyCol( int i );
|
void SetStretchyCol( int i );
|
||||||
|
@ -451,18 +467,12 @@ protected:
|
||||||
long GetStyle( long Style );
|
long GetStyle( long Style );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetSizeHints( const wxArrayStringEx & items );
|
|
||||||
|
|
||||||
void DoInsertListColumns(
|
void DoInsertListColumns(
|
||||||
wxListCtrl *pListCtrl,
|
wxListCtrl *pListCtrl,
|
||||||
long listControlStyles,
|
long listControlStyles,
|
||||||
std::initializer_list<const ListControlColumn> columns );
|
std::initializer_list<const ListControlColumn> columns );
|
||||||
|
|
||||||
public:
|
|
||||||
static void SetSizeHints( wxWindow *window, const wxArrayStringEx & items );
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxWindow * mpLastWind;
|
|
||||||
wxWindow *const mpDlg;
|
wxWindow *const mpDlg;
|
||||||
wxSizer * pSizerStack[ nMaxNestedSizers ];
|
wxSizer * pSizerStack[ nMaxNestedSizers ];
|
||||||
|
|
||||||
|
@ -647,6 +657,11 @@ public:
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ShuttleGui &MinSize() // set best size as min size
|
||||||
|
{ std::move( mItem ).MinSize(); return *this; }
|
||||||
|
ShuttleGui &MinSize( wxSize sz )
|
||||||
|
{ std::move( mItem ).MinSize( sz ); return *this; }
|
||||||
|
|
||||||
GuiWaveTrack * AddGuiWaveTrack( const wxString & Name);
|
GuiWaveTrack * AddGuiWaveTrack( const wxString & Name);
|
||||||
AttachableScrollBar * AddAttachableScrollBar( long style = wxSB_HORIZONTAL );
|
AttachableScrollBar * AddAttachableScrollBar( long style = wxSB_HORIZONTAL );
|
||||||
|
|
||||||
|
@ -658,6 +673,11 @@ public:
|
||||||
wxSizerItem * AddSpace( int width, int height );
|
wxSizerItem * AddSpace( int width, int height );
|
||||||
wxSizerItem * AddSpace( int size ) { return AddSpace( size, size ); };
|
wxSizerItem * AddSpace( int size ) { return AddSpace( size, size ); };
|
||||||
|
|
||||||
|
// Calculate width of a choice control adequate for the items, maybe after
|
||||||
|
// the dialog is created but the items change.
|
||||||
|
static void SetMinSize( wxWindow *window, const wxArrayStringEx & items );
|
||||||
|
// static void SetMinSize( wxWindow *window, const std::vector<int> & items );
|
||||||
|
|
||||||
teShuttleMode GetMode() { return mShuttleMode; };
|
teShuttleMode GetMode() { return mShuttleMode; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -278,24 +278,24 @@ void EffectChangePitch::PopulateOrExchange(ShuttleGui & S)
|
||||||
m_pChoice_FromPitch = S.Id(ID_FromPitch)
|
m_pChoice_FromPitch = S.Id(ID_FromPitch)
|
||||||
/* i18n-hint: changing a quantity "from" one value "to" another */
|
/* i18n-hint: changing a quantity "from" one value "to" another */
|
||||||
.Name(XO("from"))
|
.Name(XO("from"))
|
||||||
|
.MinSize( { 80, -1 } )
|
||||||
.AddChoice(_("from"), pitch);
|
.AddChoice(_("from"), pitch);
|
||||||
m_pChoice_FromPitch->SetSizeHints(80, -1);
|
|
||||||
|
|
||||||
m_pSpin_FromOctave = S.Id(ID_FromOctave)
|
m_pSpin_FromOctave = S.Id(ID_FromOctave)
|
||||||
.Name(XO("from Octave"))
|
.Name(XO("from Octave"))
|
||||||
|
.MinSize( { 50, -1 } )
|
||||||
.AddSpinCtrl( {}, m_nFromOctave, INT_MAX, INT_MIN);
|
.AddSpinCtrl( {}, m_nFromOctave, INT_MAX, INT_MIN);
|
||||||
m_pSpin_FromOctave->SetSizeHints(50, -1);
|
|
||||||
|
|
||||||
m_pChoice_ToPitch = S.Id(ID_ToPitch)
|
m_pChoice_ToPitch = S.Id(ID_ToPitch)
|
||||||
/* i18n-hint: changing a quantity "from" one value "to" another */
|
/* i18n-hint: changing a quantity "from" one value "to" another */
|
||||||
.Name(XO("to"))
|
.Name(XO("to"))
|
||||||
|
.MinSize( { 80, -1 } )
|
||||||
.AddChoice(_("to"), pitch);
|
.AddChoice(_("to"), pitch);
|
||||||
m_pChoice_ToPitch->SetSizeHints(80, -1);
|
|
||||||
|
|
||||||
m_pSpin_ToOctave = S.Id(ID_ToOctave)
|
m_pSpin_ToOctave = S.Id(ID_ToOctave)
|
||||||
.Name(XO("to Octave"))
|
.Name(XO("to Octave"))
|
||||||
|
.MinSize( { 50, -1 } )
|
||||||
.AddSpinCtrl( {}, m_nToOctave, INT_MAX, INT_MIN);
|
.AddSpinCtrl( {}, m_nToOctave, INT_MAX, INT_MIN);
|
||||||
m_pSpin_ToOctave->SetSizeHints(50, -1);
|
|
||||||
}
|
}
|
||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
|
|
||||||
|
|
|
@ -349,15 +349,15 @@ void EffectChangeSpeed::PopulateOrExchange(ShuttleGui & S)
|
||||||
|
|
||||||
mpChoice_FromVinyl = S.Id(ID_FromVinyl)
|
mpChoice_FromVinyl = S.Id(ID_FromVinyl)
|
||||||
.Name(XO("From rpm"))
|
.Name(XO("From rpm"))
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
/* i18n-hint: changing a quantity "from" one value "to" another */
|
/* i18n-hint: changing a quantity "from" one value "to" another */
|
||||||
.AddChoice(_("from"), vinylChoices);
|
.AddChoice(_("from"), vinylChoices);
|
||||||
mpChoice_FromVinyl->SetSizeHints(100, -1);
|
|
||||||
|
|
||||||
mpChoice_ToVinyl = S.Id(ID_ToVinyl)
|
mpChoice_ToVinyl = S.Id(ID_ToVinyl)
|
||||||
/* i18n-hint: changing a quantity "from" one value "to" another */
|
/* i18n-hint: changing a quantity "from" one value "to" another */
|
||||||
.Name(XO("To rpm"))
|
.Name(XO("To rpm"))
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddChoice(_("to"), vinylChoices);
|
.AddChoice(_("to"), vinylChoices);
|
||||||
mpChoice_ToVinyl->SetSizeHints(100, -1);
|
|
||||||
}
|
}
|
||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
|
|
||||||
|
|
|
@ -351,8 +351,8 @@ void EffectClickRemoval::PopulateOrExchange(ShuttleGui & S)
|
||||||
.Name(XO("Threshold"))
|
.Name(XO("Threshold"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
.Validator<wxGenericValidator>(&mThresholdLevel)
|
.Validator<wxGenericValidator>(&mThresholdLevel)
|
||||||
|
.MinSize( { 150, -1 } )
|
||||||
.AddSlider( {}, mThresholdLevel, MAX_Threshold, MIN_Threshold);
|
.AddSlider( {}, mThresholdLevel, MAX_Threshold, MIN_Threshold);
|
||||||
mThreshS->SetMinSize(wxSize(150, -1));
|
|
||||||
|
|
||||||
// Click width
|
// Click width
|
||||||
mWidthT = S.Id(ID_Width)
|
mWidthT = S.Id(ID_Width)
|
||||||
|
@ -366,8 +366,8 @@ void EffectClickRemoval::PopulateOrExchange(ShuttleGui & S)
|
||||||
.Name(XO("Max Spike Width"))
|
.Name(XO("Max Spike Width"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
.Validator<wxGenericValidator>(&mClickWidth)
|
.Validator<wxGenericValidator>(&mClickWidth)
|
||||||
|
.MinSize( { 150, -1 } )
|
||||||
.AddSlider( {}, mClickWidth, MAX_Width, MIN_Width);
|
.AddSlider( {}, mClickWidth, MAX_Width, MIN_Width);
|
||||||
mWidthS->SetMinSize(wxSize(150, -1));
|
|
||||||
}
|
}
|
||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
|
|
||||||
|
|
|
@ -213,8 +213,9 @@ void EffectCompressor::PopulateOrExchange(ShuttleGui & S)
|
||||||
mThresholdDB,
|
mThresholdDB,
|
||||||
mNoiseFloorDB,
|
mNoiseFloorDB,
|
||||||
mRatio);
|
mRatio);
|
||||||
mPanel->SetMinSize(wxSize(400, 200));
|
S.Prop(true)
|
||||||
S.Prop(true).AddWindow(mPanel, wxEXPAND | wxALL);
|
.MinSize( { 400, 200 } )
|
||||||
|
.AddWindow(mPanel, wxEXPAND | wxALL);
|
||||||
S.SetBorder(5);
|
S.SetBorder(5);
|
||||||
}
|
}
|
||||||
S.EndHorizontalLay();
|
S.EndHorizontalLay();
|
||||||
|
|
|
@ -367,10 +367,10 @@ void EffectDistortion::PopulateOrExchange(ShuttleGui & S)
|
||||||
S.StartMultiColumn(4, wxCENTER);
|
S.StartMultiColumn(4, wxCENTER);
|
||||||
{
|
{
|
||||||
mTypeChoiceCtrl = S.Id(ID_Type)
|
mTypeChoiceCtrl = S.Id(ID_Type)
|
||||||
|
.MinSize( { -1, -1 } )
|
||||||
.Validator<wxGenericValidator>(&mParams.mTableChoiceIndx)
|
.Validator<wxGenericValidator>(&mParams.mTableChoiceIndx)
|
||||||
.AddChoice(_("Distortion type:"),
|
.AddChoice(_("Distortion type:"),
|
||||||
LocalizedStrings(kTableTypeStrings, nTableTypes));
|
LocalizedStrings(kTableTypeStrings, nTableTypes));
|
||||||
S.SetSizeHints(-1, -1);
|
|
||||||
|
|
||||||
mDCBlockCheckBox = S.Id(ID_DCBlock).AddCheckBox(_("DC blocking filter"),
|
mDCBlockCheckBox = S.Id(ID_DCBlock).AddCheckBox(_("DC blocking filter"),
|
||||||
DEF_DCBlock);
|
DEF_DCBlock);
|
||||||
|
|
|
@ -355,11 +355,11 @@ void EffectDtmf::PopulateOrExchange(ShuttleGui & S)
|
||||||
S.AddFixedText(_("Tone/silence ratio:"), false);
|
S.AddFixedText(_("Tone/silence ratio:"), false);
|
||||||
mDtmfDutyCycleS = S.Id(ID_DutyCycle)
|
mDtmfDutyCycleS = S.Id(ID_DutyCycle)
|
||||||
.Style(wxSL_HORIZONTAL | wxEXPAND)
|
.Style(wxSL_HORIZONTAL | wxEXPAND)
|
||||||
|
.MinSize( { -1, -1 } )
|
||||||
.AddSlider( {},
|
.AddSlider( {},
|
||||||
dtmfDutyCycle * SCL_DutyCycle,
|
dtmfDutyCycle * SCL_DutyCycle,
|
||||||
MAX_DutyCycle * SCL_DutyCycle,
|
MAX_DutyCycle * SCL_DutyCycle,
|
||||||
MIN_DutyCycle * SCL_DutyCycle);
|
MIN_DutyCycle * SCL_DutyCycle);
|
||||||
S.SetSizeHints(-1,-1);
|
|
||||||
}
|
}
|
||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
|
|
||||||
|
|
|
@ -789,8 +789,9 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
|
||||||
|
|
||||||
mPanel = safenew EqualizationPanel(parent, wxID_ANY, this);
|
mPanel = safenew EqualizationPanel(parent, wxID_ANY, this);
|
||||||
S.Prop(1);
|
S.Prop(1);
|
||||||
S.AddWindow(mPanel, wxEXPAND );
|
S
|
||||||
S.SetSizeHints(wxDefaultCoord, wxDefaultCoord);
|
.MinSize( { wxDefaultCoord, wxDefaultCoord } )
|
||||||
|
.AddWindow(mPanel, wxEXPAND );
|
||||||
|
|
||||||
S.SetBorder(5);
|
S.SetBorder(5);
|
||||||
S.StartVerticalLay();
|
S.StartVerticalLay();
|
||||||
|
|
|
@ -1440,8 +1440,8 @@ struct ControlInfo {
|
||||||
S.Id(id)
|
S.Id(id)
|
||||||
.Name( sliderName )
|
.Name( sliderName )
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 150, -1 } )
|
||||||
.AddSlider( {}, 0, sliderMax);
|
.AddSlider( {}, 0, sliderMax);
|
||||||
slider->SetSizeHints(150, -1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MemberPointer field;
|
MemberPointer field;
|
||||||
|
|
|
@ -724,8 +724,8 @@ void NoiseRemovalDialog::PopulateOrExchange(ShuttleGui & S)
|
||||||
mGainS = S.Id(ID_GAIN_SLIDER)
|
mGainS = S.Id(ID_GAIN_SLIDER)
|
||||||
.Name(XO("Noise reduction"))
|
.Name(XO("Noise reduction"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 150, -1 } )
|
||||||
.AddSlider(wxT(""), 0, GAIN_MAX, GAIN_MIN);
|
.AddSlider(wxT(""), 0, GAIN_MAX, GAIN_MIN);
|
||||||
mGainS->SetSizeHints(150, -1);
|
|
||||||
|
|
||||||
mSensitivityT = S.Id(ID_SENSITIVITY_TEXT)
|
mSensitivityT = S.Id(ID_SENSITIVITY_TEXT)
|
||||||
.Validator<wxTextValidator>(wxFILTER_NUMERIC)
|
.Validator<wxTextValidator>(wxFILTER_NUMERIC)
|
||||||
|
@ -733,8 +733,8 @@ void NoiseRemovalDialog::PopulateOrExchange(ShuttleGui & S)
|
||||||
mSensitivityS = S.Id(ID_SENSITIVITY_SLIDER)
|
mSensitivityS = S.Id(ID_SENSITIVITY_SLIDER)
|
||||||
.Name(XO("Sensitivity"))
|
.Name(XO("Sensitivity"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 150, -1 } )
|
||||||
.AddSlider(wxT(""), 0, SENSITIVITY_MAX, SENSITIVITY_MIN);
|
.AddSlider(wxT(""), 0, SENSITIVITY_MAX, SENSITIVITY_MIN);
|
||||||
mSensitivityS->SetSizeHints(150, -1);
|
|
||||||
|
|
||||||
mFreqT = S.Id(ID_FREQ_TEXT)
|
mFreqT = S.Id(ID_FREQ_TEXT)
|
||||||
.Validator<wxTextValidator>(wxFILTER_NUMERIC)
|
.Validator<wxTextValidator>(wxFILTER_NUMERIC)
|
||||||
|
@ -742,8 +742,8 @@ void NoiseRemovalDialog::PopulateOrExchange(ShuttleGui & S)
|
||||||
mFreqS = S.Id(ID_FREQ_SLIDER)
|
mFreqS = S.Id(ID_FREQ_SLIDER)
|
||||||
.Name(XO("Frequency smoothing"))
|
.Name(XO("Frequency smoothing"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 150, -1 } )
|
||||||
.AddSlider(wxT(""), 0, FREQ_MAX, FREQ_MIN);
|
.AddSlider(wxT(""), 0, FREQ_MAX, FREQ_MIN);
|
||||||
mFreqS->SetSizeHints(150, -1);
|
|
||||||
|
|
||||||
mTimeT = S.Id(ID_TIME_TEXT)
|
mTimeT = S.Id(ID_TIME_TEXT)
|
||||||
.Validator<wxTextValidator>(wxFILTER_NUMERIC)
|
.Validator<wxTextValidator>(wxFILTER_NUMERIC)
|
||||||
|
@ -751,8 +751,8 @@ void NoiseRemovalDialog::PopulateOrExchange(ShuttleGui & S)
|
||||||
mTimeS = S.Id(ID_TIME_SLIDER)
|
mTimeS = S.Id(ID_TIME_SLIDER)
|
||||||
.Name(XO("Attack/decay time"))
|
.Name(XO("Attack/decay time"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 150, -1 } )
|
||||||
.AddSlider(wxT(""), 0, TIME_MAX, TIME_MIN);
|
.AddSlider(wxT(""), 0, TIME_MAX, TIME_MIN);
|
||||||
mTimeS->SetSizeHints(150, -1);
|
|
||||||
|
|
||||||
S.AddPrompt(_("Noise:"));
|
S.AddPrompt(_("Noise:"));
|
||||||
mKeepSignal = S.Id(ID_RADIOBUTTON_KEEPSIGNAL)
|
mKeepSignal = S.Id(ID_RADIOBUTTON_KEEPSIGNAL)
|
||||||
|
|
|
@ -300,10 +300,10 @@ void EffectNormalize::PopulateOrExchange(ShuttleGui & S)
|
||||||
S.StartHorizontalLay(wxALIGN_LEFT, false);
|
S.StartHorizontalLay(wxALIGN_LEFT, false);
|
||||||
{
|
{
|
||||||
mGainCheckBox = S
|
mGainCheckBox = S
|
||||||
|
.MinSize()
|
||||||
.Validator<wxGenericValidator>(&mGain)
|
.Validator<wxGenericValidator>(&mGain)
|
||||||
.AddCheckBox(_("Normalize peak amplitude to "),
|
.AddCheckBox(_("Normalize peak amplitude to "),
|
||||||
mGain);
|
mGain);
|
||||||
mGainCheckBox->SetMinSize( mGainCheckBox->GetSize());
|
|
||||||
|
|
||||||
mLevelTextCtrl = S
|
mLevelTextCtrl = S
|
||||||
.Name(XO("Peak amplitude dB"))
|
.Name(XO("Peak amplitude dB"))
|
||||||
|
|
|
@ -264,9 +264,9 @@ void EffectPhaser::PopulateOrExchange(ShuttleGui & S)
|
||||||
mStagesS = S.Id(ID_Stages)
|
mStagesS = S.Id(ID_Stages)
|
||||||
.Name(XO("Stages"))
|
.Name(XO("Stages"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddSlider( {}, DEF_Stages * SCL_Stages, MAX_Stages * SCL_Stages, MIN_Stages * SCL_Stages);
|
.AddSlider( {}, DEF_Stages * SCL_Stages, MAX_Stages * SCL_Stages, MIN_Stages * SCL_Stages);
|
||||||
mStagesS->SetLineSize(2);
|
mStagesS->SetLineSize(2);
|
||||||
mStagesS->SetMinSize(wxSize(100, -1));
|
|
||||||
|
|
||||||
mDryWetT = S.Id(ID_DryWet)
|
mDryWetT = S.Id(ID_DryWet)
|
||||||
.Validator<IntegerValidator<int>>(
|
.Validator<IntegerValidator<int>>(
|
||||||
|
@ -276,8 +276,8 @@ void EffectPhaser::PopulateOrExchange(ShuttleGui & S)
|
||||||
mDryWetS = S.Id(ID_DryWet)
|
mDryWetS = S.Id(ID_DryWet)
|
||||||
.Name(XO("Dry Wet"))
|
.Name(XO("Dry Wet"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddSlider( {}, DEF_DryWet * SCL_DryWet, MAX_DryWet * SCL_DryWet, MIN_DryWet * SCL_DryWet);
|
.AddSlider( {}, DEF_DryWet * SCL_DryWet, MAX_DryWet * SCL_DryWet, MIN_DryWet * SCL_DryWet);
|
||||||
mDryWetS->SetMinSize(wxSize(100, -1));
|
|
||||||
|
|
||||||
mFreqT = S.Id(ID_Freq)
|
mFreqT = S.Id(ID_Freq)
|
||||||
.Validator<FloatingPointValidator<double>>(
|
.Validator<FloatingPointValidator<double>>(
|
||||||
|
@ -287,8 +287,8 @@ void EffectPhaser::PopulateOrExchange(ShuttleGui & S)
|
||||||
mFreqS = S.Id(ID_Freq)
|
mFreqS = S.Id(ID_Freq)
|
||||||
.Name(XO("LFO frequency in hertz"))
|
.Name(XO("LFO frequency in hertz"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddSlider( {}, DEF_Freq * SCL_Freq, MAX_Freq * SCL_Freq, 0.0);
|
.AddSlider( {}, DEF_Freq * SCL_Freq, MAX_Freq * SCL_Freq, 0.0);
|
||||||
mFreqS ->SetMinSize(wxSize(100, -1));
|
|
||||||
|
|
||||||
mPhaseT = S.Id(ID_Phase)
|
mPhaseT = S.Id(ID_Phase)
|
||||||
.Validator<FloatingPointValidator<double>>(
|
.Validator<FloatingPointValidator<double>>(
|
||||||
|
@ -298,9 +298,9 @@ void EffectPhaser::PopulateOrExchange(ShuttleGui & S)
|
||||||
mPhaseS = S.Id(ID_Phase)
|
mPhaseS = S.Id(ID_Phase)
|
||||||
.Name(XO("LFO start phase in degrees"))
|
.Name(XO("LFO start phase in degrees"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddSlider( {}, DEF_Phase * SCL_Phase, MAX_Phase * SCL_Phase, MIN_Phase * SCL_Phase);
|
.AddSlider( {}, DEF_Phase * SCL_Phase, MAX_Phase * SCL_Phase, MIN_Phase * SCL_Phase);
|
||||||
mPhaseS->SetLineSize(10);
|
mPhaseS->SetLineSize(10);
|
||||||
mPhaseS->SetMinSize(wxSize(100, -1));
|
|
||||||
|
|
||||||
mDepthT = S.Id(ID_Depth)
|
mDepthT = S.Id(ID_Depth)
|
||||||
.Validator<IntegerValidator<int>>(
|
.Validator<IntegerValidator<int>>(
|
||||||
|
@ -310,8 +310,8 @@ void EffectPhaser::PopulateOrExchange(ShuttleGui & S)
|
||||||
mDepthS = S.Id(ID_Depth)
|
mDepthS = S.Id(ID_Depth)
|
||||||
.Name(XO("Depth in percent"))
|
.Name(XO("Depth in percent"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddSlider( {}, DEF_Depth * SCL_Depth, MAX_Depth * SCL_Depth, MIN_Depth * SCL_Depth);
|
.AddSlider( {}, DEF_Depth * SCL_Depth, MAX_Depth * SCL_Depth, MIN_Depth * SCL_Depth);
|
||||||
mDepthS->SetMinSize(wxSize(100, -1));
|
|
||||||
|
|
||||||
mFeedbackT = S.Id(ID_Feedback)
|
mFeedbackT = S.Id(ID_Feedback)
|
||||||
.Validator<IntegerValidator<int>>(
|
.Validator<IntegerValidator<int>>(
|
||||||
|
@ -321,9 +321,9 @@ void EffectPhaser::PopulateOrExchange(ShuttleGui & S)
|
||||||
mFeedbackS = S.Id(ID_Feedback)
|
mFeedbackS = S.Id(ID_Feedback)
|
||||||
.Name(XO("Feedback in percent"))
|
.Name(XO("Feedback in percent"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddSlider( {}, DEF_Feedback * SCL_Feedback, MAX_Feedback * SCL_Feedback, MIN_Feedback * SCL_Feedback);
|
.AddSlider( {}, DEF_Feedback * SCL_Feedback, MAX_Feedback * SCL_Feedback, MIN_Feedback * SCL_Feedback);
|
||||||
mFeedbackS->SetLineSize(10);
|
mFeedbackS->SetLineSize(10);
|
||||||
mFeedbackS->SetMinSize(wxSize(100, -1));
|
|
||||||
|
|
||||||
mOutGainT = S.Id(ID_OutGain)
|
mOutGainT = S.Id(ID_OutGain)
|
||||||
.Validator<FloatingPointValidator<double>>(
|
.Validator<FloatingPointValidator<double>>(
|
||||||
|
@ -333,8 +333,8 @@ void EffectPhaser::PopulateOrExchange(ShuttleGui & S)
|
||||||
mOutGainS = S.Id(ID_OutGain)
|
mOutGainS = S.Id(ID_OutGain)
|
||||||
.Name(XO("Output gain (dB)"))
|
.Name(XO("Output gain (dB)"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddSlider( {}, DEF_OutGain * SCL_OutGain, MAX_OutGain * SCL_OutGain, MIN_OutGain * SCL_OutGain);
|
.AddSlider( {}, DEF_OutGain * SCL_OutGain, MAX_OutGain * SCL_OutGain, MIN_OutGain * SCL_OutGain);
|
||||||
mOutGainS->SetMinSize(wxSize(100, -1));
|
|
||||||
}
|
}
|
||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
}
|
}
|
||||||
|
|
|
@ -398,9 +398,9 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
|
||||||
);
|
);
|
||||||
|
|
||||||
S.SetBorder(5);
|
S.SetBorder(5);
|
||||||
S.Prop(1);
|
S.Prop(1)
|
||||||
S.AddWindow(mPanel, wxEXPAND | wxRIGHT);
|
.MinSize( { -1, -1 } )
|
||||||
S.SetSizeHints(-1, -1);
|
.AddWindow(mPanel, wxEXPAND | wxRIGHT);
|
||||||
|
|
||||||
S.StartVerticalLay();
|
S.StartVerticalLay();
|
||||||
{
|
{
|
||||||
|
@ -460,14 +460,15 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
|
||||||
mFilterTypeCtl = S.Id(ID_Type)
|
mFilterTypeCtl = S.Id(ID_Type)
|
||||||
.Focus()
|
.Focus()
|
||||||
.Validator<wxGenericValidator>(&mFilterType)
|
.Validator<wxGenericValidator>(&mFilterType)
|
||||||
|
.MinSize( { -1, -1 } )
|
||||||
.AddChoice(_("&Filter Type:"),
|
.AddChoice(_("&Filter Type:"),
|
||||||
LocalizedStrings(kTypeStrings, nTypes)
|
LocalizedStrings(kTypeStrings, nTypes)
|
||||||
);
|
);
|
||||||
S.SetSizeHints(-1, -1);
|
|
||||||
|
|
||||||
mFilterOrderCtl = S.Id(ID_Order)
|
mFilterOrderCtl = S.Id(ID_Order)
|
||||||
.Validator<wxGenericValidator>(&mOrderIndex)
|
.Validator<wxGenericValidator>(&mOrderIndex)
|
||||||
/*i18n-hint: 'Order' means the complexity of the filter, and is a number between 1 and 10.*/
|
/*i18n-hint: 'Order' means the complexity of the filter, and is a number between 1 and 10.*/
|
||||||
|
.MinSize( { -1, -1 } )
|
||||||
.AddChoice(_("O&rder:"),
|
.AddChoice(_("O&rder:"),
|
||||||
[]{
|
[]{
|
||||||
wxArrayStringEx orders;
|
wxArrayStringEx orders;
|
||||||
|
@ -476,7 +477,6 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
|
||||||
return orders;
|
return orders;
|
||||||
}()
|
}()
|
||||||
);
|
);
|
||||||
S.SetSizeHints(-1, -1);
|
|
||||||
S.AddSpace(1, 1);
|
S.AddSpace(1, 1);
|
||||||
|
|
||||||
mRippleCtlP = S.AddVariableText(_("&Passband Ripple:"), false, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
|
mRippleCtlP = S.AddVariableText(_("&Passband Ripple:"), false, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
|
||||||
|
@ -490,11 +490,11 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
|
||||||
|
|
||||||
mFilterSubTypeCtl = S.Id(ID_SubType)
|
mFilterSubTypeCtl = S.Id(ID_SubType)
|
||||||
.Validator<wxGenericValidator>(&mFilterSubtype)
|
.Validator<wxGenericValidator>(&mFilterSubtype)
|
||||||
|
.MinSize( { -1, -1 } )
|
||||||
.AddChoice(_("&Subtype:"),
|
.AddChoice(_("&Subtype:"),
|
||||||
LocalizedStrings(kSubTypeStrings, nSubTypes)
|
LocalizedStrings(kSubTypeStrings, nSubTypes)
|
||||||
);
|
);
|
||||||
S.SetSizeHints(-1, -1);
|
|
||||||
|
|
||||||
mCutoffCtl = S.Id(ID_Cutoff)
|
mCutoffCtl = S.Id(ID_Cutoff)
|
||||||
.Name(XO("Cutoff (Hz)"))
|
.Name(XO("Cutoff (Hz)"))
|
||||||
.Validator<FloatingPointValidator<float>>(
|
.Validator<FloatingPointValidator<float>>(
|
||||||
|
|
|
@ -101,9 +101,9 @@ ScoreAlignDialog::ScoreAlignDialog(ScoreAlignParams ¶ms)
|
||||||
mFramePeriodSlider = S.Id(ID_FRAMEPERIOD)
|
mFramePeriodSlider = S.Id(ID_FRAMEPERIOD)
|
||||||
.Name(XO("Frame Period"))
|
.Name(XO("Frame Period"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 300, -1 } )
|
||||||
.AddSlider(wxT(""),
|
.AddSlider(wxT(""),
|
||||||
/*pos*/ (int) (p.mFramePeriod * 100 + 0.5), /*max*/ 50, /*min*/ 5);
|
/*pos*/ (int) (p.mFramePeriod * 100 + 0.5), /*max*/ 50, /*min*/ 5);
|
||||||
S.SetSizeHints(300, -1);
|
|
||||||
mFramePeriodText = S.AddVariableText(SA_DFT_FRAME_PERIOD_TEXT, true,
|
mFramePeriodText = S.AddVariableText(SA_DFT_FRAME_PERIOD_TEXT, true,
|
||||||
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
|
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
|
||||||
|
|
||||||
|
|
|
@ -780,9 +780,10 @@ void EffectTruncSilence::PopulateOrExchange(ShuttleGui & S)
|
||||||
{
|
{
|
||||||
// Action choices
|
// Action choices
|
||||||
auto actionChoices = LocalizedStrings(kActionStrings, nActions);
|
auto actionChoices = LocalizedStrings(kActionStrings, nActions);
|
||||||
mActionChoice = S.Validator<wxGenericValidator>(&mActionIndex)
|
mActionChoice = S
|
||||||
|
.Validator<wxGenericValidator>(&mActionIndex)
|
||||||
|
.MinSize( { -1, -1 } )
|
||||||
.AddChoice( {}, actionChoices );
|
.AddChoice( {}, actionChoices );
|
||||||
S.SetSizeHints(-1, -1);
|
|
||||||
}
|
}
|
||||||
S.EndHorizontalLay();
|
S.EndHorizontalLay();
|
||||||
S.StartMultiColumn(3, wxALIGN_CENTER_HORIZONTAL);
|
S.StartMultiColumn(3, wxALIGN_CENTER_HORIZONTAL);
|
||||||
|
|
|
@ -823,10 +823,10 @@ void VSTEffectOptionsDialog::PopulateOrExchange(ShuttleGui & S)
|
||||||
wxTextCtrl *t;
|
wxTextCtrl *t;
|
||||||
t = S.Validator<IntegerValidator<int>>(
|
t = S.Validator<IntegerValidator<int>>(
|
||||||
&mBufferSize, NumValidatorStyle::DEFAULT, 8, 1048576 * 1)
|
&mBufferSize, NumValidatorStyle::DEFAULT, 8, 1048576 * 1)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.TieNumericTextBox(_("&Buffer Size (8 to 1048576 samples):"),
|
.TieNumericTextBox(_("&Buffer Size (8 to 1048576 samples):"),
|
||||||
mBufferSize,
|
mBufferSize,
|
||||||
12);
|
12);
|
||||||
t->SetMinSize(wxSize(100, -1));
|
|
||||||
}
|
}
|
||||||
S.EndHorizontalLay();
|
S.EndHorizontalLay();
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,8 +248,8 @@ void EffectWahwah::PopulateOrExchange(ShuttleGui & S)
|
||||||
mFreqS = S.Id(ID_Freq)
|
mFreqS = S.Id(ID_Freq)
|
||||||
.Name(XO("LFO frequency in hertz"))
|
.Name(XO("LFO frequency in hertz"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddSlider( {}, DEF_Freq * SCL_Freq, MAX_Freq * SCL_Freq, MIN_Freq * SCL_Freq);
|
.AddSlider( {}, DEF_Freq * SCL_Freq, MAX_Freq * SCL_Freq, MIN_Freq * SCL_Freq);
|
||||||
mFreqS->SetMinSize(wxSize(100, -1));
|
|
||||||
|
|
||||||
mPhaseT = S.Id(ID_Phase)
|
mPhaseT = S.Id(ID_Phase)
|
||||||
.Validator<FloatingPointValidator<double>>(
|
.Validator<FloatingPointValidator<double>>(
|
||||||
|
@ -259,9 +259,9 @@ void EffectWahwah::PopulateOrExchange(ShuttleGui & S)
|
||||||
mPhaseS = S.Id(ID_Phase)
|
mPhaseS = S.Id(ID_Phase)
|
||||||
.Name(XO("LFO start phase in degrees"))
|
.Name(XO("LFO start phase in degrees"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddSlider( {}, DEF_Phase * SCL_Phase, MAX_Phase * SCL_Phase, MIN_Phase * SCL_Phase);
|
.AddSlider( {}, DEF_Phase * SCL_Phase, MAX_Phase * SCL_Phase, MIN_Phase * SCL_Phase);
|
||||||
mPhaseS->SetLineSize(10);
|
mPhaseS->SetLineSize(10);
|
||||||
mPhaseS->SetMinSize(wxSize(100, -1));
|
|
||||||
|
|
||||||
mDepthT = S.Id(ID_Depth)
|
mDepthT = S.Id(ID_Depth)
|
||||||
.Validator<IntegerValidator<int>>(
|
.Validator<IntegerValidator<int>>(
|
||||||
|
@ -271,8 +271,8 @@ void EffectWahwah::PopulateOrExchange(ShuttleGui & S)
|
||||||
mDepthS = S.Id(ID_Depth)
|
mDepthS = S.Id(ID_Depth)
|
||||||
.Name(XO("Depth in percent"))
|
.Name(XO("Depth in percent"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddSlider( {}, DEF_Depth * SCL_Depth, MAX_Depth * SCL_Depth, MIN_Depth * SCL_Depth);
|
.AddSlider( {}, DEF_Depth * SCL_Depth, MAX_Depth * SCL_Depth, MIN_Depth * SCL_Depth);
|
||||||
mDepthS->SetMinSize(wxSize(100, -1));
|
|
||||||
|
|
||||||
mResT = S.Id(ID_Res)
|
mResT = S.Id(ID_Res)
|
||||||
.Validator<FloatingPointValidator<double>>(
|
.Validator<FloatingPointValidator<double>>(
|
||||||
|
@ -282,8 +282,8 @@ void EffectWahwah::PopulateOrExchange(ShuttleGui & S)
|
||||||
mResS = S.Id(ID_Res)
|
mResS = S.Id(ID_Res)
|
||||||
.Name(XO("Resonance"))
|
.Name(XO("Resonance"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddSlider( {}, DEF_Res * SCL_Res, MAX_Res * SCL_Res, MIN_Res * SCL_Res);
|
.AddSlider( {}, DEF_Res * SCL_Res, MAX_Res * SCL_Res, MIN_Res * SCL_Res);
|
||||||
mResS->SetMinSize(wxSize(100, -1));
|
|
||||||
|
|
||||||
mFreqOfsT = S.Id(ID_FreqOfs)
|
mFreqOfsT = S.Id(ID_FreqOfs)
|
||||||
.Validator<IntegerValidator<int>>(
|
.Validator<IntegerValidator<int>>(
|
||||||
|
@ -293,8 +293,8 @@ void EffectWahwah::PopulateOrExchange(ShuttleGui & S)
|
||||||
mFreqOfsS = S.Id(ID_FreqOfs)
|
mFreqOfsS = S.Id(ID_FreqOfs)
|
||||||
.Name(XO("Wah frequency offset in percent"))
|
.Name(XO("Wah frequency offset in percent"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddSlider( {}, DEF_FreqOfs * SCL_FreqOfs, MAX_FreqOfs * SCL_FreqOfs, MIN_FreqOfs * SCL_FreqOfs);
|
.AddSlider( {}, DEF_FreqOfs * SCL_FreqOfs, MAX_FreqOfs * SCL_FreqOfs, MIN_FreqOfs * SCL_FreqOfs);
|
||||||
mFreqOfsT->SetMinSize(wxSize(100, -1));
|
|
||||||
|
|
||||||
mOutGainT = S.Id(ID_OutGain)
|
mOutGainT = S.Id(ID_OutGain)
|
||||||
.Validator<FloatingPointValidator<double>>(
|
.Validator<FloatingPointValidator<double>>(
|
||||||
|
@ -304,8 +304,8 @@ void EffectWahwah::PopulateOrExchange(ShuttleGui & S)
|
||||||
mOutGainS = S.Id(ID_OutGain)
|
mOutGainS = S.Id(ID_OutGain)
|
||||||
.Name(XO("Output gain (dB)"))
|
.Name(XO("Output gain (dB)"))
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.AddSlider( {}, DEF_OutGain * SCL_OutGain, MAX_OutGain * SCL_OutGain, MIN_OutGain * SCL_OutGain);
|
.AddSlider( {}, DEF_OutGain * SCL_OutGain, MAX_OutGain * SCL_OutGain, MIN_OutGain * SCL_OutGain);
|
||||||
mOutGainS->SetMinSize(wxSize(100, -1));
|
|
||||||
}
|
}
|
||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2587,8 +2587,9 @@ void NyquistEffect::BuildPromptWindow(ShuttleGui & S)
|
||||||
|
|
||||||
S.StartHorizontalLay(wxEXPAND, 1);
|
S.StartHorizontalLay(wxEXPAND, 1);
|
||||||
{
|
{
|
||||||
mCommandText = S.Focus().AddTextWindow(wxT(""));
|
mCommandText = S.Focus()
|
||||||
mCommandText->SetMinSize(wxSize(500, 200));
|
.MinSize( { 500, 200 } )
|
||||||
|
.AddTextWindow(wxT(""));
|
||||||
}
|
}
|
||||||
S.EndHorizontalLay();
|
S.EndHorizontalLay();
|
||||||
|
|
||||||
|
@ -2735,8 +2736,8 @@ void NyquistEffect::BuildEffectWindow(ShuttleGui & S)
|
||||||
{
|
{
|
||||||
S.Id(ID_Slider + i)
|
S.Id(ID_Slider + i)
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 150, -1 } )
|
||||||
.AddSlider( {}, 0, ctrl.ticks, 0);
|
.AddSlider( {}, 0, ctrl.ticks, 0);
|
||||||
S.SetSizeHints(150, -1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -562,6 +562,7 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
|
||||||
|
|
||||||
S.Id(ID_Program);
|
S.Id(ID_Program);
|
||||||
mProgram = S.Name(XO("Program"))
|
mProgram = S.Name(XO("Program"))
|
||||||
|
.MinSize( { -1, -1 } )
|
||||||
.AddChoice( {},
|
.AddChoice( {},
|
||||||
[&]{
|
[&]{
|
||||||
wxArrayStringEx choices;
|
wxArrayStringEx choices;
|
||||||
|
@ -571,7 +572,6 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
|
||||||
}(),
|
}(),
|
||||||
wxString::FromUTF8(mPlugin->getCurrentProgram().c_str())
|
wxString::FromUTF8(mPlugin->getCurrentProgram().c_str())
|
||||||
);
|
);
|
||||||
mProgram->SetSizeHints(-1, -1);
|
|
||||||
wxSizer *s = mProgram->GetContainingSizer();
|
wxSizer *s = mProgram->GetContainingSizer();
|
||||||
s->GetItem(mProgram)->SetFlag(wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL);
|
s->GetItem(mProgram)->SetFlag(wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL);
|
||||||
|
|
||||||
|
@ -638,8 +638,9 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
|
||||||
S.Id(ID_Choices + p);
|
S.Id(ID_Choices + p);
|
||||||
mChoices[p] = S.ToolTip( TranslatableString{ tip } )
|
mChoices[p] = S.ToolTip( TranslatableString{ tip } )
|
||||||
.Name( TranslatableString{ labelText } )
|
.Name( TranslatableString{ labelText } )
|
||||||
|
.MinSize( { -1, -1 } )
|
||||||
.AddChoice( {}, choices, selected );
|
.AddChoice( {}, choices, selected );
|
||||||
mChoices[p]->SetSizeHints(-1, -1);
|
|
||||||
wxSizer *s = mChoices[p]->GetContainingSizer();
|
wxSizer *s = mChoices[p]->GetContainingSizer();
|
||||||
s->GetItem(mChoices[p])->SetFlag(wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL);
|
s->GetItem(mChoices[p])->SetFlag(wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL);
|
||||||
|
|
||||||
|
@ -675,9 +676,9 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
|
||||||
mSliders[p] = S.ToolTip( TranslatableString{ tip } )
|
mSliders[p] = S.ToolTip( TranslatableString{ tip } )
|
||||||
.Name( TranslatableString{ labelText } )
|
.Name( TranslatableString{ labelText } )
|
||||||
.Style(wxSL_HORIZONTAL)
|
.Style(wxSL_HORIZONTAL)
|
||||||
|
.MinSize( { 150, -1 } )
|
||||||
.AddSlider( {}, 0, 1000, 0);
|
.AddSlider( {}, 0, 1000, 0);
|
||||||
mSliders[p]->SetSizeHints(150, -1);
|
|
||||||
|
|
||||||
str = Internat::ToDisplayString(mParameters[p].maxValue);
|
str = Internat::ToDisplayString(mParameters[p].maxValue);
|
||||||
S.AddUnits(str);
|
S.AddUnits(str);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1611,8 +1611,8 @@ void ExportFFmpegOptions::PopulateOrExchange(ShuttleGui & S)
|
||||||
|
|
||||||
mProfileChoice = S.Id(FEProfileID)
|
mProfileChoice = S.Id(FEProfileID)
|
||||||
.ToolTip(XO("AAC Profile\nLow Complexity - default\nMost players won't play anything other than LC"))
|
.ToolTip(XO("AAC Profile\nLow Complexity - default\nMost players won't play anything other than LC"))
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.TieChoice(_("Profile:"), AACProfiles);
|
.TieChoice(_("Profile:"), AACProfiles);
|
||||||
mProfileChoice->SetSizeHints( 100,-1);
|
|
||||||
}
|
}
|
||||||
S.EndMultiColumn();
|
S.EndMultiColumn();
|
||||||
}
|
}
|
||||||
|
@ -1635,13 +1635,13 @@ void ExportFFmpegOptions::PopulateOrExchange(ShuttleGui & S)
|
||||||
|
|
||||||
mPredictionOrderMethodChoice = S.Id(FEPredOrderID)
|
mPredictionOrderMethodChoice = S.Id(FEPredOrderID)
|
||||||
.ToolTip(XO("Prediction Order Method\nEstimate - fastest, lower compression\nLog search - slowest, best compression\nFull search - default"))
|
.ToolTip(XO("Prediction Order Method\nEstimate - fastest, lower compression\nLog search - slowest, best compression\nFull search - default"))
|
||||||
|
.MinSize( { 100, -1 } )
|
||||||
.TieNumberAsChoice(
|
.TieNumberAsChoice(
|
||||||
_("PdO Method:"),
|
_("PdO Method:"),
|
||||||
{wxT("/FileFormats/FFmpegPredOrderMethod"),
|
{wxT("/FileFormats/FFmpegPredOrderMethod"),
|
||||||
4}, // Full search
|
4}, // Full search
|
||||||
PredictionOrderMethodNames
|
PredictionOrderMethodNames
|
||||||
);
|
);
|
||||||
mPredictionOrderMethodChoice->SetSizeHints( 100,-1);
|
|
||||||
|
|
||||||
mMinPredictionOrderSpin = S.Id(FEMinPredID)
|
mMinPredictionOrderSpin = S.Id(FEMinPredID)
|
||||||
.ToolTip(XO("Minimal prediction order\nOptional\n-1 - default\nmin - 0\nmax - 32 (with LPC) or 4 (without LPC)"))
|
.ToolTip(XO("Minimal prediction order\nOptional\n-1 - default\nmin - 0\nmax - 32 (with LPC) or 4 (without LPC)"))
|
||||||
|
|
|
@ -315,9 +315,8 @@ void DevicePrefs::OnHost(wxCommandEvent & e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ShuttleGui S(this, eIsCreating);
|
ShuttleGui::SetMinSize(mPlay, mPlay->GetStrings());
|
||||||
S.SetSizeHints(mPlay, mPlay->GetStrings());
|
ShuttleGui::SetMinSize(mRecord, mRecord->GetStrings());
|
||||||
S.SetSizeHints(mRecord, mRecord->GetStrings());
|
|
||||||
OnDevice(e);
|
OnDevice(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,8 +380,7 @@ void DevicePrefs::OnDevice(wxCommandEvent & WXUNUSED(event))
|
||||||
mChannels->SetSelection(0);
|
mChannels->SetSelection(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ShuttleGui S(this, eIsCreating);
|
ShuttleGui::SetMinSize(mChannels, channelnames);
|
||||||
S.SetSizeHints(mChannels, channelnames);
|
|
||||||
Layout();
|
Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -199,8 +199,9 @@ void EffectsPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||||
{
|
{
|
||||||
S.StartMultiColumn(2);
|
S.StartMultiColumn(2);
|
||||||
{
|
{
|
||||||
wxChoice *c = S.TieChoice( _("S&ort or Group:"), EffectsGroupBy);
|
wxChoice *c = S
|
||||||
if( c ) c->SetMinSize(c->GetBestSize());
|
.MinSize()
|
||||||
|
.TieChoice( _("S&ort or Group:"), EffectsGroupBy);
|
||||||
|
|
||||||
S.TieIntegerTextBox(_("&Maximum effects per group (0 to disable):"),
|
S.TieIntegerTextBox(_("&Maximum effects per group (0 to disable):"),
|
||||||
{wxT("/Effects/MaxPerGroup"),
|
{wxT("/Effects/MaxPerGroup"),
|
||||||
|
|
|
@ -256,10 +256,9 @@ void MidiIOPrefs::OnHost(wxCommandEvent & WXUNUSED(e))
|
||||||
mRecord->SetSelection(0);
|
mRecord->SetSelection(0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ShuttleGui S(this, eIsCreating);
|
ShuttleGui::SetMinSize(mPlay, playnames);
|
||||||
S.SetSizeHints(mPlay, playnames);
|
|
||||||
#ifdef EXPERIMENTAL_MIDI_IN
|
#ifdef EXPERIMENTAL_MIDI_IN
|
||||||
S.SetSizeHints(mRecord, recordnames);
|
ShuttleGui::SetMinSize(mRecord, recordnames);
|
||||||
#endif
|
#endif
|
||||||
// OnDevice(e);
|
// OnDevice(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue