本文整理匯總了C++中ShuttleGui::AddButton方法的典型用法代碼示例。如果您正苦於以下問題:C++ ShuttleGui::AddButton方法的具體用法?C++ ShuttleGui::AddButton怎麽用?C++ ShuttleGui::AddButton使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ShuttleGui
的用法示例。
在下文中一共展示了ShuttleGui::AddButton方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: PopulateOrExchange
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
}
示例2: PopulateOrExchange
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();
}
示例3: 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.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
bfnd, 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();
}