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(); }
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; }
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(); }
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(); }
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(); }
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(); }
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; }
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(); }
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(); }
/// 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); }
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(); }
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; }
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; }
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("") ); }
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(); }
/// 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(); }
void DirectoriesPrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); S.StartStatic(_("Temporary files directory")); { S.StartMultiColumn(3, wxEXPAND); { S.SetStretchyCol(1); S.Id(TempDirID); mTempDir = S.TieTextBox(_("&Location:"), wxT("/Directories/TempDir"), wxT(""), 30); S.Id(ChooseButtonID); S.AddButton(_("C&hoose...")); S.AddFixedText(_("Free Space:")); mFreeSpace = S.AddVariableText(wxT("")); } S.EndMultiColumn(); } S.EndStatic(); #ifdef DEPRECATED_AUDIO_CACHE // See http://bugzilla.audacityteam.org/show_bug.cgi?id=545. S.StartStatic(_("Audio cache")); { S.TieCheckBox(_("Play and/or record using &RAM (useful for slow drives)"), wxT("/Directories/CacheBlockFiles"), false); S.StartTwoColumn(); { S.TieNumericTextBox(_("Mi&nimum Free Memory (MB):"), wxT("/Directories/CacheLowMem"), 16, 9); } S.EndTwoColumn(); S.AddVariableText(_("If the available system memory falls below this value, audio will no longer\nbe cached in memory and will be written to disk."))->Wrap(600); } S.EndStatic(); #endif // DEPRECATED_AUDIO_CACHE }
void WaveformPrefs::PopulateOrExchange(ShuttleGui & S) { mPopulating = true; S.SetBorder(2); // S.StartStatic(_("Track Settings")); { mDefaultsCheckbox = 0; if (mWt) { /* i18n-hint: use is a verb */ mDefaultsCheckbox = S.Id(ID_DEFAULTS).TieCheckBox(_("&Use Preferences"), mDefaulted); } S.StartStatic(_("Display")); { S.StartTwoColumn(); { mScaleChoice = S.Id(ID_SCALE).TieChoice(_("S&cale") + wxString(wxT(":")), *(int*)&mTempSettings.scaleType, &mScaleChoices); mRangeChoice = S.Id(ID_RANGE).TieChoice(_("Waveform dB &range") + wxString(wxT(":")), *(int*)&mTempSettings.dBRange, &mRangeChoices); S.SetSizeHints(mRangeChoices); } S.EndTwoColumn(); } S.EndStatic(); } // S.EndStatic(); /* S.StartStatic(_("Global settings")); { } S.EndStatic(); */ EnableDisableRange(); mPopulating = false; }
void PopulateOrExchange(ShuttleGui & S) { wxString text; S.SetBorder(10); S.StartVerticalLay(true); { text.Printf(_("Audacity needs the file '%s' to import and export audio via FFmpeg."), mName.c_str()); S.AddTitle(text); S.SetBorder(3); S.StartHorizontalLay(wxALIGN_LEFT, true); { text.Printf(_("Location of '%s':"), mName.c_str()); S.AddTitle(text); } S.EndHorizontalLay(); S.StartMultiColumn(2, wxEXPAND); S.SetStretchyCol(0); { if (mLibPath.GetFullPath().IsEmpty()) { text.Printf(_("To find '%s', click here -->"), mName.c_str()); mPathText = S.AddTextBox(wxT(""), text, 0); } else { mPathText = S.AddTextBox(wxT(""), mLibPath.GetFullPath(), 0); } S.Id(ID_FFMPEG_BROWSE).AddButton(_("Browse..."), wxALIGN_RIGHT); S.AddVariableText(_("To get a free copy of FFmpeg, click here -->"), true); S.Id(ID_FFMPEG_DLOAD).AddButton(_("Download"), wxALIGN_RIGHT); } S.EndMultiColumn(); S.AddStandardButtons(); } S.EndVerticalLay(); Layout(); Fit(); SetMinSize(GetSize()); Center(); return; }
void NormalizeDialog::PopulateOrExchange(ShuttleGui & S) { wxTextValidator vld(wxFILTER_NUMERIC); S.StartHorizontalLay(wxCENTER, false); { S.AddTitle(_("by Dominic Mazzoni")); } S.EndHorizontalLay(); S.StartHorizontalLay(wxCENTER, false); { // Add a little space } S.EndHorizontalLay(); S.StartTwoColumn(); { S.StartVerticalLay(false); { mDCCheckBox = S.Id(ID_DC_REMOVE).AddCheckBox(_("Remove any DC offset (center on 0.0 vertically)"), mDC ? wxT("true") : wxT("false")); mGainCheckBox = S.Id(ID_NORMALIZE_AMPLITUDE).AddCheckBox(_("Normalize maximum amplitude to:"), mGain ? wxT("true") : wxT("false")); S.StartHorizontalLay(wxALIGN_CENTER, false); { mLevelTextCtrl = S.Id(ID_LEVEL_TEXT).AddTextBox(wxT(""), wxT(""), 10); mLevelTextCtrl->SetValidator(vld); mLevelTextCtrl->SetName(_("Maximum amplitude dB")); mLeveldB = S.AddVariableText(_("dB"), false, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT); mWarning = S.AddVariableText( wxT(""), false, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT); } S.EndHorizontalLay(); mStereoIndCheckBox = S.AddCheckBox(_("Normalize stereo channels independently"), mStereoInd ? wxT("true") : wxT("false")); } S.EndVerticalLay(); } S.EndTwoColumn(); }
void DirectoriesPrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); S.StartStatic(_("Temporary files directory")); { S.StartMultiColumn(3, wxEXPAND); { S.SetStretchyCol(1); S.Id(TempDirID); mTempDir = S.TieTextBox(_("Location:"), wxT("/Directories/TempDir"), wxT(""), 30); S.Id(ChooseButtonID); S.AddButton(_("Choose...")); S.AddFixedText(_("Free Space:")); mFreeSpace = S.AddVariableText(wxT("")); } S.EndMultiColumn(); } S.EndStatic(); S.StartStatic(_("Audio cache")); { S.TieCheckBox(_("Play and/or record using RAM (useful for slow drives)"), wxT("/Directories/CacheBlockFiles"), false); S.StartTwoColumn(); { S.TieTextBox(_("Minimum Free Memory (MB):"), wxT("/Directories/CacheLowMem"), 16, 9); } S.EndTwoColumn(); S.AddVariableText(_("If the available system memory falls below this value, audio will no longer\nbe cached in memory and will be written to disk."))->Wrap(600); } S.EndStatic(); }
void WaveformPrefs::PopulateOrExchange(ShuttleGui & S) { mPopulating = true; S.SetBorder(2); // S.StartStatic(_("Track Settings")); { mDefaultsCheckbox = 0; if (mWt) { /* i18n-hint: use is a verb */ mDefaultsCheckbox = S.Id(ID_DEFAULTS).TieCheckBox(_("Use Preferences"), mDefaulted); } S.StartStatic(_("Display")); { S.StartTwoColumn(); { S.Id(ID_SCALE).TieChoice(_("S&cale") + wxString(wxT(":")), *(int*)&mTempSettings.scaleType, &mScaleChoices); } S.EndTwoColumn(); } S.EndStatic(); } // S.EndStatic(); /* S.StartStatic(_("Global settings")); { } S.EndStatic(); */ S.StartMultiColumn(2, wxALIGN_RIGHT); { S.Id(ID_APPLY).AddButton(_("Appl&y")); } S.EndMultiColumn(); mPopulating = false; }
void BatchCommandDialog::PopulateOrExchange(ShuttleGui &S) { S.StartVerticalLay(true); { S.StartMultiColumn(3, 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 } S.EndMultiColumn(); S.StartMultiColumn(2, wxEXPAND); { S.SetStretchyCol(1); mParameters = S.AddTextBox(_("&Parameters"), wxT(""), 0); mParameters->SetEditable(false); } S.EndMultiColumn(); S.StartStatic(_("C&hoose command"), true); { S.SetStyle(wxSUNKEN_BORDER | wxLC_LIST | wxLC_SINGLE_SEL); mChoices = S.Id(CommandsListID).AddListControl(); } S.EndStatic(); } S.EndVerticalLay(); S.AddStandardButtons(); for(int i=0;i<99;i++) { mChoices->InsertItem( i, wxString::Format(wxT("Item%02i"),i)); } PopulateCommandList(); SetSize(350, 400); SetSizeHints(GetSize()); Center(); }
/// Normally in classes derived from PrefsPanel this function /// is used both to populate the panel and to exchange data with it. /// With KeyConfigPrefs all the exchanges are handled specially, /// so this is only used in populating the panel. void KeyConfigPrefs::PopulateOrExchange( ShuttleGui & S ) { S.StartStatic( _("Key Bindings"), 1 ); mList = S.Id( CommandsListID ).AddListControlReportMode(); S.StartHorizontalLay( wxALIGN_LEFT, 0); { // LLL: Moved here from Populate. On the Mac, the control // would not accept focus when using the mouse, but it // would when tabbing to the field. Not really sure // why...just glad it works now. :-) // The SysKeyText ctrl is so special that we aren't // going to include it into Audacity's version of ShuttleGui. // So instead we create it here, and we can add it into // the sizer scheme later... mCurrentComboText = new SysKeyTextCtrl( this, CurrentComboID, wxT(""), wxDefaultPosition, wxSize(115, -1), 0 ); // AddWindow is a generic 'Add' for ShuttleGui. // It allows us to add 'foreign' controls. S.AddWindow( mCurrentComboText )->MoveAfterInTabOrder( mList ); S.Id( SetButtonID ).AddButton( _("S&et")); S.Id( ClearButtonID ).AddButton( _("&Clear")); } S.EndHorizontalLay(); #ifdef __WXMAC__ S.AddFixedText( _("Note: Pressing Cmd+Q will quit. All other keys are valid.")); #endif S.StartHorizontalLay( wxALIGN_LEFT, 0); { S.Id( AssignDefaultsButtonID ).AddButton( _("&Defaults")); S.Id( SaveButtonID ).AddButton( _("&Save...")); S.Id( LoadButtonID ).AddButton( _("&Load...")); } S.EndHorizontalLay(); S.EndStatic(); return; }
/// Normally in classes derived from PrefsPanel this function /// is used both to populate the panel and to exchange data with it. /// With KeyConfigPrefs all the exchanges are handled specially, /// so this is only used in populating the panel. void KeyConfigPrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); S.StartStatic(_("Key Bindings"), 1); { S.StartHorizontalLay(wxALIGN_CENTRE, false); { S.Id(CategoryID); mCat = S.AddChoice(_("C&ategory:"), mCats[0], &mCats); } S.EndHorizontalLay(); mList = S.Id(CommandsListID).AddListControlReportMode(); mList->SetName(_("Key Bindings")); S.StartThreeColumn(); { if (!mKey) { mKey = new wxTextCtrl(this, CurrentComboID, wxT(""), wxDefaultPosition, #if defined(__WXMAC__) wxSize(300, -1)); #else wxSize(210, -1)); #endif mKey->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(KeyConfigPrefs::OnCaptureKeyDown)); mKey->Connect(wxEVT_CHAR, wxKeyEventHandler(KeyConfigPrefs::OnCaptureChar)); } S.AddWindow(mKey); /* i18n-hint: (verb)*/ S.Id(SetButtonID).AddButton(_("Set")); S.Id(ClearButtonID).AddButton(_("Cl&ear")); } S.EndThreeColumn(); #if defined(__WXMAC__) S.AddFixedText(_("Note: Pressing Cmd+Q will quit. All other keys are valid.")); #endif S.StartThreeColumn(); { S.Id(ImportButtonID).AddButton(_("&Import...")); S.Id(ExportButtonID).AddButton(_("&Export...")); S.Id(AssignDefaultsButtonID).AddButton(_("&Defaults")); } S.EndThreeColumn(); }
void SplashDialog::Populate( ShuttleGui & S ) { this->SetBackgroundColour(theTheme.Colour( clrAboutBoxBackground )); bool bShow; gPrefs->Read(wxT("/GUI/ShowSplashScreen"), &bShow, true ); S.StartVerticalLay(1); //v For now, change to AudacityLogoWithName via old-fashioned ways, not Theme. m_pLogo = new wxBitmap((const char **) AudacityLogoWithName_xpm); //v // JKC: Resize to 50% of size. Later we may use a smaller xpm as // our source, but this allows us to tweak the size - if we want to. // It also makes it easier to revert to full size if we decide to. const float fScale=0.5f;// smaller size. wxImage RescaledImage( m_pLogo->ConvertToImage() ); // wxIMAGE_QUALITY_HIGH not supported by wxWidgets 2.6.1, or we would use it here. RescaledImage.Rescale( int(LOGOWITHNAME_WIDTH * fScale), int(LOGOWITHNAME_HEIGHT *fScale) ); wxBitmap RescaledBitmap( RescaledImage ); m_pIcon = new wxStaticBitmap(S.GetParent(), -1, //*m_pLogo, //v theTheme.Bitmap(bmpAudacityLogoWithName), RescaledBitmap, wxDefaultPosition, wxSize(int(LOGOWITHNAME_WIDTH*fScale), int(LOGOWITHNAME_HEIGHT*fScale))); S.Prop(0).AddWindow( m_pIcon ); mpHtml = new LinkingHtmlWindow(S.GetParent(), -1, wxDefaultPosition, wxSize(506, 280), wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER ); mpHtml->SetPage(HelpText( wxT("welcome") )); S.Prop(1).AddWindow( mpHtml, wxEXPAND ); S.Prop(0).StartMultiColumn(2, wxEXPAND); S.SetStretchyCol( 1 );// Column 1 is stretchy... { S.SetBorder( 5 ); S.Id( DontShowID).AddCheckBox( _("Don't show this again at start up"), bShow ? wxT("false") : wxT("true") ); wxButton *ok = new wxButton(S.GetParent(), wxID_OK); ok->SetDefault(); S.SetBorder( 5 ); S.Prop(0).AddWindow( ok, wxALIGN_RIGHT| wxALL ); } S.EndVerticalLay(); }
void EffectReverb::PopulateOrExchange(ShuttleGui & S) { S.AddSpace(0, 5); S.StartMultiColumn(3, wxEXPAND); { S.SetStretchyCol(2); #define SpinSlider(n, p) \ m ## n ## T = S.Id(ID_ ## n). \ AddSpinCtrl( p, DEF_ ## n, MAX_ ## n, MIN_ ## n); \ S.SetStyle(wxSL_HORIZONTAL); \ m ## n ## S = S.Id(ID_ ## n). \ AddSlider(wxT(""), DEF_ ## n, MAX_ ## n, MIN_ ## n); SpinSlider(RoomSize, _("&Room Size (%):")); SpinSlider(PreDelay, _("&Pre-delay (ms):")); SpinSlider(Reverberance, _("Rever&berance (%):")); SpinSlider(HfDamping, _("Da&mping (%):")); SpinSlider(ToneLow, _("Tone &Low (%):")); SpinSlider(ToneHigh, _("Tone &High (%):")); SpinSlider(WetGain, _("Wet &Gain (dB):")); SpinSlider(DryGain, _("Dr&y Gain (dB):")); SpinSlider(StereoWidth, _("Stereo Wid&th (%):")); #undef SpinSlider } S.EndMultiColumn(); S.StartHorizontalLay(wxCENTER, false); { mWetOnlyC = S.Id(ID_WetOnly). AddCheckBox(_("Wet O&nly"), DEF_WetOnly ? wxT("true") : wxT("false")); } S.EndHorizontalLay(); return; }
void SpectrumPrefs::PopulateOrExchange(ShuttleGui & S) { mPopulating = true; S.SetBorder(2); // S.StartStatic(_("Track Settings")); // { mDefaultsCheckbox = 0; if (mWt) { /* i18n-hint: use is a verb */ mDefaultsCheckbox = S.Id(ID_DEFAULTS).TieCheckBox(_("Use Preferences"), mDefaulted); } S.StartStatic(_("Scale")); { S.StartTwoColumn(); { S.Id(ID_SCALE).TieChoice(_("S&cale") + wxString(wxT(":")), *(int*)&mTempSettings.scaleType, &mScaleChoices); mMinFreq = S.Id(ID_MINIMUM).TieNumericTextBox(_("Mi&nimum Frequency (Hz):"), mTempSettings.minFreq, 12); mMaxFreq = S.Id(ID_MAXIMUM).TieNumericTextBox(_("Ma&ximum Frequency (Hz):"), mTempSettings.maxFreq, 12); } S.EndTwoColumn(); } S.EndStatic(); S.StartStatic(_("Colors")); { S.StartTwoColumn(); { mGain = S.Id(ID_GAIN).TieNumericTextBox(_("&Gain (dB):"), mTempSettings.gain, 8); mRange = S.Id(ID_RANGE).TieNumericTextBox(_("&Range (dB):"), mTempSettings.range, 8); mFrequencyGain = S.Id(ID_FREQUENCY_GAIN).TieNumericTextBox(_("Frequency g&ain (dB/dec):"), mTempSettings.frequencyGain, 4); } S.Id(ID_GRAYSCALE).TieCheckBox(_("S&how the spectrum using grayscale colors"), mTempSettings.isGrayscale); S.EndTwoColumn(); } S.EndStatic(); S.StartStatic(_("Algorithm")); { S.StartMultiColumn(2); { mAlgorithmChoice = S.Id(ID_ALGORITHM).TieChoice(_("A&lgorithm") + wxString(wxT(":")), *(int*)&mTempSettings.algorithm, &mAlgorithmChoices); S.Id(ID_WINDOW_SIZE).TieChoice(_("Window &size:"), mTempSettings.windowSize, &mSizeChoices); S.SetSizeHints(mSizeChoices); S.Id(ID_WINDOW_TYPE).TieChoice(_("Window &type:"), mTempSettings.windowType, &mTypeChoices); S.SetSizeHints(mTypeChoices); #ifdef EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS mZeroPaddingChoiceCtrl = S.Id(ID_PADDING_SIZE).TieChoice(_("&Zero padding factor") + wxString(wxT(":")), mTempSettings.zeroPaddingFactor, &mZeroPaddingChoices); S.SetSizeHints(mZeroPaddingChoices); #endif } S.EndMultiColumn(); } S.EndStatic(); #ifndef SPECTRAL_SELECTION_GLOBAL_SWITCH S.Id(ID_SPECTRAL_SELECTION).TieCheckBox(_("Ena&ble Spectral Selection"), mTempSettings.spectralSelection); #endif #ifdef EXPERIMENTAL_FFT_Y_GRID S.TieCheckBox(_("Show a grid along the &Y-axis"), mTempSettings.fftYGrid); #endif //EXPERIMENTAL_FFT_Y_GRID #ifdef EXPERIMENTAL_FIND_NOTES /* i18n-hint: FFT stands for Fast Fourier Transform and probably shouldn't be translated*/ S.StartStatic(_("FFT Find Notes")); { S.StartTwoColumn(); { mFindNotesMinA = S.TieNumericTextBox(_("Minimum Amplitude (dB):"), mTempSettings.fftFindNotes, 8); mFindNotesN = S.TieNumericTextBox(_("Max. Number of Notes (1..128):"), mTempSettings.findNotesMinA, 8); } S.EndTwoColumn(); S.TieCheckBox(_("&Find Notes"), mTempSettings.numberOfMaxima); S.TieCheckBox(_("&Quantize Notes"), mTempSettings.findNotesQuantize); } S.EndStatic(); #endif //EXPERIMENTAL_FIND_NOTES // S.EndStatic(); #ifdef SPECTRAL_SELECTION_GLOBAL_SWITCH S.StartStatic(_("Global settings")); { S.TieCheckBox(_("Ena&ble spectral selection"), SpectrogramSettings::Globals::Get().spectralSelection); } S.EndStatic(); #endif EnableDisableSTFTOnlyControls(); mPopulating = false; }
void BassTrebleDialog::PopulateOrExchange(ShuttleGui & S) { S.StartStatic(wxT("")); { S.StartMultiColumn(3, wxEXPAND); S.SetStretchyCol(2); { #ifdef __WXGTK__ // BoxSizer is to make first mnemonic work, on Linux. wxPanel* cPanel = new wxPanel( this, wxID_ANY ); wxBoxSizer* cSizer = new wxBoxSizer(wxVERTICAL); cPanel->SetSizer(cSizer); #endif wxTextValidator vld(wxFILTER_NUMERIC); // Bass control mBassT = S.Id(ID_BASS_TEXT).AddTextBox(_("&Bass (dB):"), wxT(""), 10); mBassT->SetName(_("Bass (dB):")); mBassT->SetValidator(vld); S.SetStyle(wxSL_HORIZONTAL); mBassS = S.Id(ID_BASS_SLIDER).AddSlider(wxT(""), 0, BASS_MAX, BASS_MIN); mBassS->SetName(_("Bass")); mBassS->SetRange(BASS_MIN, BASS_MAX); mBassS->SetPageSize(30); // Treble control mTrebleT = S.Id(ID_TREBLE_TEXT).AddTextBox(_("&Treble (dB):"), wxT(""), 10); mTrebleT->SetValidator(vld); S.SetStyle(wxSL_HORIZONTAL); mTrebleS = S.Id(ID_TREBLE_SLIDER).AddSlider(wxT(""), 0, TREBLE_MAX, TREBLE_MIN); mTrebleS->SetName(_("Treble")); mTrebleS->SetRange(TREBLE_MIN, TREBLE_MAX); mTrebleS->SetPageSize(30); // Level control mLevelT = S.Id(ID_LEVEL_TEXT).AddTextBox(_("&Level (dB):"), wxT(""), 10); mLevelT->SetValidator(vld); S.SetStyle(wxSL_HORIZONTAL); mLevelS = S.Id(ID_LEVEL_SLIDER).AddSlider(wxT(""), 0, LEVEL_MAX, LEVEL_MIN); mLevelS->SetName(_("Level")); mLevelS->SetRange(LEVEL_MIN, LEVEL_MAX); mLevelS->SetPageSize(30); } S.EndMultiColumn(); } S.EndStatic(); // Normalize checkbox S.StartHorizontalLay(wxLEFT, true); { mNormalizeCheckBox = S.Id(ID_NORMALIZE).AddCheckBox(_("&Enable level control"), mbNormalize ? wxT("true") : wxT("false")); mWarning = S.AddVariableText( wxT(""), false, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT); } S.EndHorizontalLay(); }
void ChangeTempoDialog::PopulateOrExchange(ShuttleGui & S) { wxTextValidator nullvld(wxFILTER_INCLUDE_CHAR_LIST); wxTextValidator numvld(wxFILTER_NUMERIC); S.SetBorder(10); S.StartHorizontalLay(wxCENTER, false); { S.AddTitle(_("Change Tempo without Changing Pitch") + wxString(wxT("\n\n")) + _("by Vaughan Johnson && Dominic Mazzoni") + wxString(wxT("\n")) + _("using SoundTouch, by Olli Parviainen")); } S.EndHorizontalLay(); S.SetBorder(5); // S.StartMultiColumn(2, wxCENTER); { m_pTextCtrl_PercentChange = S.Id(ID_TEXT_PERCENTCHANGE) .AddTextBox(_("Percent Change:"), wxT(""), 12); m_pTextCtrl_PercentChange->SetValidator(numvld); } S.EndMultiColumn(); // S.StartHorizontalLay(wxEXPAND); { S.SetStyle(wxSL_HORIZONTAL); m_pSlider_PercentChange = S.Id(ID_SLIDER_PERCENTCHANGE) .AddSlider(wxT(""), 0, (int)PERCENTCHANGE_MAX, (int)PERCENTCHANGE_MIN); m_pSlider_PercentChange->SetName(_("Percent Change")); } S.EndHorizontalLay(); // S.StartMultiColumn(5, wxCENTER); { // S.AddUnits(_("Beats per minute:")); m_pTextCtrl_FromBPM = S.Id(ID_TEXT_FROMBPM) .AddTextBox(_("from"), wxT(""), 12); m_pTextCtrl_FromBPM->SetName(_("From beats per minute")); m_pTextCtrl_FromBPM->SetValidator(numvld); m_pTextCtrl_ToBPM = S.Id(ID_TEXT_TOBPM) .AddTextBox(_("to"), wxT(""), 12); m_pTextCtrl_ToBPM->SetName(_("To beats per minute")); m_pTextCtrl_ToBPM->SetValidator(numvld); // S.AddUnits(_("Length (seconds):")); m_pTextCtrl_FromLength = S.Id(ID_TEXT_FROMLENGTH) .AddTextBox(_("from"), wxT(""), 12); m_pTextCtrl_FromLength->SetName(_("From length in seconds")); m_pTextCtrl_FromLength->SetValidator(nullvld); m_pTextCtrl_ToLength = S.Id(ID_TEXT_TOLENGTH) .AddTextBox(_("to"), wxT(""), 12); m_pTextCtrl_ToLength->SetName(_("To length in seconds")); m_pTextCtrl_ToLength->SetValidator(numvld); } S.EndMultiColumn(); return; }