本文整理汇总了C++中ShuttleGui::Id方法的典型用法代码示例。如果您正苦于以下问题:C++ ShuttleGui::Id方法的具体用法?C++ ShuttleGui::Id怎么用?C++ ShuttleGui::Id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShuttleGui
的用法示例。
在下文中一共展示了ShuttleGui::Id方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PopulateOrExchange
void TruncSilenceDialog::PopulateOrExchange(ShuttleGui & S)
{
S.AddSpace(0, 5);
S.StartHorizontalLay();
{
// Action choices
wxArrayString processChoices;
processChoices.Add(_("Truncate Detected Silence"));
processChoices.Add(_("Compress Excess Silence"));
S.Id(ID_PROCESS_CHOICE).TieChoice(wxT(""),
mEffect->mProcessIndex,
&processChoices);
S.SetSizeHints(-1, -1);
}
S.EndHorizontalLay();
S.StartStatic(_("Detect Silence"));
{
S.StartMultiColumn(3, wxALIGN_CENTER_HORIZONTAL);
{
// Threshold
wxArrayString choices(Enums::NumDbChoices, Enums::GetDbChoices());
S.TieChoice(_("Level:"),
mEffect->mTruncDbChoiceIndex,
&choices);
S.SetSizeHints(-1, -1);
S.AddSpace(0); // 'choices' aleady includes units.
// Ignored silence
S.Id(ID_DETECT_SILENCE).TieNumericTextBox(_("Duration:"),
mEffect->mInitialAllowedSilence,
12);
S.AddUnits(wxT("seconds"));
}
S.EndMultiColumn();
}
S.EndStatic();
S.StartMultiColumn(3, wxALIGN_CENTER_HORIZONTAL);
{
// Truncation / Compression factor
S.Id( ID_TRUNCATION_DURATION ).TieNumericTextBox(_("Truncate to:"),
mEffect->mTruncLongestAllowedSilence,
12);
S.AddUnits(wxT("seconds"));
S.Id( ID_COMPRESS_FACTOR ).TieNumericTextBox(_("Compress to:"),
mEffect->mSilenceCompressPercent,
12);
S.AddUnits(wxT("percent"));
}
S.EndMultiColumn();
// Warnings
pWarning = S.AddVariableText( wxT("") );
UpdateUI();
}
示例2: PopulateOrExchange
void AmplifyDialog::PopulateOrExchange(ShuttleGui & S)
{
wxTextValidator vld(wxFILTER_INCLUDE_CHAR_LIST);
vld.SetIncludes(wxArrayString(12, numbers));
S.StartHorizontalLay(wxCENTER, false);
{
S.AddTitle(_("by Dominic Mazzoni"));
}
S.EndHorizontalLay();
S.StartHorizontalLay(wxCENTER, false);
{
// Add a little space
}
S.EndHorizontalLay();
// Amplitude
S.StartMultiColumn(2, wxCENTER);
{
mAmpT = S.Id(ID_AMP_TEXT).AddTextBox(_("Amplification (dB):"),
wxT(""),
12);
mAmpT->SetValidator(vld);
}
S.EndMultiColumn();
// Amplitude
S.StartHorizontalLay(wxEXPAND);
{
S.SetStyle(wxSL_HORIZONTAL);
mAmpS = S.Id(ID_AMP_SLIDER).AddSlider(wxT(""),
0,
AMP_MAX,
AMP_MIN);
mAmpS->SetName(_("Amplification (dB)"));
}
S.EndHorizontalLay();
// Peek
S.StartMultiColumn(2, wxCENTER);
{
mPeakT = S.Id(ID_PEAK_TEXT).AddTextBox(_("New Peak Amplitude (dB):"),
wxT(""),
12);
// mPeakT->SetValidator(vld);
}
S.EndMultiColumn();
// Clipping
S.StartHorizontalLay(wxCENTER);
{
mClip = S.Id(ID_CLIP_CHECKBOX).AddCheckBox(_("Allow clipping"),
wxT("false"));
}
S.EndHorizontalLay();
return;
}
示例3: PopulateOrExchange
void EffectDtmf::PopulateOrExchange(ShuttleGui & S)
{
// dialog will be passed values from effect
// Effect retrieves values from saved config
// Dialog will take care of using them to initialize controls
// If there is a selection, use that duration, otherwise use
// value from saved config: this is useful is user wants to
// replace selection with dtmf sequence
S.AddSpace(0, 5);
S.StartMultiColumn(2, wxCENTER);
{
wxTextValidator vldDtmf(wxFILTER_INCLUDE_CHAR_LIST, &dtmfSequence);
vldDtmf.SetIncludes(wxArrayString(WXSIZEOF(kSymbols), kSymbols));
mDtmfSequenceT = S.Id(ID_Sequence).AddTextBox(_("DTMF sequence:"), wxT(""), 10);
mDtmfSequenceT->SetValidator(vldDtmf);
FloatingPointValidator<double> vldAmp(3, &dtmfAmplitude, NUM_VAL_NO_TRAILING_ZEROES);
vldAmp.SetRange(MIN_Amplitude, MAX_Amplitude);
S.Id(ID_Amplitude).AddTextBox(_("Amplitude (0-1):"), wxT(""), 10)->SetValidator(vldAmp);
S.AddPrompt(_("Duration:"));
mDtmfDurationT = safenew
NumericTextCtrl(NumericConverter::TIME,
S.GetParent(),
ID_Duration,
GetDurationFormat(),
GetDuration(),
mProjectRate,
wxDefaultPosition,
wxDefaultSize,
true);
mDtmfDurationT->SetName(_("Duration"));
mDtmfDurationT->EnableMenu();
S.AddWindow(mDtmfDurationT);
S.AddFixedText(_("Tone/silence ratio:"), false);
S.SetStyle(wxSL_HORIZONTAL | wxEXPAND);
mDtmfDutyCycleS = S.Id(ID_DutyCycle).AddSlider( {},
dtmfDutyCycle * SCL_DutyCycle,
MAX_DutyCycle * SCL_DutyCycle,
MIN_DutyCycle * SCL_DutyCycle);
S.SetSizeHints(-1,-1);
}
S.EndMultiColumn();
S.StartMultiColumn(2, wxCENTER);
{
S.AddFixedText(_("Duty cycle:"), false);
mDtmfDutyT = S.AddVariableText(wxString::Format(wxT("%.1f %%"), dtmfDutyCycle), false);
S.AddFixedText(_("Tone duration:"), false);
mDtmfSilenceT = S.AddVariableText(wxString::Format(wxString(wxT("%.0f ")) + _("ms"), dtmfTone * 1000.0), false);
S.AddFixedText(_("Silence duration:"), false);
mDtmfToneT = S.AddVariableText(wxString::Format(wxString(wxT("%0.f ")) + _("ms"), dtmfSilence * 1000.0), false);
}
S.EndMultiColumn();
}
示例4: PopulateOrExchange
void WahwahDialog::PopulateOrExchange(ShuttleGui & S)
{
wxTextValidator vld(wxFILTER_NUMERIC);
S.SetBorder(5);
S.AddSpace(0, 5);
S.StartMultiColumn(3, wxCENTER);
{
wxSlider *s;
wxTextCtrl * tempTC;
tempTC = S.Id(ID_FREQTEXT).AddTextBox(_("LFO Frequency (Hz):"), wxT(""), 12);
S.SetStyle(wxSL_HORIZONTAL);
tempTC->SetValidator(vld);
s = S.Id(ID_FREQSLIDER).AddSlider(wxT(""), 100, FREQ_MAX, FREQ_MIN);
s->SetName(_("LFO frequency in hertz"));
#if defined(__WXGTK__)
s->SetMinSize(wxSize(100, -1));
#endif
tempTC = S.Id(ID_PHASETEXT).AddTextBox(_("LFO Start Phase (deg.):"), wxT(""), 12);
S.SetStyle(wxSL_HORIZONTAL);
tempTC->SetValidator(vld);
s = S.Id(ID_PHASESLIDER).AddSlider(wxT(""), 0, PHASE_MAX, PHASE_MIN);
s->SetName(_("LFO start phase in degrees"));
s->SetLineSize(10);
#if defined(__WXGTK__)
s->SetMinSize(wxSize(100, -1));
#endif
tempTC = S.Id(ID_DEPTHTEXT).AddTextBox(_("Depth (%):"), wxT(""), 12);
S.SetStyle(wxSL_HORIZONTAL);
tempTC->SetValidator(vld);
s = S.Id(ID_DEPTHSLIDER).AddSlider(wxT(""), 0, DEPTH_MAX, DEPTH_MIN);
s->SetName(_("Depth in percent"));
#if defined(__WXGTK__)
s->SetMinSize(wxSize(100, -1));
#endif
tempTC = S.Id(ID_RESONANCETEXT).AddTextBox(_("Resonance:"), wxT(""), 12);
S.SetStyle(wxSL_HORIZONTAL);
tempTC->SetValidator(vld);
s = S.Id(ID_RESONANCESLIDER).AddSlider(wxT(""), 0, RES_MAX, RES_MIN);
s->SetName(_("Resonance"));
#if defined(__WXGTK__)
s->SetMinSize(wxSize(100, -1));
#endif
tempTC = S.Id(ID_FREQOFFTEXT).AddTextBox(_("Wah Frequency Offset (%):"), wxT(""), 12);
S.SetStyle(wxSL_HORIZONTAL);
tempTC->SetValidator(vld);
s =S.Id(ID_FREQOFFSLIDER).AddSlider(wxT(""), 0, FREQOFF_MAX, FREQOFF_MIN);
s->SetName(_("Wah frequency offset in percent"));
#if defined(__WXGTK__)
s->SetMinSize(wxSize(100, -1));
#endif
}
S.EndMultiColumn();
}
示例5: PopulateOrExchange
void DtmfDialog::PopulateOrExchange( ShuttleGui & S )
{
wxTextValidator vldDtmf(wxFILTER_INCLUDE_CHAR_LIST);
vldDtmf.SetIncludes(wxArrayString(42, dtmfSymbols));
S.AddTitle(_("by Salvo Ventura"));
S.StartMultiColumn(2, wxEXPAND);
{
mDtmfStringT = S.Id(ID_DTMF_STRING_TEXT).AddTextBox(_("DTMF sequence:"), wxT(""), 10);
mDtmfStringT->SetValidator(vldDtmf);
// 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(_("Amplitude (0-1)") + wxString(wxT(":")), dAmplitude, 10);
S.AddPrompt(_("Duration:"));
if (mDtmfDurationT == NULL)
{
mDtmfDurationT = new
TimeTextCtrl(this,
ID_DTMF_DURATION_TEXT,
wxT(""),
dDuration,
mEffect->mProjectRate,
wxDefaultPosition,
wxDefaultSize,
true);
/* use this instead of "seconds" because if a selection is passed to the
* effect, I want it (dDuration) to be used as the duration, and with
* "seconds" this does not always work properly. For example, it rounds
* down to zero... */
mDtmfDurationT->SetName(_("Duration"));
mDtmfDurationT->SetFormatString(mDtmfDurationT->GetBuiltinFormat(dIsSelection==true?(_("hh:mm:ss + samples")):(_("hh:mm:ss + milliseconds"))));
mDtmfDurationT->EnableMenu();
}
S.AddWindow(mDtmfDurationT);
S.AddFixedText(_("Tone/silence ratio:"), false);
S.SetStyle(wxSL_HORIZONTAL | wxEXPAND);
mDtmfDutyS = S.Id(ID_DTMF_DUTYCYCLE_SLIDER).AddSlider(wxT(""), (int)dDutyCycle, DUTY_MAX, DUTY_MIN);
S.SetSizeHints(-1,-1);
}
S.EndMultiColumn();
S.StartMultiColumn(2, wxCENTER);
{
S.AddFixedText(_("Duty cycle:"), false);
mDtmfDutyT = S.Id(ID_DTMF_DUTYCYCLE_TEXT).AddVariableText(wxString::Format(wxT("%.1f %%"), (float) dDutyCycle/DUTY_SCALE), false);
S.AddFixedText(_("Tone duration:"), false);
mDtmfSilenceT = S.Id(ID_DTMF_TONELEN_TEXT).AddVariableText(wxString::Format(wxString(wxT("%d ")) + _("ms"), (int) dTone * 1000), false);
S.AddFixedText(_("Silence duration:"), false);
mDtmfToneT = S.Id(ID_DTMF_SILENCE_TEXT).AddVariableText(wxString::Format(wxString(wxT("%d ")) + _("ms"), (int) dSilence * 1000), false);
}
S.EndMultiColumn();
}
示例6: PopulateOrExchange
void ChangeSpeedDialog::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(10);
S.StartHorizontalLay(wxCENTER, false);
{
S.AddTitle(_("Change Speed, affecting both Tempo and Pitch") +
wxString(wxT("\n\n")) +
_("by Vaughan Johnson && Dominic Mazzoni") +
wxString(wxT("\n")) +
_("using SampleRate, by Erik de Castro Lopo"));
}
S.EndHorizontalLay();
S.SetBorder(5);
//
S.StartMultiColumn(2, wxCENTER);
{
mpTextCtrl_PercentChange =
S.Id(ID_TEXT_PERCENTCHANGE).AddTextBox(_("Percent Change:"), wxT(""), 12);
wxTextValidator validator(wxFILTER_NUMERIC);
mpTextCtrl_PercentChange->SetValidator(validator);
}
S.EndMultiColumn();
//
S.StartHorizontalLay(wxEXPAND);
{
S.SetStyle(wxSL_HORIZONTAL);
mpSlider_PercentChange =
S.Id(ID_SLIDER_PERCENTCHANGE).AddSlider(wxT(""), 0, (int)PERCENTCHANGE_MAX, (int)PERCENTCHANGE_MIN);
mpSlider_PercentChange->SetName(_("Percent Change"));
}
S.EndHorizontalLay();
//
S.StartMultiColumn(5, wxCENTER);
{
S.AddUnits(_("Standard Vinyl RPM:"));
wxArrayString rpmStrings;
rpmStrings.Add(wxT("33 1/3"));
rpmStrings.Add(wxT("45"));
rpmStrings.Add(wxT("78"));
/* i18n-hint: n/a is an English abbreviation meaning "not applicable". */
rpmStrings.Add(_("n/a"));
mpChoice_FromVinyl =
S.Id(ID_CHOICE_FROMVINYL).AddChoice(_("from"), wxT(""), &rpmStrings);
mpChoice_FromVinyl->SetName(_("From RPM"));
mpChoice_FromVinyl->SetSizeHints(100, -1);
mpChoice_ToVinyl =
S.Id(ID_CHOICE_TOVINYL).AddChoice(_("to"), wxT(""), &rpmStrings);
mpChoice_ToVinyl->SetName(_("To RPM"));
mpChoice_ToVinyl->SetSizeHints(100, -1);
}
S.EndMultiColumn();
}
示例7: PopulateOrExchange
void ClickRemovalDialog::PopulateOrExchange(ShuttleGui & S)
{
wxTextValidator vld(wxFILTER_INCLUDE_CHAR_LIST);
vld.SetIncludes(wxArrayString(10, numbers));
S.StartHorizontalLay(wxCENTER, false);
{
S.AddTitle(_("Click and Pop Removal by Craig DeForest"));
}
S.EndHorizontalLay();
S.StartHorizontalLay(wxCENTER, false);
{
// Add a little space
}
S.EndHorizontalLay();
S.StartMultiColumn(3, wxEXPAND);
S.SetStretchyCol(2);
{
// Threshold
mThreshT = S.Id(ID_THRESH_TEXT).AddTextBox(_("Select threshold (lower is more sensitive):"),
wxT(""),
10);
mThreshT->SetValidator(vld);
S.SetStyle(wxSL_HORIZONTAL);
mThreshS = S.Id(ID_THRESH_SLIDER).AddSlider(wxT(""),
0,
MAX_THRESHOLD);
mThreshS->SetName(_("Select threshold"));
mThreshS->SetRange(MIN_THRESHOLD, MAX_THRESHOLD);
#if defined(__WXGTK__)
// Force a minimum size since wxGTK allows it to go to zero
mThreshS->SetMinSize(wxSize(100, -1));
#endif
// Click width
mWidthT = S.Id(ID_WIDTH_TEXT).AddTextBox(_("Max spike width (higher is more sensitive):"),
wxT(""),
10);
mWidthT->SetValidator(vld);
S.SetStyle(wxSL_HORIZONTAL);
mWidthS = S.Id(ID_WIDTH_SLIDER).AddSlider(wxT(""),
0,
MAX_CLICK_WIDTH);
mWidthS->SetName(_("Max spike width"));
mWidthS->SetRange(MIN_CLICK_WIDTH, MAX_CLICK_WIDTH);
#if defined(__WXGTK__)
// Force a minimum size since wxGTK allows it to go to zero
mWidthS->SetMinSize(wxSize(100, -1));
#endif
}
S.EndMultiColumn();
return;
}
示例8: PopulateOrExchange
void MidiIOPrefs::PopulateOrExchange( ShuttleGui & S ) {
wxArrayString empty;
S.SetBorder(2);
S.StartStatic(_("Interface"));
{
S.StartMultiColumn(2);
{
S.Id(HostID);
mHost = S.TieChoice(_("Host") + wxString(wxT(":")),
wxT("/MidiIO/Host"),
wxT(""),
mHostNames,
mHostLabels);
S.SetSizeHints(mHostNames);
S.AddPrompt(_("Using:"));
S.AddFixedText(wxString(Pa_GetVersionText(), wxConvLocal));
}
S.EndMultiColumn();
}
S.EndStatic();
S.StartStatic(_("Playback"));
{
S.StartMultiColumn(2);
{
S.Id(PlayID);
mPlay = S.AddChoice(_("Device") + wxString(wxT(":")),
wxEmptyString,
&empty);
}
S.EndMultiColumn();
}
S.EndStatic();
S.StartStatic(_("Recording"));
{
S.StartMultiColumn(2);
{
S.Id(RecordID);
mRecord = S.AddChoice(_("Device") + wxString(wxT(":")),
wxEmptyString,
&empty);
S.Id(ChannelsID);
/*
mChannels = S.AddChoice(_("Channels") + wxString(wxT(":")),
wxEmptyString,
&empty);
*/
}
S.EndMultiColumn();
}
S.EndStatic();
}
示例9: PopulateOrExchange
void MacroCommandDialog::PopulateOrExchange(ShuttleGui &S)
{
S.StartVerticalLay(true);
{
S.StartMultiColumn(4, wxEXPAND);
{
S.SetStretchyCol(1);
mCommand = S.AddTextBox(_("&Command"), wxT(""), 20);
mCommand->SetEditable(false);
mEditParams = S.Id(EditParamsButtonID).AddButton(_("&Edit Parameters"));
mEditParams->Enable(false); // disable button as box is empty
mUsePreset = S.Id(UsePresetButtonID).AddButton(_("&Use Preset"));
mUsePreset->Enable(false); // disable button as box is empty
}
S.EndMultiColumn();
S.StartMultiColumn(2, wxEXPAND);
{
S.SetStretchyCol(1);
mParameters = S.AddTextBox(_("&Parameters"), wxT(""), 0);
mParameters->SetEditable(false);
wxString prompt{_("&Details")};
S.Prop(0).AddPrompt(prompt);
mDetails = S.AddTextWindow( wxT(""));
mDetails->SetEditable(false);
mDetails->SetName(wxStripMenuCodes(prompt));
}
S.EndMultiColumn();
S.Prop(10).StartStatic(_("Choose command"), true);
{
S.SetStyle(wxSUNKEN_BORDER | wxLC_LIST | wxLC_SINGLE_SEL);
mChoices = S.Id(CommandsListID).AddListControl();
}
S.EndStatic();
}
S.EndVerticalLay();
S.AddStandardButtons( eOkButton | eCancelButton | eHelpButton);
PopulateCommandList();
if (mChoices->GetItemCount() > 0) {
// set first item to be selected (and the focus when the
// list first becomes the focus)
mChoices->SetItemState(0, wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED,
wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED);
}
SetMinSize(wxSize(780, 560));
Fit();
Center();
}
示例10: PopulateOrExchange
/// Defines the dialog and does data exchange with it.
void BatchProcessDialog::PopulateOrExchange(ShuttleGui &S)
{
S.StartVerticalLay(true);
{
/*i18n-hint: A chain is a sequence of commands that can be applied
* to one or more audio files.*/
S.StartStatic(_("&Select Chain"), true);
{
S.SetStyle(wxSUNKEN_BORDER | wxLC_REPORT | wxLC_HRULES | wxLC_VRULES |
wxLC_SINGLE_SEL);
mChains = S.Id(ChainsListID).AddListControlReportMode();
mChains->InsertColumn(0, _("Chain"), wxLIST_FORMAT_LEFT);
}
S.EndStatic();
S.StartHorizontalLay(wxALIGN_RIGHT, false);
{
S.SetBorder(10);
S.Id(ApplyToProjectID).AddButton(_("Apply to Current &Project"));
S.Id(ApplyToFilesID).AddButton(_("Apply to &Files..."));
S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
}
S.EndHorizontalLay();
}
S.EndVerticalLay();
wxArrayString names = mBatchCommands.GetNames();
for (int i = 0; i < (int)names.GetCount(); i++) {
mChains->InsertItem(i, names[i]);
}
// Get and validate the currently active chain
wxString name = gPrefs->Read(wxT("/Batch/ActiveChain"), wxT(""));
int item = mChains->FindItem(-1, name);
if (item == -1) {
item = 0;
name = mChains->GetItemText(0);
}
// Select the name in the list...this will fire an event.
mChains->SetItemState(item, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
Layout();
Fit();
SetSizeHints(GetSize());
Center();
// Set the column size for the chains list.
wxSize sz = mChains->GetClientSize();
mChains->SetColumnWidth(0, sz.x);
}
示例11: PopulateOrExchange
void DtmfDialog::PopulateOrExchange( ShuttleGui & S )
{
wxTextValidator vldDtmf(wxFILTER_INCLUDE_CHAR_LIST);
vldDtmf.SetIncludes(wxArrayString(20, dtmfSymbols));
S.AddTitle(_("by Salvo Ventura (2006)"));
S.StartMultiColumn(2, wxEXPAND);
{
mDtmfStringT = S.Id(ID_DTMF_STRING_TEXT).AddTextBox(_("DTMF sequence:"), wxT(""), 10);
mDtmfStringT->SetValidator(vldDtmf);
S.AddPrompt(_("DTMF duration:"));
mDtmfDurationT = new
TimeTextCtrl(this,
ID_DTMF_DURATION_TEXT,
/*
use this instead of "seconds" because if a selection is passed to the effect,
I want it (dDuration) to be used as the duration, and with "seconds" this does
not always work properly. For example, it rounds down to zero...
*/
TimeTextCtrl::GetBuiltinFormat(dIsSelection==true?(wxT("hh:mm:ss + samples")):(wxT("seconds"))),
dDuration,
44100,
wxDefaultPosition,
wxDefaultSize,
true);
S.AddWindow(mDtmfDurationT);
mDtmfDurationT->EnableMenu();
S.AddFixedText(_("Tone/silence ratio:"), false);
S.SetStyle(wxSL_HORIZONTAL | wxEXPAND);
mDtmfDutyS = S.Id(ID_DTMF_DUTYCYCLE_SLIDER).AddSlider(wxT(""), (int)dDutyCycle, DUTY_MAX);
mDtmfDutyS->SetRange(DUTY_MIN, DUTY_MAX);
S.SetSizeHints(-1,-1);
}
S.EndMultiColumn();
S.StartMultiColumn(2, wxCENTER);
{
S.AddFixedText(_("Duty cycle:"), false);
mDtmfDutyT = S.Id(ID_DTMF_DUTYCYCLE_TEXT).AddVariableText(wxString::Format(wxT("%.1f %%"), (float) dDutyCycle/DUTY_SCALE), false);
S.AddFixedText(_("Tone duration:"), false);
mDtmfSilenceT = S.Id(ID_DTMF_TONELEN_TEXT).AddVariableText(wxString::Format(wxString(wxT("%d ")) + _("ms"), (int) dTone * 1000), false);
S.AddFixedText(_("Silence duration:"), false);
mDtmfToneT = S.Id(ID_DTMF_SILENCE_TEXT).AddVariableText(wxString::Format(wxString(wxT("%d ")) + _("ms"), (int) dSilence * 1000), false);
}
S.EndMultiColumn();
}
示例12: PopulateOrExchange
void BassBoostDialog::PopulateOrExchange(ShuttleGui & S)
{
wxTextValidator vld(wxFILTER_INCLUDE_CHAR_LIST);
vld.SetIncludes(wxArrayString(10, numbers));
S.StartHorizontalLay(wxCENTER, false);
{
S.AddTitle(_("by Nasca Octavian Paul"));
}
S.EndHorizontalLay();
S.StartHorizontalLay(wxCENTER, false);
{
// Add a little space
}
S.EndHorizontalLay();
S.StartMultiColumn(3, wxEXPAND);
S.SetStretchyCol(2);
{
// Frequency
mFreqT = S.Id(ID_FREQ_TEXT).AddTextBox(_("Frequency (Hz):"),
wxT(""),
10);
mFreqT->SetValidator(vld);
S.SetStyle(wxSL_HORIZONTAL);
mFreqS = S.Id(ID_FREQ_SLIDER).AddSlider(wxT(""),
0,
FREQ_MAX);
mFreqS->SetName(_("Frequency Hertz"));
mFreqS->SetRange(FREQ_MIN, FREQ_MAX);
// Boost
mBoostT = S.Id(ID_BOOST_TEXT).AddTextBox(_("Boost (dB):"),
wxT(""),
10);
mBoostT->SetValidator(vld);
S.SetStyle(wxSL_HORIZONTAL);
mBoostS = S.Id(ID_BOOST_SLIDER).AddSlider(wxT(""),
0,
BOOST_MAX);
mBoostS->SetName(_("Boost dB"));
mBoostS->SetRange(BOOST_MIN, BOOST_MAX);
}
S.EndMultiColumn();
return;
}
示例13: PopulateOrExchange
void AmplifyDialog::PopulateOrExchange(ShuttleGui & S)
{
wxTextValidator vld(wxFILTER_NUMERIC);
S.AddSpace(0, 5);
// Amplitude
S.StartMultiColumn(2, wxCENTER);
{
mAmpT = S.Id(ID_AMP_TEXT).AddTextBox(_("Amplification (dB):"),
wxT(""),
12);
mAmpT->SetValidator(vld);
}
S.EndMultiColumn();
// Amplitude
S.StartHorizontalLay(wxEXPAND);
{
S.SetStyle(wxSL_HORIZONTAL);
mAmpS = S.Id(ID_AMP_SLIDER).AddSlider(wxT(""),
0,
AMP_MAX,
AMP_MIN);
mAmpS->SetName(_("Amplification dB"));
}
S.EndHorizontalLay();
// Peek
S.StartMultiColumn(2, wxCENTER);
{
mPeakT = S.Id(ID_PEAK_TEXT).AddTextBox(_("New Peak Amplitude (dB):"),
wxT(""),
12);
mPeakT->SetValidator(vld);
}
S.EndMultiColumn();
// Clipping
S.StartHorizontalLay(wxCENTER);
{
mClip = S.Id(ID_CLIP_CHECKBOX).AddCheckBox(_("Allow clipping"),
wxT("false"));
}
S.EndHorizontalLay();
return;
}
示例14: PopulateOrExchange
void TruncSilenceDialog::PopulateOrExchange(ShuttleGui & S)
{
S.StartHorizontalLay(wxCENTER, false);
{
S.AddTitle(_("by Lynn Allan"));
}
S.EndHorizontalLay();
S.StartHorizontalLay(wxCENTER, false);
{
// Add a little space
}
S.EndHorizontalLay();
S.StartThreeColumn();
{
wxArrayString choices(Enums::NumDbChoices, Enums::GetDbChoices());
S.Id( ID_LONGEST_SILENCE_TEXT ).TieTextBox(_("Max silence duration:"),
mEffect->mTruncLongestAllowedSilentMs,
10);
S.AddUnits( _("milliseconds") );
//S.AddUnits(_("(9999999 or greater is off)"));
S.TieChoice(_("Threshold for silence:"),
mEffect->mTruncDbChoiceIndex,
&choices);
}
S.EndTwoColumn();
pWarning = S.AddVariableText( wxT("") );
}
示例15: PopulateOrExchange
void RepeatDialog::PopulateOrExchange(ShuttleGui & S)
{
wxTextValidator vld(wxFILTER_INCLUDE_CHAR_LIST);
vld.SetIncludes(wxArrayString(12, numbers));
S.StartHorizontalLay(wxCENTER, false);
{
S.AddTitle(_("by Dominic Mazzoni && Vaughan Johnson"));
}
S.EndHorizontalLay();
S.StartHorizontalLay(wxCENTER, false);
{
// Add a little space
}
S.EndHorizontalLay();
S.StartHorizontalLay(wxCENTER, false);
{
mRepeatCount = S.Id(ID_REPEAT_TEXT).AddTextBox(_("Number of times to repeat:"),
wxT(""),
12);
mRepeatCount->SetValidator(vld);
}
S.EndHorizontalLay();
S.StartHorizontalLay(wxCENTER, true);
{
mTotalTime = S.AddVariableText(_("New selection length: hh:mm:ss"));
}
S.EndHorizontalLay();
}