void SetTrackVisualsCommand::PopulateOrExchange(ShuttleGui & S) { SetTrackBase::PopulateOrExchange( S ); S.StartMultiColumn(3, wxEXPAND); { S.SetStretchyCol( 2 ); S.Optional( bHasHeight ).TieNumericTextBox( _("Height:"), mHeight ); S.Optional( bHasColour ).TieChoice( _("Colour:"), mColour, LocalizedStrings( kColourStrings, nColours ) ); S.Optional( bHasDisplayType ).TieChoice( _("Display:"), mDisplayType, LocalizedStrings( kDisplayTypeStrings, nDisplayTypes ) ); S.Optional( bHasScaleType ).TieChoice( _("Scale:"), mScaleType, LocalizedStrings( kScaleTypeStrings, nScaleTypes ) ); S.Optional( bHasVZoom ).TieChoice( _("VZoom:"), mVZoom, LocalizedStrings( kZoomTypeStrings, nZoomTypes ) ); S.Optional( bHasVZoomTop ).TieTextBox( _("VZoom Top:"), mVZoomTop ); S.Optional( bHasVZoomBottom ).TieTextBox( _("VZoom Bottom:"), mVZoomBottom ); } S.EndMultiColumn(); S.StartMultiColumn(2, wxEXPAND); { S.SetStretchyCol( 1 ); S.Optional( bHasUseSpecPrefs ).TieCheckBox( _("Use Spectral Prefs"), bUseSpecPrefs ); S.Optional( bHasSpectralSelect ).TieCheckBox( _("Spectral Select"), bSpectralSelect); S.Optional( bHasGrayScale ).TieCheckBox( _("Gray Scale"), bGrayScale ); } S.EndMultiColumn(); }
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(); }
LocalizedStrings ^FontFamily::FamilyNames::get() { ::IDWriteLocalizedStrings *localizedStrings; HRESULT hr = this->GetComObject()->GetFamilyNames(&localizedStrings); assert(SUCCEEDED(hr)); return gcnew LocalizedStrings(localizedStrings); }
void SetClipCommand::PopulateOrExchange(ShuttleGui & S) { S.AddSpace(0, 5); S.StartMultiColumn(3, wxALIGN_CENTER); { S.Optional( bHasContainsTime).TieNumericTextBox( _("At:"), mContainsTime ); S.Optional( bHasColour ).TieChoice( _("Colour:"), mColour, LocalizedStrings( kColourStrings, nColours ) ); S.Optional( bHasT0 ).TieNumericTextBox( _("Start:"), mT0 ); } S.EndMultiColumn(); }
void SelectTimeCommand::PopulateOrExchange(ShuttleGui & S) { S.AddSpace(0, 5); S.StartMultiColumn(3, wxEXPAND); { S.SetStretchyCol( 2 ); S.Optional( bHasT0 ).TieTextBox(_("Start Time:"), mT0); S.Optional( bHasT1 ).TieTextBox(_("End Time:"), mT1); // Chooses what time is relative to. S.Optional( bHasRelativeSpec ).TieChoice( _("Relative To:"), mRelativeTo, LocalizedStrings( kRelativeTo, nRelativeTos )); } S.EndMultiColumn(); }
void SelectTracksCommand::PopulateOrExchange(ShuttleGui & S) { S.AddSpace(0, 5); S.StartMultiColumn(3, wxEXPAND); { S.SetStretchyCol( 2 ); S.Optional( bHasFirstTrack).TieTextBox(_("First Track:"),mFirstTrack); S.Optional( bHasNumTracks).TieTextBox(_("Track Count:"),mNumTracks); } S.EndMultiColumn(); S.StartMultiColumn(2, wxALIGN_CENTER); { // Always used, so no check box. S.TieChoice( _("Mode:"), mMode, LocalizedStrings( kModes, nModes )); } S.EndMultiColumn(); }
void EffectScienFilter::PopulateOrExchange(ShuttleGui & S) { wxWindow *const parent = S.GetParent(); S.AddSpace(5); S.SetSizerProportion(1); S.StartMultiColumn(3, wxEXPAND); { S.SetStretchyCol(1); S.SetStretchyRow(0); // ------------------------------------------------------------------- // ROW 1: Freq response panel and sliders for vertical scale // ------------------------------------------------------------------- S.StartVerticalLay(); { mdBRuler = safenew RulerPanel( parent, wxID_ANY, wxVERTICAL, wxSize{ 100, 100 }, // Ruler can't handle small sizes RulerPanel::Range{ 30.0, -120.0 }, Ruler::LinearDBFormat, _("dB"), RulerPanel::Options{} .LabelEdges(true) ); S.SetBorder(1); S.AddSpace(1, 1); S.Prop(1); S.AddWindow(mdBRuler, wxALIGN_RIGHT | wxTOP); S.AddSpace(1, 1); } S.EndVerticalLay(); mPanel = safenew EffectScienFilterPanel( parent, wxID_ANY, this, mLoFreq, mNyquist ); S.SetBorder(5); S.Prop(1); S.AddWindow(mPanel, wxEXPAND | wxRIGHT); S.SetSizeHints(-1, -1); S.StartVerticalLay(); { S.AddVariableText(_("+ dB"), false, wxCENTER); S.SetStyle(wxSL_VERTICAL | wxSL_INVERSE); mdBMaxSlider = S.Id(ID_dBMax).AddSlider( {}, 10, 20, 0); #if wxUSE_ACCESSIBILITY mdBMaxSlider->SetName(_("Max dB")); mdBMaxSlider->SetAccessible(safenew SliderAx(mdBMaxSlider, _("%d dB"))); #endif S.SetStyle(wxSL_VERTICAL | wxSL_INVERSE); mdBMinSlider = S.Id(ID_dBMin).AddSlider( {}, -10, -10, -120); S.AddVariableText(_("- dB"), false, wxCENTER); #if wxUSE_ACCESSIBILITY mdBMinSlider->SetName(_("Min dB")); mdBMinSlider->SetAccessible(safenew SliderAx(mdBMinSlider, _("%d dB"))); #endif } S.EndVerticalLay(); // ------------------------------------------------------------------- // ROW 2: Frequency ruler // ------------------------------------------------------------------- S.AddSpace(1, 1); mfreqRuler = safenew RulerPanel( parent, wxID_ANY, wxHORIZONTAL, wxSize{ 100, 100 }, // Ruler can't handle small sizes RulerPanel::Range{ mLoFreq, mNyquist }, Ruler::IntFormat, wxT(""), RulerPanel::Options{} .Log(true) .Flip(true) .LabelEdges(true) ); S.Prop(1); S.AddWindow(mfreqRuler, wxEXPAND | wxALIGN_LEFT | wxRIGHT); S.AddSpace(1, 1); // ------------------------------------------------------------------- // ROW 3 and 4: Type, Order, Ripple, Subtype, Cutoff // ------------------------------------------------------------------- S.AddSpace(1, 1); S.SetSizerProportion(0); S.StartMultiColumn(8, wxALIGN_CENTER); { wxASSERT(nTypes == WXSIZEOF(kTypeStrings)); auto typeChoices = LocalizedStrings(kTypeStrings, nTypes); mFilterTypeCtl = S.Id(ID_Type).AddChoice(_("&Filter Type:"), wxT(""), &typeChoices); mFilterTypeCtl->SetValidator(wxGenericValidator(&mFilterType)); S.SetSizeHints(-1, -1); wxArrayString orders; for (int i = 1; i <= 10; i++) { orders.Add(wxString::Format(wxT("%d"), i)); } /*i18n-hint: 'Order' means the complexity of the filter, and is a number between 1 and 10.*/ mFilterOrderCtl = S.Id(ID_Order).AddChoice(_("O&rder:"), wxT(""), &orders); mFilterOrderCtl->SetValidator(wxGenericValidator(&mOrderIndex)); S.SetSizeHints(-1, -1); S.AddSpace(1, 1); FloatingPointValidator<float> vldRipple(1, &mRipple); vldRipple.SetRange(MIN_Passband, MAX_Passband); mRippleCtlP = S.AddVariableText(_("&Passband Ripple:"), false, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); mRippleCtl = S.Id(ID_Ripple).AddTextBox( {}, wxT(""), 10); mRippleCtl->SetName(_("Passband Ripple (dB)")); mRippleCtl->SetValidator(vldRipple); mRippleCtlU = S.AddVariableText(_("dB"), false, wxALL | wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); wxASSERT(nSubTypes == WXSIZEOF(kSubTypeStrings)); auto subTypeChoices = LocalizedStrings(kSubTypeStrings, nSubTypes); mFilterSubTypeCtl = S.Id(ID_SubType).AddChoice(_("&Subtype:"), wxT(""), &subTypeChoices); mFilterSubTypeCtl->SetValidator(wxGenericValidator(&mFilterSubtype)); S.SetSizeHints(-1, -1); FloatingPointValidator<float> vldCutoff(1, &mCutoff); vldCutoff.SetRange(MIN_Cutoff, mNyquist - 1); mCutoffCtl = S.Id(ID_Cutoff).AddTextBox(_("C&utoff:"), wxT(""), 10); mCutoffCtl->SetName(_("Cutoff (Hz)")); mCutoffCtl->SetValidator(vldCutoff); S.AddUnits(_("Hz")); FloatingPointValidator<float> vldStopbandRipple(1, &mStopbandRipple); vldStopbandRipple.SetRange(MIN_Stopband, MAX_Stopband); mStopbandRippleCtlP = S.AddVariableText(_("Minimum S&topband Attenuation:"), false, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); mStopbandRippleCtl = S.Id(ID_StopbandRipple).AddTextBox( {}, wxT(""), 10); mStopbandRippleCtl->SetName(_("Minimum S&topband Attenuation (dB)")); mStopbandRippleCtl->SetValidator(vldStopbandRipple); mStopbandRippleCtlU = S.AddVariableText(_("dB"), false, wxALL | wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); } S.EndMultiColumn(); S.AddSpace(1, 1); } S.EndMultiColumn(); mFilterTypeCtl->SetFocus(); return; }
void EffectTruncSilence::PopulateOrExchange(ShuttleGui & S) { wxASSERT(nActions == WXSIZEOF(kActionStrings)); S.AddSpace(0, 5); S.StartStatic(_("Detect Silence")); { S.StartMultiColumn(3, wxALIGN_CENTER_HORIZONTAL); { // Threshold FloatingPointValidator<double> vldThreshold(3, &mThresholdDB, NumValidatorStyle::NO_TRAILING_ZEROES); vldThreshold.SetRange(MIN_Threshold, MAX_Threshold); mThresholdText = S.AddTextBox(_("Threshold:"), wxT(""), 0); mThresholdText->SetValidator(vldThreshold); S.AddUnits(_("dB")); // Ignored silence FloatingPointValidator<double> vldDur(3, &mInitialAllowedSilence, NumValidatorStyle::NO_TRAILING_ZEROES); vldDur.SetRange(MIN_Minimum, MAX_Minimum); mInitialAllowedSilenceT = S.AddTextBox(_("Duration:"), wxT(""), 12); mInitialAllowedSilenceT->SetValidator(vldDur); S.AddUnits(_("seconds")); } S.EndMultiColumn(); } S.EndStatic(); S.StartStatic(_("Action")); { S.StartHorizontalLay(); { // Action choices auto actionChoices = LocalizedStrings(kActionStrings, nActions); mActionChoice = S.AddChoice( {}, wxT(""), &actionChoices); mActionChoice->SetValidator(wxGenericValidator(&mActionIndex)); S.SetSizeHints(-1, -1); } S.EndHorizontalLay(); S.StartMultiColumn(3, wxALIGN_CENTER_HORIZONTAL); { // Truncation / Compression factor FloatingPointValidator<double> vldTrunc(3, &mTruncLongestAllowedSilence, NumValidatorStyle::NO_TRAILING_ZEROES); vldTrunc.SetRange(MIN_Truncate, MAX_Truncate); mTruncLongestAllowedSilenceT = S.AddTextBox(_("Truncate to:"), wxT(""), 12); mTruncLongestAllowedSilenceT->SetValidator(vldTrunc); S.AddUnits(_("seconds")); FloatingPointValidator<double> vldComp(3, &mSilenceCompressPercent, NumValidatorStyle::NO_TRAILING_ZEROES); vldComp.SetRange(MIN_Compress, MAX_Compress); mSilenceCompressPercentT = S.AddTextBox(_("Compress to:"), wxT(""), 12); mSilenceCompressPercentT->SetValidator(vldComp); S.AddUnits(_("%")); } S.EndMultiColumn(); S.StartMultiColumn(2, wxALIGN_CENTER_HORIZONTAL); { mIndependent = S.AddCheckBox(_("Truncate tracks independently"), mbIndependent ? wxT("true") : wxT("false")); } S.EndMultiColumn(); } S.EndStatic(); UpdateUI(); }