void GUIPrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); S.StartStatic(_("Display")); { S.TieCheckBox(_("&Ergonomic order of Transport Toolbar buttons"), wxT("/GUI/ErgonomicTransportButtons"), true); S.TieCheckBox(_("S&how 'How to Get Help' dialog box at program start up"), wxT("/GUI/ShowSplashScreen"), true); S.AddSpace(10); S.StartMultiColumn(2); { const wxString defaultRange = wxString::Format(wxT("%d"), ENV_DB_RANGE); S.TieChoice(_("Meter dB &range:"), ENV_DB_KEY, defaultRange, mRangeChoices, mRangeCodes); S.SetSizeHints(mRangeChoices); S.TieChoice(_("&Language:"), wxT("/Locale/Language"), wxT(""), mLangNames, mLangCodes); S.SetSizeHints(mLangNames); S.TieChoice(_("Location of &Manual:"), wxT("/GUI/Help"), wxT("Local"), mHtmlHelpChoices, mHtmlHelpCodes); S.SetSizeHints(mHtmlHelpChoices); } S.EndMultiColumn(); } S.EndStatic(); S.StartStatic(_("Behaviors")); { S.TieCheckBox(_("&Beep on completion of longer activities"), wxT("/GUI/BeepOnCompletion"), false); S.TieCheckBox(_("Re&tain labels if selection snaps to a label edge"), wxT("/GUI/RetainLabels"), false); #ifdef EXPERIMENTAL_OUTPUT_DISPLAY S.TieCheckBox(_("&Display a mono channel as virtual stereo"), wxT("/GUI/MonoAsVirtualStereo"), false); #endif } S.EndStatic(); }
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 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(); }
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 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(); }
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; }
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(wxT("")); { S.AddFixedText(_("These are experimental modules. Enable them only if you've read the Audacity Manual\nand know what you are doing.") ); S.AddFixedText(wxString(wxT(" ")) + _("'Ask' means Audacity will ask if you want to load the module each time it starts.") ); S.AddFixedText(wxString(wxT(" ")) + _("'Failed' means Audacity thinks the module is broken and won't run it.") ); S.AddFixedText(wxString(wxT(" ")) + _("'New' means no choice has been made yet.") ); S.AddFixedText(_("Changes to these settings only take effect when Audacity starts up.")); S.StartScroller(); { S.StartMultiColumn( 2 ); int i; for(i=0;i<(int)mModules.GetCount();i++) S.TieChoice( mModules[i], mStatuses[i], &StatusChoices ); S.EndMultiColumn(); } if( mModules.GetCount() < 1 ) { S.AddFixedText( _("No modules were found") ); } S.EndScroller(); } S.EndStatic(); }
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 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(); }
/// 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(); }
/// 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 TracksBehaviorsPrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); S.StartScroller(); S.StartStatic(_("Behaviors")); { S.TieCheckBox(_("A&uto-select, if selection required"), wxT("/GUI/SelectAllOnNone"), false); /* i18n-hint: Cut-lines are lines that can expand to show the cut audio.*/ S.TieCheckBox(_("Enable cut &lines"), wxT("/GUI/EnableCutLines"), false); S.TieCheckBox(_("Enable &dragging selection edges"), wxT("/GUI/AdjustSelectionEdges"), true); S.TieCheckBox(_("Editing a clip can &move other clips"), wxT("/GUI/EditClipCanMove"), true); S.TieCheckBox(_("\"Move track focus\" c&ycles repeatedly through tracks"), wxT("/GUI/CircularTrackNavigation"), false); S.TieCheckBox(_("&Type to create a label"), wxT("/GUI/TypeToCreateLabel"), true); S.TieCheckBox(_("Use dialog for the &name of a new label"), wxT("/GUI/DialogForNameNewLabel"), false); #ifdef EXPERIMENTAL_SCROLLING_LIMITS S.TieCheckBox(_("Enable scrolling left of &zero"), ScrollingPreferenceKey(), ScrollingPreferenceDefault()); #endif S.TieCheckBox(_("Advanced &vertical zooming"), wxT("/GUI/VerticalZooming"), false); S.AddSpace(10); S.StartMultiColumn(2); { S.TieChoice(_("Solo &Button:"), wxT("/GUI/Solo"), wxT("Standard"), mSoloChoices, mSoloCodes); } S.EndMultiColumn(); } S.EndStatic(); S.EndScroller(); }
/// Create the dialog contents, or exchange data with it. void SmartRecordPrefs::PopulateOrExchange( ShuttleGui & S) { S.StartStatic( _("Pause Recording on Silence") ); { S.TieCheckBox( _("Pause Recording on Silence"), wxT("/AudioIO/PauseRecOnSilence"),false); S.StartMultiColumn(2, wxEXPAND); S.SetStretchyCol(1); S.TieSlider(_("Silence level (dB):"), wxT("/AudioIO/SilenceLevel"), -50, 0, -60); S.EndMultiColumn(); } S.EndStatic(); }
/// 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); }
/// Defines the dialog and does data exchange with it. void BatchPrefs::PopulateOrExchange( ShuttleGui & S ) { S.StartHorizontalLay( wxEXPAND, 0 ); S.SetBorder( 2 ); S.StartStatic( _("Behaviors"),1 ); { #ifdef __WXDEBUG__ S.TieCheckBox( _("&Don't apply effects in batch mode"), wxT("/Batch/Debug"), false); #endif } S.EndStatic(); S.EndHorizontalLay(); return; }
void ExportFFmpegAACOptions::PopulateOrExchange(ShuttleGui & S) { S.StartStatic(_("AAC Export Setup"), 1); { S.TieSlider(wxT("Quality:"),wxT("/FileFormats/AACQuality"),100,500,10); } S.EndStatic(); S.AddStandardButtons(); Layout(); Fit(); SetMinSize(GetSize()); Center(); return; }
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 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 ProjectsPrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); S.StartStatic(_("When saving a project that depends on other audio files")); { S.StartRadioButtonGroup(wxT("/FileFormats/SaveProjectWithDependencies"), wxT("ask")); { S.TieRadioButton(_("&Always copy all audio into project (safest)"), wxT("copy")); S.TieRadioButton(_("Do ¬ copy any audio"), wxT("never")); S.TieRadioButton(_("As&k user"), wxT("ask")); } S.EndRadioButtonGroup(); } S.EndStatic(); }
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(); }
void ModulePrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); S.StartStatic(_("Enable these Modules (if present), next time Audacity is started")); { S.AddFixedText(_("These are experimental. Enable them only if you've read the manual\nand know what you are doing.") ); S.TieCheckBox(_("mod-&script-pipe"), wxT("/Module/mod-script-pipe"), false); S.TieCheckBox(_("mod-&nyq-bench"), wxT("/Module/mod-nyq-bench"), false); S.TieCheckBox(_("mod-&track-panel"), wxT("/Module/mod-track-panel"), false); } S.EndStatic(); }
/// 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; }
void WarningsPrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); S.StartStatic(_("Show Warnings/Prompts")); { S.TieCheckBox(_("When saving &projects"), wxT("/Warnings/FirstProjectSave"), true); S.TieCheckBox(_("When saving &empty project"), wxT("/GUI/EmptyCanBeDirty"), true); S.TieCheckBox(_("When &disk space is getting low"), wxT("/Warnings/DiskSpaceWarning"), true); S.TieCheckBox(_("When mixing down to &stereo during export"), wxT("/Warnings/MixStereo"), true); S.TieCheckBox(_("When mixing down to &mono during export"), wxT("/Warnings/MixMono"), true); } S.EndStatic(); }
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 EffectTruncSilence::PopulateOrExchange(ShuttleGui & S) { wxASSERT(kNumActions == WXSIZEOF(kActionStrings)); wxArrayString actionChoices; for (int i = 0; i < kNumActions; i++) { actionChoices.Add(wxGetTranslation(kActionStrings[i])); } S.AddSpace(0, 5); S.StartStatic(_("Detect Silence")); { S.StartMultiColumn(3, wxALIGN_CENTER_HORIZONTAL); { // Threshold mTruncDbChoice = S.AddChoice(_("Level:"), wxT(""), &mDbChoices); mTruncDbChoice->SetValidator(wxGenericValidator(&mTruncDbChoiceIndex)); S.SetSizeHints(-1, -1); S.AddSpace(0); // 'choices' already includes units. // Ignored silence FloatingPointValidator<double> vldDur(3, &mInitialAllowedSilence, NUM_VAL_NO_TRAILING_ZEROES); vldDur.SetRange(MIN_Minimum, MAX_Minimum); mInitialAllowedSilenceT = S.AddTextBox(_("Duration:"), wxT(""), 12); mInitialAllowedSilenceT->SetValidator(vldDur); S.AddUnits(wxT("seconds")); } S.EndMultiColumn(); } S.EndStatic(); S.StartStatic(_("Action")); { S.StartHorizontalLay(); { // Action choices mActionChoice = S.AddChoice(wxT(""), 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, NUM_VAL_NO_TRAILING_ZEROES); vldTrunc.SetRange(MIN_Truncate, MAX_Truncate); mTruncLongestAllowedSilenceT = S.AddTextBox(_("Truncate to:"), wxT(""), 12); mTruncLongestAllowedSilenceT->SetValidator(vldTrunc); S.AddUnits(wxT("seconds")); FloatingPointValidator<double> vldComp(3, &mSilenceCompressPercent, NUM_VAL_NO_TRAILING_ZEROES); vldComp.SetRange(MIN_Compress, MAX_Compress); mSilenceCompressPercentT = S.AddTextBox(_("Compress to:"), wxT(""), 12); mSilenceCompressPercentT->SetValidator(vldComp); S.AddUnits(wxT("percent")); } S.EndMultiColumn(); S.StartMultiColumn(2, wxALIGN_CENTER_HORIZONTAL); { mIndependent = S.AddCheckBox(_("Truncate tracks independently"), mbIndependent ? wxT("true") : wxT("false")); } S.EndMultiColumn(); } S.EndStatic(); UpdateUI(); }
void EffectsPrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); S.StartScroller(); S.StartStatic(_("Enable Effects")); { #if USE_AUDIO_UNITS S.TieCheckBox(_("Audio Unit"), wxT("/AudioUnit/Enable"), true); #endif // JKC: LADSPA, LV2, Nyquist, VST, VAMP should not be translated. #if USE_LADSPA S.TieCheckBox(wxT("&LADSPA"), wxT("/Ladspa/Enable"), true); #endif #if USE_LV2 S.TieCheckBox(wxT("LV&2"), wxT("/LV2/Enable"), true); #endif #if USE_NYQUIST S.TieCheckBox(wxT("N&yquist"), wxT("/Nyquist/Enable"), true); #endif #if USE_VAMP S.TieCheckBox(wxT("&Vamp"), wxT("/VAMP/Enable"), true); #endif #if USE_VST S.TieCheckBox(wxT("V&ST"), wxT("/VST/Enable"), true); #endif } S.EndStatic(); S.StartStatic(_("Effect Options")); { S.StartMultiColumn(2); { wxArrayString visualgroups; wxArrayString prefsgroups; visualgroups.Add(_("Sorted by Effect Name")); visualgroups.Add(_("Sorted by Publisher and Effect Name")); visualgroups.Add(_("Sorted by Type and Effect Name")); visualgroups.Add(_("Grouped by Publisher")); visualgroups.Add(_("Grouped by Type")); prefsgroups.Add(wxT("sortby:name")); prefsgroups.Add(wxT("sortby:publisher:name")); prefsgroups.Add(wxT("sortby:type:name")); prefsgroups.Add(wxT("groupby:publisher")); prefsgroups.Add(wxT("groupby:type")); wxChoice *c = S.TieChoice(_("S&ort or Group:"), wxT("/Effects/GroupBy"), wxT("name"), visualgroups, prefsgroups); c->SetMinSize(c->GetBestSize()); S.TieNumericTextBox(_("&Maximum effects per group (0 to disable):"), wxT("/Effects/MaxPerGroup"), #if defined(__WXGTK__) 15, #else 0, #endif 5); } S.EndMultiColumn(); } S.EndStatic(); #ifndef EXPERIMENTAL_EFFECT_MANAGEMENT S.StartStatic(_("Plugin Options")); { S.TieCheckBox(_("Check for updated plugins when Audacity starts"), wxT("/Plugins/CheckForUpdates"), true); S.TieCheckBox(_("Rescan plugins next time Audacity is started"), wxT("/Plugins/Rescan"), false); } S.EndStatic(); #endif #ifdef EXPERIMENTAL_EQ_SSE_THREADED S.StartStatic(_("Instruction Set")); { S.TieCheckBox(_("&Use SSE/SSE2/.../AVX"), wxT("/SSE/GUI"), true); } S.EndStatic(); #endif S.EndScroller(); }
void TagsEditor::PopulateOrExchange(ShuttleGui & S) { S.StartVerticalLay(); { S.StartHorizontalLay(wxALIGN_LEFT, false); { S.AddUnits(_("Use arrow keys (or RETURN key after editing) to navigate fields.")); } S.EndHorizontalLay(); if (mGrid == NULL) { mGrid = new Grid(S.GetParent(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER); mStringRenderer = new wxGridCellStringRenderer; mComboEditor = new ComboEditor(wxArrayString(), true); mGrid->RegisterDataType(wxT("Combo"), mStringRenderer, mComboEditor); mGrid->SetColLabelSize(mGrid->GetDefaultRowSize()); wxArrayString cs(WXSIZEOF(names), names); // Build the initial (empty) grid mGrid->CreateGrid(0, 2); mGrid->SetRowLabelSize(0); mGrid->SetDefaultCellAlignment(wxALIGN_LEFT, wxALIGN_CENTER); mGrid->SetColLabelValue(0, _("Tag")); mGrid->SetColLabelValue(1, _("Value")); // Resize the name column and set default row height. wxComboBox tc(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, cs); mGrid->SetColSize(0, tc.GetSize().x); mGrid->SetColMinimalWidth(0, tc.GetSize().x); } S.Prop(true); S.AddWindow(mGrid, wxEXPAND | wxALL); S.StartMultiColumn(4, wxALIGN_CENTER); { S.Id(AddID).AddButton(_("&Add")); S.Id(RemoveID).AddButton(_("&Remove")); S.AddTitle(wxT(" ")); S.Id(ClearID).AddButton(_("Cl&ear")); } S.EndMultiColumn(); S.StartHorizontalLay(wxALIGN_CENTRE, false); { S.StartStatic(_("Genres")); { S.StartMultiColumn(4, wxALIGN_CENTER); { S.Id(EditID).AddButton(_("E&dit...")); S.Id(ResetID).AddButton(_("Rese&t...")); } S.EndMultiColumn(); } S.EndStatic(); S.StartStatic(_("Template")); { S.StartMultiColumn(4, wxALIGN_CENTER); { S.Id(LoadID).AddButton(_("&Load...")); S.Id(SaveID).AddButton(_("&Save...")); S.AddTitle(wxT(" ")); S.Id(SaveDefaultsID).AddButton(_("Set De&fault")); } S.EndMultiColumn(); } S.EndStatic(); } S.EndHorizontalLay(); } S.EndVerticalLay(); S.AddStandardButtons(eOkButton | eCancelButton); }
void QualityPrefs::PopulateOrExchange( ShuttleGui & S ) { S.SetBorder( 2 ); S.StartStatic(_("Sampling"),0 ); { S.StartTwoColumn(); S.AddPrompt( _("Default Sample Rate:") ); DefineSampleRateControl( S ); // A tricky control. S.TieChoice(_("Default Sample Format:"), wxT("/SamplingRate/DefaultProjectSampleFormat"), floatSample, mmSampleFormatNames, mmSampleFormatLabels ); // JKC For the old style of layout, uncomment the next line. // #define OLD_STYLE_LAYOUT // Once we've chosen which layout to use we'll remove the // other one. (June/2006). #ifdef OLD_STYLE_LAYOUT S.TieChoice(_("Real-time sample rate converter:"), wxT("/Quality/LibresampleSampleRateConverter"), (int)0, mConverterNames, mConverterLabels), S.TieChoice(_("High-quality sample rate converter:"), wxT("/Quality/LibresampleHQSampleRateConverter"), (int)1, mConverterNames, mConverterLabels), S.TieChoice(_("Real-time dither:"), wxT("/Quality/DitherAlgorithm"), Dither::none, mmDitherNames, mmDitherLabels ); S.TieChoice(_("High-quality dither:"), wxT("/Quality/HQDitherAlgorithm"), Dither::shaped, mmDitherNames, mmDitherLabels ); #endif S.EndTwoColumn(); } S.EndStatic(); // The new style of layout has // - columns for converter and dither. // - rows for Real-time and High-quality. #ifndef OLD_STYLE_LAYOUT S.StartStatic( _("Conversion") ); { // We use blank labels here and there to end up with // a three column layout. S.StartMultiColumn(3); S.AddFixedText(wxT("")); S.AddTitle(_("Sample Rate Converter" )); S.AddTitle(_("Dither")); S.TieChoice(_("Real-time:"), wxT("/Quality/LibresampleSampleRateConverter"), (int)0, mConverterNames, mConverterLabels), S.TieChoice(wxT(""), wxT("/Quality/DitherAlgorithm"), Dither::none, mmDitherNames, mmDitherLabels ); S.TieChoice(_("High-quality:"), wxT("/Quality/LibresampleHQSampleRateConverter"), (int)1, mConverterNames, mConverterLabels), S.TieChoice(wxT(""), wxT("/Quality/HQDitherAlgorithm"), Dither::shaped, mmDitherNames, mmDitherLabels ); S.EndMultiColumn(); } S.EndStatic(); #endif }
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 TagsEditor::PopulateOrExchange(ShuttleGui & S) { bool bShow; gPrefs->Read(wxT("/AudioFiles/ShowId3Dialog"), &bShow, true ); S.StartVerticalLay(); { S.StartHorizontalLay(wxALIGN_LEFT, 0); { S.AddUnits(_("Use arrow keys (or ENTER key after editing) to navigate fields.")); } S.EndHorizontalLay(); if (mGrid == NULL) { mGrid = safenew Grid(S.GetParent(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER); mGrid->RegisterDataType(wxT("Combo"), (mStringRenderer = safenew wxGridCellStringRenderer), (mComboEditor = safenew ComboEditor(wxArrayString(), true))); mGrid->SetColLabelSize(mGrid->GetDefaultRowSize()); auto cs = names(); // Build the initial (empty) grid mGrid->CreateGrid(0, 2); mGrid->SetRowLabelSize(0); mGrid->SetDefaultCellAlignment(wxALIGN_LEFT, wxALIGN_CENTER); mGrid->SetColLabelValue(0, _("Tag")); mGrid->SetColLabelValue(1, _("Value")); // Resize the name column and set default row height. wxComboBox tc(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, cs); mGrid->SetColSize(0, tc.GetSize().x); mGrid->SetColMinimalWidth(0, tc.GetSize().x); } S.Prop(1); S.AddWindow(mGrid, wxEXPAND | wxALL); S.StartMultiColumn(4, wxALIGN_CENTER); { S.Id(AddID).AddButton(_("&Add")); S.Id(RemoveID).AddButton(_("&Remove")); S.AddTitle( {} ); S.Id(ClearID).AddButton(_("Cl&ear")); } S.EndMultiColumn(); S.StartHorizontalLay(wxALIGN_CENTRE, 0); { S.StartStatic(_("Genres")); { S.StartMultiColumn(4, wxALIGN_CENTER); { S.Id(EditID).AddButton(_("E&dit...")); S.Id(ResetID).AddButton(_("Rese&t...")); } S.EndMultiColumn(); } S.EndStatic(); S.StartStatic(_("Template")); { S.StartMultiColumn(4, wxALIGN_CENTER); { S.Id(LoadID).AddButton(_("&Load...")); S.Id(SaveID).AddButton(_("&Save...")); S.AddTitle( {} ); S.Id(SaveDefaultsID).AddButton(_("Set De&fault")); } S.EndMultiColumn(); } S.EndStatic(); } S.EndHorizontalLay(); S.StartHorizontalLay(wxALIGN_LEFT, 0); { S.Id( DontShowID ).AddCheckBox( _("Don't show this when exporting audio"), !bShow ); } S.EndHorizontalLay(); } S.EndVerticalLay(); S.AddStandardButtons(eOkButton | eCancelButton | eHelpButton); }