本文整理汇总了C++中ShuttleGui::TieChoice方法的典型用法代码示例。如果您正苦于以下问题:C++ ShuttleGui::TieChoice方法的具体用法?C++ ShuttleGui::TieChoice怎么用?C++ ShuttleGui::TieChoice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShuttleGui
的用法示例。
在下文中一共展示了ShuttleGui::TieChoice方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PopulateOrExchange
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();
}
示例2: PopulateOrExchange
void ExportFFmpegWMAOptions::PopulateOrExchange(ShuttleGui & S)
{
S.StartHorizontalLay(wxEXPAND, 0);
{
S.StartStatic(_("WMA Export Setup"), 0);
{
S.StartTwoColumn();
{
S.TieChoice(_("Bit Rate:"), wxT("/FileFormats/WMABitRate"),
180189, mBitRateNames, mBitRateLabels);
}
S.EndTwoColumn();
}
S.EndStatic();
}
S.EndHorizontalLay();
S.AddStandardButtons();
Layout();
Fit();
SetMinSize(GetSize());
Center();
return;
}
示例3: PopulateOrExchange
void NoiseDialog::PopulateOrExchange( ShuttleGui & S )
{
S.StartMultiColumn(2, wxCENTER);
{
S.TieChoice(_("Noise type:"), nType, nTypeList);
S.TieNumericTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), nAmplitude, 10);
S.AddPrompt(_("Duration") + wxString(wxT(":")));
if (mNoiseDurationT == NULL)
{
mNoiseDurationT = new
NumericTextCtrl(NumericConverter::TIME, this,
wxID_ANY,
wxT(""),
nDuration,
mEffect->mProjectRate,
wxDefaultPosition,
wxDefaultSize,
true);
/* use this instead of "seconds" because if a selection is passed to
* the effect, I want it (nDuration) to be used as the duration, and
* with "seconds" this does not always work properly. For example,
* it rounds down to zero... */
mNoiseDurationT->SetName(_("Duration"));
mNoiseDurationT->SetFormatString(mNoiseDurationT->GetBuiltinFormat(nIsSelection==true?(_("hh:mm:ss + samples")):(_("hh:mm:ss + milliseconds"))));
mNoiseDurationT->EnableMenu();
}
S.AddWindow(mNoiseDurationT, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL);
}
S.EndMultiColumn();
}
示例4: 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("") );
}
示例5: PopulateOrExchange
void NoiseDialog::PopulateOrExchange( ShuttleGui & S )
{
S.StartMultiColumn(2, wxCENTER);
{
S.AddFixedText(_("Duration"), false);
if (mNoiseDurationT == NULL)
{
mNoiseDurationT = new
TimeTextCtrl(this,
wxID_ANY,
wxT(""),
nDuration,
44100,
wxDefaultPosition,
wxDefaultSize,
true);
/* use this instead of "seconds" because if a selection is passed to
* the effect, I want it (nDuration) to be used as the duration, and
* with "seconds" this does not always work properly. For example,
* it rounds down to zero... */
mNoiseDurationT->SetFormatString(mNoiseDurationT->GetBuiltinFormat(nIsSelection==true?(wxT("hh:mm:ss + samples")):(wxT("seconds"))));
mNoiseDurationT->EnableMenu();
}
S.AddWindow(mNoiseDurationT);
S.TieTextBox(_("Amplitude (0-1)"), nAmplitude, 10);
S.TieChoice(_("Noise type"), nType, nTypeList);
S.SetSizeHints(-1, -1);
}
S.EndMultiColumn();
}
示例6: PopulateOrExchange
void ModulePrefs::PopulateOrExchange(ShuttleGui & S)
{
wxArrayString StatusChoices;
StatusChoices.Add( _("Disabled" ) );
StatusChoices.Add( _("Enabled" ) );
StatusChoices.Add( _("Ask" ) );
StatusChoices.Add( _("Failed" ) );
StatusChoices.Add( _("New" ) );
S.SetBorder(2);
S.StartStatic(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();
}
示例7: 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();
}
示例8: PopulateOrExchange
void NoiseDialog::PopulateOrExchange( ShuttleGui & S )
{
S.StartMultiColumn(2, wxCENTER);
{
// 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.TieChoice(_("Noise type") + wxString(wxT(":")), nType, nTypeList);
S.TieTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), nAmplitude, 10);
S.AddPrompt(_("Duration") + wxString(wxT(":")));
if (mNoiseDurationT == NULL)
{
mNoiseDurationT = new
TimeTextCtrl(this,
wxID_ANY,
wxT(""),
nDuration,
mEffect->mProjectRate,
wxDefaultPosition,
wxDefaultSize,
true);
/* use this instead of "seconds" because if a selection is passed to
* the effect, I want it (nDuration) to be used as the duration, and
* with "seconds" this does not always work properly. For example,
* it rounds down to zero... */
mNoiseDurationT->SetName(_("Duration"));
mNoiseDurationT->SetFormatString(mNoiseDurationT->GetBuiltinFormat(nIsSelection==true?(_("hh:mm:ss + samples")):(_("seconds"))));
mNoiseDurationT->EnableMenu();
}
S.AddWindow(mNoiseDurationT, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL);
}
S.EndMultiColumn();
}
示例9: PopulateOrExchangeStandard
/// Populates simple dialog that has a single tone.
void ToneGenDialog::PopulateOrExchangeStandard( ShuttleGui & S )
{
S.StartMultiColumn(2, wxCENTER);
{
S.TieChoice(_("Waveform") + wxString(wxT(":")), waveform, waveforms);
S.SetSizeHints(-1, -1);
// The added colon to improve visual consistency was placed outside
// the translatable strings to avoid breaking translations close to 2.0.
// TODO: Make colon part of the translatable string after 2.0.
S.TieNumericTextBox(_("Frequency (Hz)") + wxString(wxT(":")), frequency[0], 5);
S.TieNumericTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), amplitude[0], 5);
S.AddPrompt(_("Duration") + wxString(wxT(":")));
if (mToneDurationT == NULL)
{
mToneDurationT = new
TimeTextCtrl(this,
wxID_ANY,
wxT(""),
mDuration,
mEffect->mProjectRate,
wxDefaultPosition,
wxDefaultSize,
true);
mToneDurationT->SetName(_("Duration"));
mToneDurationT->SetFormatString(mToneDurationT->GetBuiltinFormat(isSelection==true?(_("hh:mm:ss + samples")):(_("seconds"))));
mToneDurationT->EnableMenu();
}
S.AddWindow(mToneDurationT);
}
S.EndMultiColumn();
}
示例10: DefineSampleRateControl
/// Add a compound control made up from a choice and an edit
/// box.
void QualityPrefs::DefineSampleRateControl( ShuttleGui & S )
{
// We use a sizer within a sizer to get the effect we want.
// We also use the SetIfCreated idiom to get pointers to
// the controls, so that we can drive them from
// our own code.
S.SetBorder(2);
S.StartHorizontalLay(wxALIGN_LEFT );
// If the value in Prefs isn't in the list, then we want
// the last item, 'Other...' to be shown.
S.SetNoMatchSelector( mmSampleRateNames.GetCount()-1 );
// First the choice...
// We make sure it uses the ID we want, so that we get changes
S.Id( ID_SAMPLE_RATE_CHOICE );
// We make sure we have a pointer to it, so that we can drive it.
mSampleRates = S.TieChoice( wxT(""),
wxT("/SamplingRate/DefaultProjectSampleRate"),
AudioIO::GetOptimalSupportedSampleRate(),
mmSampleRateNames, mmSampleRateLabels );
// Now do the edit box...
mOtherSampleRate = S.TieTextBox(wxT(""),
mOtherSampleRateValue, 9);
S.EndHorizontalLay();
}
示例11: PopulateOrExchangeExtended
/// Populates more complex dialog that has a chirp.
void ToneGenDialog::PopulateOrExchangeExtended( ShuttleGui & S )
{
S.StartMultiColumn(2, wxCENTER);
{
S.TieChoice( _("Waveform:"), waveform, waveforms);
S.SetSizeHints(-1,-1);
}
S.EndMultiColumn();
S.StartMultiColumn(3, wxCENTER);
{
S.AddFixedText(wxT(""));
S.AddTitle( _("Start"));
S.AddTitle( _("End") );
S.TieTextBox( _("Frequency / Hz"),frequency[0], 10);
S.TieTextBox( wxT(""),frequency[1], 10);
S.TieTextBox( _("Amplitude (0-1)"),amplitude[0], 10);
S.TieTextBox( wxT(""),amplitude[1], 10);
}
S.EndMultiColumn();
S.StartMultiColumn(2, wxCENTER);
{
S.TieTextBox( _("Length (seconds)"),length, 10 );
}
S.EndMultiColumn();
}
示例12: PopulateOrExchange
void ModulePrefs::PopulateOrExchange(ShuttleGui & S)
{
wxArrayString StatusChoices;
StatusChoices.Add( _("Disabled" ) );
StatusChoices.Add( _("Enabled" ) );
StatusChoices.Add( _("Ask" ) );
StatusChoices.Add( _("Failed" ) );
StatusChoices.Add( _("New" ) );
S.SetBorder(2);
S.StartStatic(_(""));
{
S.AddFixedText(_("These are experimental Modules. Enable them only if you've read the manual\nand know what you are doing.") );
S.AddFixedText(wxString(wxT(" ")) + _("'Ask' means Audacity will ask if you want to load the plug-each time it starts.") );
S.AddFixedText(wxString(wxT(" ")) + _("'Failed' means Audacity thinks the plug-in is broken and won't run it.") );
S.AddFixedText(wxString(wxT(" ")) + _("'New' is like 'Ask', but asks just once.") );
S.StartMultiColumn( 2 );
int i;
for(i=0;i<(int)mModules.GetCount();i++)
S.TieChoice( mModules[i], mStatuses[i], &StatusChoices );
S.EndMultiColumn();
lse);
}
S.EndStatic();
}
示例13: 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();
}
示例14: PopulateOrExchange
void GetTrackInfoCommand::PopulateOrExchange(ShuttleGui & S)
{
wxArrayString types( nTypes, kTypes );
S.AddSpace(0, 5);
S.StartMultiColumn(2, wxALIGN_CENTER);
{
S.TieChoice( _("Types:"), mInfoType, &types);
}
S.EndMultiColumn();
}
示例15: PopulateOrExchange
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();
}