本文整理匯總了C++中ShuttleGui類的典型用法代碼示例。如果您正苦於以下問題:C++ ShuttleGui類的具體用法?C++ ShuttleGui怎麽用?C++ ShuttleGui使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ShuttleGui類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: PopulateOrExchange
void ModulePrefs::PopulateOrExchange(ShuttleGui & S)
{
wxArrayString StatusChoices;
StatusChoices.Add( _("Disabled" ) );
StatusChoices.Add( _("Enabled" ) );
StatusChoices.Add( _("Ask" ) );
StatusChoices.Add( _("Failed" ) );
StatusChoices.Add( _("New" ) );
S.SetBorder(2);
S.StartStatic(_(""));
{
S.AddFixedText(_("These are experimental Modules. Enable them only if you've read the manual\nand know what you are doing.") );
S.AddFixedText(wxString(wxT(" ")) + _("'Ask' means Audacity will ask if you want to load the plug-each time it starts.") );
S.AddFixedText(wxString(wxT(" ")) + _("'Failed' means Audacity thinks the plug-in is broken and won't run it.") );
S.AddFixedText(wxString(wxT(" ")) + _("'New' is like 'Ask', but asks just once.") );
S.StartMultiColumn( 2 );
int i;
for(i=0;i<(int)mModules.GetCount();i++)
S.TieChoice( mModules[i], mStatuses[i], &StatusChoices );
S.EndMultiColumn();
lse);
}
S.EndStatic();
}
示例2: PopulateOrExchange
/// Places controls on the panel and also exchanges data with them.
void MousePrefs::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
S.StartStatic(_("Mouse Bindings (default values, not configurable)"), 1);
{
mList = S.AddListControlReportMode();
}
S.EndStatic();
}
示例3: PopulateOrExchange
void FindClippingDialog::PopulateOrExchange(ShuttleGui & S)
{
S.StartHorizontalLay(wxCENTER, false);
{
S.AddTitle(_("by Leland Lucius"));
}
S.EndHorizontalLay();
S.StartHorizontalLay(wxCENTER, false);
{
// Add a little space
}
S.EndHorizontalLay();
S.StartMultiColumn(2, wxALIGN_CENTER);
{
S.TieTextBox(_("Start threshold (samples):"),
mEffect->mStart,
10)->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
S.TieTextBox(_("Stop threshold (samples):"),
mEffect->mStop,
10)->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
}
S.EndMultiColumn();
}
示例4: PopulateOrExchange
void EchoDialog::PopulateOrExchange(ShuttleGui & S)
{
S.StartHorizontalLay(wxCENTER, false);
{
/* i18n-hint: && in here is an escape character to get a single & on
* screen, so keep it as is */
S.AddTitle(_("by Dominic Mazzoni && Vaughan Johnson"));
}
S.EndHorizontalLay();
S.StartHorizontalLay(wxCENTER, false);
{
// Add a little space
}
S.EndHorizontalLay();
S.StartMultiColumn(2, wxALIGN_CENTER);
{
m_pTextCtrl_Delay = S.AddTextBox(_("Delay time (seconds):"),
wxT("1.0"),
10);
m_pTextCtrl_Delay->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
m_pTextCtrl_Decay = S.AddTextBox(_("Decay factor:"),
wxT("0.5"),
10);
m_pTextCtrl_Decay->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
}
S.EndMultiColumn();
}
示例5: PopulateOrExchange
void PaulstretchDialog::PopulateOrExchange(ShuttleGui & S){
S.StartHorizontalLay(wxCENTER, false);
{
S.AddTitle(_("by Nasca Octavian Paul"));
}
S.EndHorizontalLay();
S.StartHorizontalLay(wxCENTER, false);
S.EndHorizontalLay();
S.StartMultiColumn(2, wxALIGN_CENTER);
{
/* i18n-hint: This is how many times longer the sound will be, e.g. applying
* the effect to a 1-second sample, with the default Stretch Factor of 10.0
* will give an (approximately) 10 second sound
*/
m_pTextCtrl_Amount = S.AddTextBox(_("Stretch Factor:"),wxT("10.0"),10);
m_pTextCtrl_Amount->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
m_pTextCtrl_TimeResolution= S.AddTextBox(_("Time Resolution (seconds):"), wxT("0.25"),10);
m_pTextCtrl_TimeResolution->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
}
S.EndMultiColumn();
};
示例6: PopulateOrExchange
void GetTrackInfoCommand::PopulateOrExchange(ShuttleGui & S)
{
wxArrayString types( nTypes, kTypes );
S.AddSpace(0, 5);
S.StartMultiColumn(2, wxALIGN_CENTER);
{
S.TieChoice( _("Types:"), mInfoType, &types);
}
S.EndMultiColumn();
}
示例7: PopulateOrExchange
void EffectLeveller::PopulateOrExchange(ShuttleGui & S)
{
wxASSERT(kNumPasses == WXSIZEOF(kPassStrings));
wxArrayString passChoices;
for (int i = 0; i < kNumPasses; i++)
{
passChoices.Add(wxGetTranslation(kPassStrings[i]));
}
wxArrayString dBChoices(Enums::NumDbChoices,Enums::GetDbChoices());
S.SetBorder(5);
S.StartVerticalLay();
{
S.AddSpace(5);
S.StartMultiColumn(2, wxALIGN_CENTER);
{
S.AddChoice(_("Degree of Leveling:"),
wxT(""),
&passChoices)->SetValidator(wxGenericValidator(&mPassIndex));
S.AddChoice(_("Noise Threshold:"),
wxT(""),
&dBChoices)->SetValidator(wxGenericValidator(&mDbIndex));
}
S.EndMultiColumn();
}
S.EndVerticalLay();
return;
}
示例8: PopulateOrExchange
void ExportFFmpegWMAOptions::PopulateOrExchange(ShuttleGui & S)
{
S.StartHorizontalLay(wxEXPAND, 0);
{
S.StartStatic(_("WMA Export Setup"), 0);
{
S.StartTwoColumn();
{
S.TieChoice(_("Bit Rate:"), wxT("/FileFormats/WMABitRate"),
180189, mBitRateNames, mBitRateLabels);
}
S.EndTwoColumn();
}
S.EndStatic();
}
S.EndHorizontalLay();
S.AddStandardButtons();
Layout();
Fit();
SetMinSize(GetSize());
Center();
return;
}
示例9: PopulateOrExchangeStandard
/// Populates simple dialog that has a single tone.
void ToneGenDialog::PopulateOrExchangeStandard( ShuttleGui & S )
{
S.StartMultiColumn(2, wxCENTER);
{
S.TieChoice(_("Waveform") + wxString(wxT(":")), waveform, waveforms);
S.SetSizeHints(-1, -1);
// The added colon to improve visual consistency was placed outside
// the translatable strings to avoid breaking translations close to 2.0.
// TODO: Make colon part of the translatable string after 2.0.
S.TieNumericTextBox(_("Frequency (Hz)") + wxString(wxT(":")), frequency[0], 5);
S.TieNumericTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), amplitude[0], 5);
S.AddPrompt(_("Duration") + wxString(wxT(":")));
if (mToneDurationT == NULL)
{
mToneDurationT = new
TimeTextCtrl(this,
wxID_ANY,
wxT(""),
mDuration,
mEffect->mProjectRate,
wxDefaultPosition,
wxDefaultSize,
true);
mToneDurationT->SetName(_("Duration"));
mToneDurationT->SetFormatString(mToneDurationT->GetBuiltinFormat(isSelection==true?(_("hh:mm:ss + samples")):(_("seconds"))));
mToneDurationT->EnableMenu();
}
S.AddWindow(mToneDurationT);
}
S.EndMultiColumn();
}
示例10: PopulateOrExchange
void FindClippingDialog::PopulateOrExchange(ShuttleGui & S)
{
S.StartMultiColumn(2, wxALIGN_CENTER);
{
S.TieTextBox(_("Start threshold (samples):"),
mEffect->mStart,
10)->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
S.TieTextBox(_("Stop threshold (samples):"),
mEffect->mStop,
10)->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
}
S.EndMultiColumn();
}
示例11: PopulateOrExchange
void EffectEcho::PopulateOrExchange(ShuttleGui & S)
{
S.AddSpace(0, 5);
S.StartMultiColumn(2, wxALIGN_CENTER);
{
FloatingPointValidator<double> vldDelay(3, &delay, NUM_VAL_NO_TRAILING_ZEROES);
vldDelay.SetRange(MIN_Delay, MAX_Delay);
S.AddTextBox(_("Delay time (seconds):"), wxT(""), 10)->SetValidator(vldDelay);
FloatingPointValidator<double> vldDecay(3, &decay, NUM_VAL_NO_TRAILING_ZEROES);
vldDecay.SetRange(MIN_Decay, MAX_Decay);
S.AddTextBox(_("Decay factor:"), wxT(""), 10)->SetValidator(vldDecay);
}
S.EndMultiColumn();
}
示例12: PopulateOrExchange
void NoiseDialog::PopulateOrExchange( ShuttleGui & S )
{
S.StartMultiColumn(2, wxCENTER);
{
S.AddFixedText(_("Duration"), false);
if (mNoiseDurationT == NULL)
{
mNoiseDurationT = new
TimeTextCtrl(this,
wxID_ANY,
wxT(""),
nDuration,
44100,
wxDefaultPosition,
wxDefaultSize,
true);
/* use this instead of "seconds" because if a selection is passed to
* the effect, I want it (nDuration) to be used as the duration, and
* with "seconds" this does not always work properly. For example,
* it rounds down to zero... */
mNoiseDurationT->SetFormatString(mNoiseDurationT->GetBuiltinFormat(nIsSelection==true?(wxT("hh:mm:ss + samples")):(wxT("seconds"))));
mNoiseDurationT->EnableMenu();
}
S.AddWindow(mNoiseDurationT);
S.TieTextBox(_("Amplitude (0-1)"), nAmplitude, 10);
S.TieChoice(_("Noise type"), nType, nTypeList);
S.SetSizeHints(-1, -1);
}
S.EndMultiColumn();
}
示例13: PopulateOrExchange
void TimeDialog::PopulateOrExchange(ShuttleGui &S)
{
S.SetBorder(5);
S.StartVerticalLay(true);
{
S.StartStatic(mPrompt, true);
{
mTimeCtrl = new
TimeTextCtrl(this,
wxID_ANY,
wxT(""),
mTime,
mRate,
wxDefaultPosition,
wxDefaultSize,
true);
mTimeCtrl->SetName(mPrompt);
mTimeCtrl->SetFormatString(mTimeCtrl->GetBuiltinFormat(mFormat));
S.AddWindow(mTimeCtrl);
mTimeCtrl->EnableMenu();
}
S.EndStatic();
}
S.EndVerticalLay();
S.AddStandardButtons();
TransferDataToWindow();
Layout();
Fit();
SetMinSize(GetSize());
Center();
}
示例14: PopulateOrExchange
void EffectNoise::PopulateOrExchange(ShuttleGui & S)
{
wxASSERT(nTypes == WXSIZEOF(kTypeStrings));
S.StartMultiColumn(2, wxCENTER);
{
auto typeChoices = LocalizedStrings(kTypeStrings, nTypes);
S.AddChoice(_("Noise type:"), wxT(""), &typeChoices)->SetValidator(wxGenericValidator(&mType));
FloatingPointValidator<double> vldAmp(6, &mAmp, NumValidatorStyle::NO_TRAILING_ZEROES);
vldAmp.SetRange(MIN_Amp, MAX_Amp);
S.AddTextBox(_("Amplitude (0-1):"), wxT(""), 12)->SetValidator(vldAmp);
S.AddPrompt(_("Duration:"));
mNoiseDurationT = safenew
NumericTextCtrl(S.GetParent(), wxID_ANY,
NumericConverter::TIME,
GetDurationFormat(),
GetDuration(),
mProjectRate,
NumericTextCtrl::Options{}
.AutoPos(true));
mNoiseDurationT->SetName(_("Duration"));
S.AddWindow(mNoiseDurationT, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL);
}
S.EndMultiColumn();
}
示例15: DefineSampleRateControl
/// Add a compound control made up from a choice and an edit
/// box.
void QualityPrefs::DefineSampleRateControl( ShuttleGui & S )
{
// We use a sizer within a sizer to get the effect we want.
// We also use the SetIfCreated idiom to get pointers to
// the controls, so that we can drive them from
// our own code.
S.SetBorder(2);
S.StartHorizontalLay(wxALIGN_LEFT );
// If the value in Prefs isn't in the list, then we want
// the last item, 'Other...' to be shown.
S.SetNoMatchSelector( mmSampleRateNames.GetCount()-1 );
// First the choice...
// We make sure it uses the ID we want, so that we get changes
S.Id( ID_SAMPLE_RATE_CHOICE );
// We make sure we have a pointer to it, so that we can drive it.
mSampleRates = S.TieChoice( wxT(""),
wxT("/SamplingRate/DefaultProjectSampleRate"),
AudioIO::GetOptimalSupportedSampleRate(),
mmSampleRateNames, mmSampleRateLabels );
// Now do the edit box...
mOtherSampleRate = S.TieTextBox(wxT(""),
mOtherSampleRateValue, 9);
S.EndHorizontalLay();
}