本文整理匯總了C++中ShuttleGui::StartMultiColumn方法的典型用法代碼示例。如果您正苦於以下問題:C++ ShuttleGui::StartMultiColumn方法的具體用法?C++ ShuttleGui::StartMultiColumn怎麽用?C++ ShuttleGui::StartMultiColumn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ShuttleGui
的用法示例。
在下文中一共展示了ShuttleGui::StartMultiColumn方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: 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();
}
示例2: PopulateOrExchange
void EchoDialog::PopulateOrExchange(ShuttleGui & S)
{
S.StartHorizontalLay(wxCENTER, false);
{
/* i18n-hint: && in here is an escape character to get a single & on
* screen, so keep it as is */
S.AddTitle(_("by Dominic Mazzoni && Vaughan Johnson"));
}
S.EndHorizontalLay();
S.StartHorizontalLay(wxCENTER, false);
{
// Add a little space
}
S.EndHorizontalLay();
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();
}
示例3: PopulateOrExchange
void NoiseDialog::PopulateOrExchange( ShuttleGui & S )
{
S.StartMultiColumn(2, wxCENTER);
{
S.TieChoice(_("Noise type"), nType, nTypeList);
S.TieTextBox(_("Amplitude (0-1)"), nAmplitude, 10);
S.AddPrompt(_("Duration"));
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, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL);
S.SetSizeHints(-1, -1);
}
S.EndMultiColumn();
}
示例4: 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();
}
示例5: PopulateOrExchange
void FindClippingDialog::PopulateOrExchange(ShuttleGui & S)
{
S.StartHorizontalLay(wxCENTER, false);
{
S.AddTitle(_("by Leland Lucius"));
}
S.EndHorizontalLay();
S.StartHorizontalLay(wxCENTER, false);
{
// Add a little space
}
S.EndHorizontalLay();
S.StartMultiColumn(2, wxALIGN_CENTER);
{
S.TieTextBox(_("Start threshold (samples):"),
mEffect->mStart,
10)->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
S.TieTextBox(_("Stop threshold (samples):"),
mEffect->mStop,
10)->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
}
S.EndMultiColumn();
}
示例6: PopulateOrExchange
void NoiseDialog::PopulateOrExchange( ShuttleGui & S )
{
S.StartMultiColumn(2, wxCENTER);
{
S.AddFixedText(_("Noise duration"), false);
mNoiseDurationT = new
TimeTextCtrl(this,
ID_NOISE_DURATION_TEXT,
/*
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...
*/
TimeTextCtrl::GetBuiltinFormat(nIsSelection==true?(wxT("hh:mm:ss + samples")):(wxT("seconds"))),
nDuration,
44100,
wxDefaultPosition,
wxDefaultSize,
true);
S.AddWindow(mNoiseDurationT);
mNoiseDurationT->EnableMenu();
S.TieTextBox( _("Amplitude"), nAmplitude, 10);
S.TieChoice( _("Noise type:"), nType, nTypeList);
S.SetSizeHints(-1,-1);
}
S.EndMultiColumn();
}
示例7: PopulateOrExchange
void EffectNoise::PopulateOrExchange(ShuttleGui & S)
{
wxASSERT(kNumTypes == WXSIZEOF(kTypeStrings));
wxArrayString typeChoices;
for (int i = 0; i < kNumTypes; i++)
{
typeChoices.Add(wxGetTranslation(kTypeStrings[i]));
}
S.StartMultiColumn(2, wxCENTER);
{
S.AddChoice(_("Noise type:"), wxT(""), &typeChoices)->SetValidator(wxGenericValidator(&mType));
FloatingPointValidator<double> vldAmp(6, &mAmp, NUM_VAL_NO_TRAILING_ZEROES);
vldAmp.SetRange(MIN_Amp, MAX_Amp);
S.AddTextBox(_("Amplitude (0-1):"), wxT(""), 12)->SetValidator(vldAmp);
S.AddPrompt(_("Duration:"));
mNoiseDurationT = new
NumericTextCtrl(NumericConverter::TIME,
S.GetParent(),
wxID_ANY,
GetDurationFormat(),
GetDuration(),
mProjectRate,
wxDefaultPosition,
wxDefaultSize,
true);
mNoiseDurationT->SetName(_("Duration"));
mNoiseDurationT->EnableMenu();
S.AddWindow(mNoiseDurationT, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL);
}
S.EndMultiColumn();
}
示例8: 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();
}
示例9: 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();
}
示例10: PopulateOrExchange
void SetTrackStatusCommand::PopulateOrExchange(ShuttleGui & S)
{
SetTrackBase::PopulateOrExchange( S );
S.StartMultiColumn(3, wxEXPAND);
{
S.SetStretchyCol( 2 );
S.Optional( bHasTrackName ).TieTextBox( _("Name:"), mTrackName );
}
S.EndMultiColumn();
S.StartMultiColumn(2, wxEXPAND);
{
S.SetStretchyCol( 1 );
S.Optional( bHasSelected ).TieCheckBox( _("Selected"), bSelected );
S.Optional( bHasFocused ).TieCheckBox( _("Focused"), bFocused);
}
S.EndMultiColumn();
}
示例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"));
// 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], 10)->SetName(_("Frequency Hertz Start"));
S.TieNumericTextBox(wxT(""), frequency[1], 10)->SetName(_("Frequency Hertz End"));
S.TieNumericTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), amplitude[0], 10)->SetName(_("Amplitude Start"));
S.TieNumericTextBox(wxT(""), amplitude[1], 10)->SetName(_("Amplitude End"));
}
S.EndMultiColumn();
S.StartMultiColumn(2, wxCENTER);
{
S.TieChoice(_("Interpolation:"), interpolation, interpolations);
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();
}
示例12: PopulateOrExchange
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;
}
示例13: PopulateOrExchange
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();
}
示例14: PopulateOrExchange
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();
}
示例15: 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();
}