本文整理匯總了C++中ShuttleGui::AddSpace方法的典型用法代碼示例。如果您正苦於以下問題:C++ ShuttleGui::AddSpace方法的具體用法?C++ ShuttleGui::AddSpace怎麽用?C++ ShuttleGui::AddSpace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ShuttleGui
的用法示例。
在下文中一共展示了ShuttleGui::AddSpace方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: PopulateOrExchange
void TruncSilenceDialog::PopulateOrExchange(ShuttleGui & S)
{
S.AddSpace(0, 5);
S.StartHorizontalLay();
{
// Action choices
wxArrayString processChoices;
processChoices.Add(_("Truncate Detected Silence"));
processChoices.Add(_("Compress Excess Silence"));
S.Id(ID_PROCESS_CHOICE).TieChoice(wxT(""),
mEffect->mProcessIndex,
&processChoices);
S.SetSizeHints(-1, -1);
}
S.EndHorizontalLay();
S.StartStatic(_("Detect Silence"));
{
S.StartMultiColumn(3, wxALIGN_CENTER_HORIZONTAL);
{
// Threshold
wxArrayString choices(Enums::NumDbChoices, Enums::GetDbChoices());
S.TieChoice(_("Level:"),
mEffect->mTruncDbChoiceIndex,
&choices);
S.SetSizeHints(-1, -1);
S.AddSpace(0); // 'choices' aleady includes units.
// Ignored silence
S.Id(ID_DETECT_SILENCE).TieNumericTextBox(_("Duration:"),
mEffect->mInitialAllowedSilence,
12);
S.AddUnits(wxT("seconds"));
}
S.EndMultiColumn();
}
S.EndStatic();
S.StartMultiColumn(3, wxALIGN_CENTER_HORIZONTAL);
{
// Truncation / Compression factor
S.Id( ID_TRUNCATION_DURATION ).TieNumericTextBox(_("Truncate to:"),
mEffect->mTruncLongestAllowedSilence,
12);
S.AddUnits(wxT("seconds"));
S.Id( ID_COMPRESS_FACTOR ).TieNumericTextBox(_("Compress to:"),
mEffect->mSilenceCompressPercent,
12);
S.AddUnits(wxT("percent"));
}
S.EndMultiColumn();
// Warnings
pWarning = S.AddVariableText( wxT("") );
UpdateUI();
}
示例2: PopulateOrExchange
void EffectLeveller::PopulateOrExchange(ShuttleGui & S)
{
wxASSERT(kNumPasses == WXSIZEOF(kPassStrings));
wxArrayString passChoices;
for (int i = 0; i < kNumPasses; i++)
{
passChoices.Add(wxGetTranslation(kPassStrings[i]));
}
wxArrayString dBChoices(Enums::NumDbChoices,Enums::GetDbChoices());
S.SetBorder(5);
S.StartVerticalLay();
{
S.AddSpace(5);
S.StartMultiColumn(2, wxALIGN_CENTER);
{
S.AddChoice(_("Degree of Leveling:"),
wxT(""),
&passChoices)->SetValidator(wxGenericValidator(&mPassIndex));
S.AddChoice(_("Noise Threshold:"),
wxT(""),
&dBChoices)->SetValidator(wxGenericValidator(&mDbIndex));
}
S.EndMultiColumn();
}
S.EndVerticalLay();
return;
}
示例3: 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();
}
示例4: PopulateOrExchange
void EffectDtmf::PopulateOrExchange(ShuttleGui & S)
{
// dialog will be passed values from effect
// Effect retrieves values from saved config
// Dialog will take care of using them to initialize controls
// If there is a selection, use that duration, otherwise use
// value from saved config: this is useful is user wants to
// replace selection with dtmf sequence
S.AddSpace(0, 5);
S.StartMultiColumn(2, wxCENTER);
{
wxTextValidator vldDtmf(wxFILTER_INCLUDE_CHAR_LIST, &dtmfSequence);
vldDtmf.SetIncludes(wxArrayString(WXSIZEOF(kSymbols), kSymbols));
mDtmfSequenceT = S.Id(ID_Sequence).AddTextBox(_("DTMF sequence:"), wxT(""), 10);
mDtmfSequenceT->SetValidator(vldDtmf);
FloatingPointValidator<double> vldAmp(3, &dtmfAmplitude, NUM_VAL_NO_TRAILING_ZEROES);
vldAmp.SetRange(MIN_Amplitude, MAX_Amplitude);
S.Id(ID_Amplitude).AddTextBox(_("Amplitude (0-1):"), wxT(""), 10)->SetValidator(vldAmp);
S.AddPrompt(_("Duration:"));
mDtmfDurationT = safenew
NumericTextCtrl(NumericConverter::TIME,
S.GetParent(),
ID_Duration,
GetDurationFormat(),
GetDuration(),
mProjectRate,
wxDefaultPosition,
wxDefaultSize,
true);
mDtmfDurationT->SetName(_("Duration"));
mDtmfDurationT->EnableMenu();
S.AddWindow(mDtmfDurationT);
S.AddFixedText(_("Tone/silence ratio:"), false);
S.SetStyle(wxSL_HORIZONTAL | wxEXPAND);
mDtmfDutyCycleS = S.Id(ID_DutyCycle).AddSlider( {},
dtmfDutyCycle * SCL_DutyCycle,
MAX_DutyCycle * SCL_DutyCycle,
MIN_DutyCycle * SCL_DutyCycle);
S.SetSizeHints(-1,-1);
}
S.EndMultiColumn();
S.StartMultiColumn(2, wxCENTER);
{
S.AddFixedText(_("Duty cycle:"), false);
mDtmfDutyT = S.AddVariableText(wxString::Format(wxT("%.1f %%"), dtmfDutyCycle), false);
S.AddFixedText(_("Tone duration:"), false);
mDtmfSilenceT = S.AddVariableText(wxString::Format(wxString(wxT("%.0f ")) + _("ms"), dtmfTone * 1000.0), false);
S.AddFixedText(_("Silence duration:"), false);
mDtmfToneT = S.AddVariableText(wxString::Format(wxString(wxT("%0.f ")) + _("ms"), dtmfSilence * 1000.0), false);
}
S.EndMultiColumn();
}
示例5: PopulateOrExchange
void WahwahDialog::PopulateOrExchange(ShuttleGui & S)
{
wxTextValidator vld(wxFILTER_NUMERIC);
S.SetBorder(5);
S.AddSpace(0, 5);
S.StartMultiColumn(3, wxCENTER);
{
wxSlider *s;
wxTextCtrl * tempTC;
tempTC = S.Id(ID_FREQTEXT).AddTextBox(_("LFO Frequency (Hz):"), wxT(""), 12);
S.SetStyle(wxSL_HORIZONTAL);
tempTC->SetValidator(vld);
s = S.Id(ID_FREQSLIDER).AddSlider(wxT(""), 100, FREQ_MAX, FREQ_MIN);
s->SetName(_("LFO frequency in hertz"));
#if defined(__WXGTK__)
s->SetMinSize(wxSize(100, -1));
#endif
tempTC = S.Id(ID_PHASETEXT).AddTextBox(_("LFO Start Phase (deg.):"), wxT(""), 12);
S.SetStyle(wxSL_HORIZONTAL);
tempTC->SetValidator(vld);
s = S.Id(ID_PHASESLIDER).AddSlider(wxT(""), 0, PHASE_MAX, PHASE_MIN);
s->SetName(_("LFO start phase in degrees"));
s->SetLineSize(10);
#if defined(__WXGTK__)
s->SetMinSize(wxSize(100, -1));
#endif
tempTC = S.Id(ID_DEPTHTEXT).AddTextBox(_("Depth (%):"), wxT(""), 12);
S.SetStyle(wxSL_HORIZONTAL);
tempTC->SetValidator(vld);
s = S.Id(ID_DEPTHSLIDER).AddSlider(wxT(""), 0, DEPTH_MAX, DEPTH_MIN);
s->SetName(_("Depth in percent"));
#if defined(__WXGTK__)
s->SetMinSize(wxSize(100, -1));
#endif
tempTC = S.Id(ID_RESONANCETEXT).AddTextBox(_("Resonance:"), wxT(""), 12);
S.SetStyle(wxSL_HORIZONTAL);
tempTC->SetValidator(vld);
s = S.Id(ID_RESONANCESLIDER).AddSlider(wxT(""), 0, RES_MAX, RES_MIN);
s->SetName(_("Resonance"));
#if defined(__WXGTK__)
s->SetMinSize(wxSize(100, -1));
#endif
tempTC = S.Id(ID_FREQOFFTEXT).AddTextBox(_("Wah Frequency Offset (%):"), wxT(""), 12);
S.SetStyle(wxSL_HORIZONTAL);
tempTC->SetValidator(vld);
s =S.Id(ID_FREQOFFSLIDER).AddSlider(wxT(""), 0, FREQOFF_MAX, FREQOFF_MIN);
s->SetName(_("Wah frequency offset in percent"));
#if defined(__WXGTK__)
s->SetMinSize(wxSize(100, -1));
#endif
}
S.EndMultiColumn();
}
示例6: PopulateOrExchange
void DtmfDialog::PopulateOrExchange( ShuttleGui & S )
{
wxTextValidator vldDtmf(wxFILTER_INCLUDE_CHAR_LIST);
vldDtmf.SetIncludes(wxArrayString(42, dtmfSymbols));
S.AddSpace(0, 5);
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();
}
示例7: 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();
}
示例8: 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();
}
示例9: PopulateOrExchange
void SelectFrequenciesCommand::PopulateOrExchange(ShuttleGui & S)
{
S.AddSpace(0, 5);
S.StartMultiColumn(3, wxEXPAND);
{
S.SetStretchyCol( 2 );
S.Optional( bHasTop ).TieTextBox(_("High:"), mTop);
S.Optional( bHasBottom ).TieTextBox(_("Low:"), mBottom);
}
S.EndMultiColumn();
}
示例10: PopulateOrExchange
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();
}
示例11: PopulateOrExchange
void ChangeSpeedDialog::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(5);
S.AddSpace(0, 5);
S.AddTitle(_("Change Speed, affecting both Tempo and Pitch"));
//
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();
}
示例12: PopulateOrExchange
void AmplifyDialog::PopulateOrExchange(ShuttleGui & S)
{
wxTextValidator vld(wxFILTER_NUMERIC);
S.AddSpace(0, 5);
// Amplitude
S.StartMultiColumn(2, wxCENTER);
{
mAmpT = S.Id(ID_AMP_TEXT).AddTextBox(_("Amplification (dB):"),
wxT(""),
12);
mAmpT->SetValidator(vld);
}
S.EndMultiColumn();
// Amplitude
S.StartHorizontalLay(wxEXPAND);
{
S.SetStyle(wxSL_HORIZONTAL);
mAmpS = S.Id(ID_AMP_SLIDER).AddSlider(wxT(""),
0,
AMP_MAX,
AMP_MIN);
mAmpS->SetName(_("Amplification dB"));
}
S.EndHorizontalLay();
// Peek
S.StartMultiColumn(2, wxCENTER);
{
mPeakT = S.Id(ID_PEAK_TEXT).AddTextBox(_("New Peak Amplitude (dB):"),
wxT(""),
12);
mPeakT->SetValidator(vld);
}
S.EndMultiColumn();
// Clipping
S.StartHorizontalLay(wxCENTER);
{
mClip = S.Id(ID_CLIP_CHECKBOX).AddCheckBox(_("Allow clipping"),
wxT("false"));
}
S.EndHorizontalLay();
return;
}
示例13: PopulateOrExchange
void SetTrackBase::PopulateOrExchange(ShuttleGui & S)
{
static_cast<void>(S);
#ifdef USE_OWN_TRACK_SELECTION
if( !mbPromptForTracks )
return;
S.AddSpace(0, 5);
S.StartMultiColumn(3, wxEXPAND);
{
S.SetStretchyCol( 2 );
S.Optional( bHasTrackIndex ).TieNumericTextBox( _("Track Index:"), mTrackIndex );
S.Optional( bHasChannelIndex).TieNumericTextBox( _("Channel Index:"), mChannelIndex );
}
S.EndMultiColumn();
#endif
}
示例14: PopulateOrExchange
void EffectEcho::PopulateOrExchange(ShuttleGui & S)
{
S.AddSpace(0, 5);
S.StartMultiColumn(2, wxALIGN_CENTER);
{
FloatingPointValidator<double> vldDelay(3, &delay, NUM_VAL_NO_TRAILING_ZEROES);
vldDelay.SetRange(MIN_Delay, MAX_Delay);
S.AddTextBox(_("Delay time (seconds):"), wxT(""), 10)->SetValidator(vldDelay);
FloatingPointValidator<double> vldDecay(3, &decay, NUM_VAL_NO_TRAILING_ZEROES);
vldDecay.SetRange(MIN_Decay, MAX_Decay);
S.AddTextBox(_("Decay factor:"), wxT(""), 10)->SetValidator(vldDecay);
}
S.EndMultiColumn();
}
示例15: PopulateOrExchange
void EchoDialog::PopulateOrExchange(ShuttleGui & S)
{
S.AddSpace(0, 5);
S.StartMultiColumn(2, wxALIGN_CENTER);
{
m_pTextCtrl_Delay = S.AddTextBox(_("Delay time (seconds):"),
wxT("1.0"),
10);
m_pTextCtrl_Delay->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
m_pTextCtrl_Decay = S.AddTextBox(_("Decay factor:"),
wxT("0.5"),
10);
m_pTextCtrl_Decay->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
}
S.EndMultiColumn();
}