本文整理匯總了C++中ShuttleGui::StartScroller方法的典型用法代碼示例。如果您正苦於以下問題:C++ ShuttleGui::StartScroller方法的具體用法?C++ ShuttleGui::StartScroller怎麽用?C++ ShuttleGui::StartScroller使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ShuttleGui
的用法示例。
在下文中一共展示了ShuttleGui::StartScroller方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: 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();
}
示例2: 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();
}
示例3: PopulateOrExchange
void ProjectsPrefs::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
S.StartScroller();
S.StartStatic(_("When saving a project that depends on other audio files"));
{
S.StartRadioButtonGroup(wxT("/FileFormats/SaveProjectWithDependencies"), wxT("ask"));
{
S.TieRadioButton(_("&Copy all audio into project (safest)"),
wxT("copy"));
S.TieRadioButton(_("Do ¬ copy any audio"),
wxT("never"));
S.TieRadioButton(_("As&k"),
wxT("ask"));
}
S.EndRadioButtonGroup();
}
S.EndStatic();
S.EndScroller();
}
示例4: PopulateOrExchange
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"));
//.........這裏部分代碼省略.........
示例5: PopulateOrExchange
void GUIPrefs::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
S.StartScroller();
S.StartStatic(_("Display"));
{
S.StartMultiColumn(2);
{
#ifdef EXPERIMENTAL_DA
const wxString defaultTheme = wxT("dark");
#else
const wxString defaultTheme = wxT("light");
#endif
const wxString defaultRange = wxString::Format(wxT("%d"), ENV_DB_RANGE);
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.TieChoice(_("Th&eme:"),
wxT("/GUI/Theme"),
defaultTheme,
mThemeChoices,
mThemeCodes);
S.SetSizeHints(mThemeChoices);
S.TieChoice(_("Meter dB &range:"),
ENV_DB_KEY,
defaultRange,
mRangeChoices,
mRangeCodes);
S.SetSizeHints(mRangeChoices);
}
S.EndMultiColumn();
// S.AddSpace(10);
// JKC: This is a silly preference. Kept here as a reminder that we may
// later want to have configurable button order.
// S.TieCheckBox(_("&Ergonomic order of Transport Toolbar buttons"),
// wxT("/GUI/ErgonomicTransportButtons"),
// true);
}
S.EndStatic();
S.StartStatic(_("Show"));
{
S.TieCheckBox(_("'How to Get &Help' at launch"),
wxT("/GUI/ShowSplashScreen"),
true);
S.TieCheckBox(_("E&xtra menus"),
wxT("/GUI/ShowExtraMenus"),
false);
#ifdef EXPERIMENTAL_THEME_PREFS
// We do not want to make this option mainstream. It's a
// convenience for developers.
S.TieCheckBox(_("Show alternative &styling (Mac vs PC)"),
wxT("/GUI/ShowMac"),
false);
#endif
}
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"),
wxT("/GUI/RetainLabels"),
false);
S.TieCheckBox(_("B&lend system and Audacity theme"),
wxT("/GUI/BlendThemes"),
true);
}
S.EndStatic();
S.EndScroller();
}
示例6: PopulateOrExchange
/// This PopulateOrExchange function is a good example of mixing the fully
/// automatic style of reading/writing from GUI to prefs with the partial form.
///
/// You'll notice that some of the Tie functions have Prefs identifiers in them
/// and others don't.
void LibraryPrefs::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
S.StartScroller();
S.StartStatic(_("MP3 Export Library"));
{
S.StartTwoColumn();
{
S.AddVariableText(_("MP3 Library Version:"),
true,
wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
mMP3Version = S.AddVariableText(wxT("9.99"),
true,
wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
S.AddVariableText(_("MP3 Library:"),
true,
wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
wxButton *locate_button = S.Id(ID_MP3_FIND_BUTTON).AddButton(_("&Locate..."),
wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
S.AddVariableText(_("LAME MP3 Library:"),
true,
wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
wxButton *download_button = S.Id(ID_MP3_DOWN_BUTTON).AddButton(_("&Download"),
wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
#ifdef DISABLE_DYNAMIC_LOADING_LAME
locate_button->Enable(FALSE);
download_button->Enable(FALSE);
#else
(void)locate_button;
(void)download_button;
#endif // DISABLE_DYNAMIC_LOADING_LAME
}
S.EndTwoColumn();
}
S.EndStatic();
S.StartStatic(_("FFmpeg Import/Export Library"));
{
S.StartTwoColumn();
{
S.AddVariableText(_("FFmpeg Library Version:"),
true,
wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
#if defined(USE_FFMPEG)
mFFmpegVersion = S.AddVariableText(_("No compatible FFmpeg library was found"),
true,
wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
#else
mFFmpegVersion = S.AddVariableText(wxT("FFmpeg support is not compiled in"),
true,
wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
#endif
S.AddVariableText(_("FFmpeg Library:"),
true,
wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
S.Id(ID_FFMPEG_FIND_BUTTON);
wxButton *bfnd = S.AddButton(_("Loca&te..."),
wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
S.AddVariableText(_("FFmpeg Library:"),
true,
wxALL | wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
S.Id(ID_FFMPEG_DOWN_BUTTON);
wxButton *bdwn = S.AddButton(_("Dow&nload"),
wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
#if !defined(USE_FFMPEG) || defined(DISABLE_DYNAMIC_LOADING_FFMPEG)
bdwn->Enable(FALSE);
bfnd->Enable(FALSE);
#else
// fix compilation warnings about unused variables
wxUnusedVar(bfnd);
wxUnusedVar(bdwn);
#endif
}
S.EndTwoColumn();
#ifdef EXPERIMENTAL_OD_FFMPEG
wxCheckBox* checkbox = S.TieCheckBox(_("Allow &background on-demand loading"),
wxT("/Library/FFmpegOnDemand"),
false);
#if !defined(USE_FFMPEG)
checkbox->Enable(FALSE);
#endif
#endif
}
S.EndStatic();
S.EndScroller();
}
示例7: PopulateOrExchange
void VampEffect::PopulateOrExchange(ShuttleGui & S)
{
Vamp::Plugin::ProgramList programs = mPlugin->getPrograms();
mParameters = mPlugin->getParameterDescriptors();
auto count = mParameters.size();
mToggles.reinit( count );
mSliders.reinit( count );
mFields.reinit( count );
mLabels.reinit( count );
mChoices.reinit( count );
mValues.reinit( count );
S.SetStyle(wxVSCROLL | wxTAB_TRAVERSAL);
wxScrolledWindow *scroller = S.StartScroller(2);
{
S.StartStatic(_("Plugin Settings"));
{
S.StartMultiColumn(5, wxEXPAND);
{
S.SetStretchyCol(3);
if (!programs.empty())
{
wxString currentProgram = wxString::FromUTF8(mPlugin->getCurrentProgram().c_str());
wxArrayStringEx choices;
for (size_t i = 0, cnt = programs.size(); i < cnt; i++)
{
choices.push_back(wxString::FromUTF8(programs[i].c_str()));
}
S.AddPrompt(_("Program"));
S.Id(ID_Program);
mProgram = S.AddChoice(
{},
choices,
choices.Index( currentProgram )
);
mProgram->SetName(_("Program"));
mProgram->SetSizeHints(-1, -1);
wxSizer *s = mProgram->GetContainingSizer();
s->GetItem(mProgram)->SetFlag(wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL);
S.AddSpace(1, 1);
S.AddSpace(1, 1);
S.AddSpace(1, 1);
}
for (size_t p = 0; p < count; p++)
{
wxString tip = wxString::FromUTF8(mParameters[p].description.c_str());
wxString unit = wxString::FromUTF8(mParameters[p].unit.c_str());
float value = mPlugin->getParameter(mParameters[p].identifier);
mToggles[p] = NULL;
mChoices[p] = NULL;
mSliders[p] = NULL;
mFields[p] = NULL;
mValues[p] = 0.0;
wxString labelText = wxString::FromUTF8(mParameters[p].name.c_str());
if (!unit.empty())
{
labelText += wxT(" (") + unit + wxT(")");
}
S.AddPrompt(labelText + wxT(":"));
if (mParameters[p].isQuantized &&
mParameters[p].quantizeStep == 1.0 &&
mParameters[p].minValue == 0.0 &&
mParameters[p].maxValue == 1.0)
{
S.Id(ID_Toggles + p);
mToggles[p] = S.AddCheckBox( {},
value > 0.5);
mToggles[p]->SetName(labelText);
if (!tip.empty())
{
mToggles[p]->SetToolTip(tip);
}
wxSizer *s = mToggles[p]->GetContainingSizer();
s->GetItem(mToggles[p])->SetFlag(wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL);
S.AddSpace(1, 1);
S.AddSpace(1, 1);
S.AddSpace(1, 1);
}
else if (mParameters[p].isQuantized &&
mParameters[p].quantizeStep == 1.0 &&
!mParameters[p].valueNames.empty())
{
wxArrayStringEx choices;
int selected = -1;
//.........這裏部分代碼省略.........
示例8: PopulateOrExchange
void MidiIOPrefs::PopulateOrExchange( ShuttleGui & S ) {
wxArrayString empty;
S.SetBorder(2);
S.StartScroller();
S.StartStatic(_("Interface"));
{
S.StartMultiColumn(2);
{
S.Id(HostID);
/* i18n-hint: (noun) */
mHost = S.TieChoice(_("&Host:"),
wxT("/MidiIO/Host"),
wxT(""),
mHostNames,
mHostLabels);
S.SetSizeHints(mHostNames);
S.AddPrompt(_("Using: PortMidi"));
}
S.EndMultiColumn();
}
S.EndStatic();
S.StartStatic(_("Playback"));
{
S.StartMultiColumn(2);
{
S.Id(PlayID);
mPlay = S.AddChoice(_("&Device:"),
wxEmptyString,
&empty);
int latency = gPrefs->Read(wxT("/MidiIO/OutputLatency"),
DEFAULT_SYNTH_LATENCY);
mLatency = S.TieNumericTextBox(_("MIDI Synth L&atency (ms):"),
wxT("/MidiIO/SynthLatency"),
latency, 3);
}
S.EndMultiColumn();
}
S.EndStatic();
#ifdef EXPERIMENTAL_MIDI_IN
S.StartStatic(_("Recording"));
{
S.StartMultiColumn(2);
{
S.Id(RecordID);
mRecord = S.AddChoice(_("De&vice:"),
wxEmptyString,
&empty);
S.Id(ChannelsID);
/*
mChannels = S.AddChoice(_("&Channels:"),
wxEmptyString,
&empty);
*/
}
S.EndMultiColumn();
}
S.EndStatic();
#endif
S.EndScroller();
}