本文整理汇总了C++中ShuttleGui::SetStretchyCol方法的典型用法代码示例。如果您正苦于以下问题:C++ ShuttleGui::SetStretchyCol方法的具体用法?C++ ShuttleGui::SetStretchyCol怎么用?C++ ShuttleGui::SetStretchyCol使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShuttleGui
的用法示例。
在下文中一共展示了ShuttleGui::SetStretchyCol方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PopulateOrExchange
void SetTrackVisualsCommand::PopulateOrExchange(ShuttleGui & S)
{
SetTrackBase::PopulateOrExchange( S );
S.StartMultiColumn(3, wxEXPAND);
{
S.SetStretchyCol( 2 );
S.Optional( bHasHeight ).TieNumericTextBox( _("Height:"), mHeight );
S.Optional( bHasColour ).TieChoice( _("Colour:"), mColour,
LocalizedStrings( kColourStrings, nColours ) );
S.Optional( bHasDisplayType ).TieChoice( _("Display:"), mDisplayType,
LocalizedStrings( kDisplayTypeStrings, nDisplayTypes ) );
S.Optional( bHasScaleType ).TieChoice( _("Scale:"), mScaleType,
LocalizedStrings( kScaleTypeStrings, nScaleTypes ) );
S.Optional( bHasVZoom ).TieChoice( _("VZoom:"), mVZoom,
LocalizedStrings( kZoomTypeStrings, nZoomTypes ) );
S.Optional( bHasVZoomTop ).TieTextBox( _("VZoom Top:"), mVZoomTop );
S.Optional( bHasVZoomBottom ).TieTextBox( _("VZoom Bottom:"), mVZoomBottom );
}
S.EndMultiColumn();
S.StartMultiColumn(2, wxEXPAND);
{
S.SetStretchyCol( 1 );
S.Optional( bHasUseSpecPrefs ).TieCheckBox( _("Use Spectral Prefs"), bUseSpecPrefs );
S.Optional( bHasSpectralSelect ).TieCheckBox( _("Spectral Select"), bSpectralSelect);
S.Optional( bHasGrayScale ).TieCheckBox( _("Gray Scale"), bGrayScale );
}
S.EndMultiColumn();
}
示例2: PopulateOrExchange
void MacroCommandDialog::PopulateOrExchange(ShuttleGui &S)
{
S.StartVerticalLay(true);
{
S.StartMultiColumn(4, 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
mUsePreset = S.Id(UsePresetButtonID).AddButton(_("&Use Preset"));
mUsePreset->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);
wxString prompt{_("&Details")};
S.Prop(0).AddPrompt(prompt);
mDetails = S.AddTextWindow( wxT(""));
mDetails->SetEditable(false);
mDetails->SetName(wxStripMenuCodes(prompt));
}
S.EndMultiColumn();
S.Prop(10).StartStatic(_("Choose command"), true);
{
S.SetStyle(wxSUNKEN_BORDER | wxLC_LIST | wxLC_SINGLE_SEL);
mChoices = S.Id(CommandsListID).AddListControl();
}
S.EndStatic();
}
S.EndVerticalLay();
S.AddStandardButtons( eOkButton | eCancelButton | eHelpButton);
PopulateCommandList();
if (mChoices->GetItemCount() > 0) {
// set first item to be selected (and the focus when the
// list first becomes the focus)
mChoices->SetItemState(0, wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED,
wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED);
}
SetMinSize(wxSize(780, 560));
Fit();
Center();
}
示例3: 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;
}
示例4: 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();
}
示例5: 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();
}
示例6: PopulateOrExchange
/// Create the dialog contents, or exchange data with it.
void SmartRecordPrefs::PopulateOrExchange( ShuttleGui & S)
{
S.StartStatic( _("Pause Recording on Silence") );
{
S.TieCheckBox( _("Pause Recording on Silence"), wxT("/AudioIO/PauseRecOnSilence"),false);
S.StartMultiColumn(2, wxEXPAND);
S.SetStretchyCol(1);
S.TieSlider(_("Silence level (dB):"), wxT("/AudioIO/SilenceLevel"), -50, 0, -60);
S.EndMultiColumn();
}
S.EndStatic();
}
示例7: PopulateOrExchange
void BassBoostDialog::PopulateOrExchange(ShuttleGui & S)
{
wxTextValidator vld(wxFILTER_INCLUDE_CHAR_LIST);
vld.SetIncludes(wxArrayString(10, numbers));
S.StartHorizontalLay(wxCENTER, false);
{
S.AddTitle(_("by Nasca Octavian Paul"));
}
S.EndHorizontalLay();
S.StartHorizontalLay(wxCENTER, false);
{
// Add a little space
}
S.EndHorizontalLay();
S.StartMultiColumn(3, wxEXPAND);
S.SetStretchyCol(2);
{
// Frequency
mFreqT = S.Id(ID_FREQ_TEXT).AddTextBox(_("Frequency (Hz):"),
wxT(""),
10);
mFreqT->SetValidator(vld);
S.SetStyle(wxSL_HORIZONTAL);
mFreqS = S.Id(ID_FREQ_SLIDER).AddSlider(wxT(""),
0,
FREQ_MAX);
mFreqS->SetName(_("Frequency Hertz"));
mFreqS->SetRange(FREQ_MIN, FREQ_MAX);
// Boost
mBoostT = S.Id(ID_BOOST_TEXT).AddTextBox(_("Boost (dB):"),
wxT(""),
10);
mBoostT->SetValidator(vld);
S.SetStyle(wxSL_HORIZONTAL);
mBoostS = S.Id(ID_BOOST_SLIDER).AddSlider(wxT(""),
0,
BOOST_MAX);
mBoostS->SetName(_("Boost dB"));
mBoostS->SetRange(BOOST_MIN, BOOST_MAX);
}
S.EndMultiColumn();
return;
}
示例8: PopulateOrExchange
void SoundActivatedRecord::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(5);
int dBRange;
S.StartVerticalLay();
{
S.StartMultiColumn(2, wxEXPAND);
S.SetStretchyCol(1);
dBRange = gPrefs->Read(ENV_DB_KEY, ENV_DB_RANGE);
S.TieSlider(_("Activation level (dB):"), wxT("/AudioIO/SilenceLevel"), -50, 0, -dBRange);
S.EndMultiColumn();
}
S.EndVerticalLay();
S.AddStandardButtons();
}
示例9: 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
}
示例10: Populate
void SplashDialog::Populate( ShuttleGui & S )
{
this->SetBackgroundColour(theTheme.Colour( clrAboutBoxBackground ));
bool bShow;
gPrefs->Read(wxT("/GUI/ShowSplashScreen"), &bShow, true );
S.StartVerticalLay(1);
//v For now, change to AudacityLogoWithName via old-fashioned ways, not Theme.
m_pLogo = new wxBitmap((const char **) AudacityLogoWithName_xpm); //v
// JKC: Resize to 50% of size. Later we may use a smaller xpm as
// our source, but this allows us to tweak the size - if we want to.
// It also makes it easier to revert to full size if we decide to.
const float fScale=0.5f;// smaller size.
wxImage RescaledImage( m_pLogo->ConvertToImage() );
// wxIMAGE_QUALITY_HIGH not supported by wxWidgets 2.6.1, or we would use it here.
RescaledImage.Rescale( int(LOGOWITHNAME_WIDTH * fScale), int(LOGOWITHNAME_HEIGHT *fScale) );
wxBitmap RescaledBitmap( RescaledImage );
m_pIcon =
new wxStaticBitmap(S.GetParent(), -1,
//*m_pLogo, //v theTheme.Bitmap(bmpAudacityLogoWithName),
RescaledBitmap,
wxDefaultPosition,
wxSize(int(LOGOWITHNAME_WIDTH*fScale), int(LOGOWITHNAME_HEIGHT*fScale)));
S.Prop(0).AddWindow( m_pIcon );
mpHtml = new LinkingHtmlWindow(S.GetParent(), -1,
wxDefaultPosition,
wxSize(506, 280),
wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER );
mpHtml->SetPage(HelpText( wxT("welcome") ));
S.Prop(1).AddWindow( mpHtml, wxEXPAND );
S.Prop(0).StartMultiColumn(2, wxEXPAND);
S.SetStretchyCol( 1 );// Column 1 is stretchy...
{
S.SetBorder( 5 );
S.Id( DontShowID).AddCheckBox( _("Don't show this again at start up"), bShow ? wxT("false") : wxT("true") );
wxButton *ok = new wxButton(S.GetParent(), wxID_OK);
ok->SetDefault();
S.SetBorder( 5 );
S.Prop(0).AddWindow( ok, wxALIGN_RIGHT| wxALL );
}
S.EndVerticalLay();
}
示例11: PopulateOrExchange
void PopulateOrExchange(ShuttleGui & S)
{
wxString text;
S.SetBorder(10);
S.StartVerticalLay(true);
{
text.Printf(_("Audacity needs the file '%s' to import and export audio via FFmpeg."), mName.c_str());
S.AddTitle(text);
S.SetBorder(3);
S.StartHorizontalLay(wxALIGN_LEFT, true);
{
text.Printf(_("Location of '%s':"), mName.c_str());
S.AddTitle(text);
}
S.EndHorizontalLay();
S.StartMultiColumn(2, wxEXPAND);
S.SetStretchyCol(0);
{
if (mLibPath.GetFullPath().IsEmpty()) {
text.Printf(_("To find '%s', click here -->"), mName.c_str());
mPathText = S.AddTextBox(wxT(""), text, 0);
}
else {
mPathText = S.AddTextBox(wxT(""), mLibPath.GetFullPath(), 0);
}
S.Id(ID_FFMPEG_BROWSE).AddButton(_("Browse..."), wxALIGN_RIGHT);
S.AddVariableText(_("To get a free copy of FFmpeg, click here -->"), true);
S.Id(ID_FFMPEG_DLOAD).AddButton(_("Download"), wxALIGN_RIGHT);
}
S.EndMultiColumn();
S.AddStandardButtons();
}
S.EndVerticalLay();
Layout();
Fit();
SetMinSize(GetSize());
Center();
return;
}
示例12: PopulateOrExchange
void ExportOGGOptions::PopulateOrExchange(ShuttleGui & S)
{
S.StartVerticalLay();
{
S.StartHorizontalLay(wxEXPAND);
{
S.SetSizerProportion(1);
S.StartMultiColumn(2, wxCENTER);
{
S.SetStretchyCol(1);
S.Prop(1).TieSlider(_("Quality:"), mOggQualityUnscaled, 10);
}
S.EndMultiColumn();
}
S.EndHorizontalLay();
}
S.EndVerticalLay();
}
示例13: 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();
}
示例14: PopulateOrExchange
void EffectReverb::PopulateOrExchange(ShuttleGui & S)
{
S.AddSpace(0, 5);
S.StartMultiColumn(3, wxEXPAND);
{
S.SetStretchyCol(2);
#define SpinSlider(n, p) \
m ## n ## T = S.Id(ID_ ## n). \
AddSpinCtrl( p, DEF_ ## n, MAX_ ## n, MIN_ ## n); \
S.SetStyle(wxSL_HORIZONTAL); \
m ## n ## S = S.Id(ID_ ## n). \
AddSlider(wxT(""), DEF_ ## n, MAX_ ## n, MIN_ ## n);
SpinSlider(RoomSize, _("&Room Size (%):"));
SpinSlider(PreDelay, _("&Pre-delay (ms):"));
SpinSlider(Reverberance, _("Rever&berance (%):"));
SpinSlider(HfDamping, _("Da&mping (%):"));
SpinSlider(ToneLow, _("Tone &Low (%):"));
SpinSlider(ToneHigh, _("Tone &High (%):"));
SpinSlider(WetGain, _("Wet &Gain (dB):"));
SpinSlider(DryGain, _("Dr&y Gain (dB):"));
SpinSlider(StereoWidth, _("Stereo Wid&th (%):"));
#undef SpinSlider
}
S.EndMultiColumn();
S.StartHorizontalLay(wxCENTER, false);
{
mWetOnlyC = S.Id(ID_WetOnly).
AddCheckBox(_("Wet O&nly"), DEF_WetOnly ? wxT("true") : wxT("false"));
}
S.EndHorizontalLay();
return;
}
示例15: PopulateOrExchange
void EffectWahwah::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(5);
S.AddSpace(0, 5);
S.StartMultiColumn(3, wxEXPAND);
{
S.SetStretchyCol(2);
FloatingPointValidator<double> vldfreq(5, &mFreq, NumValidatorStyle::ONE_TRAILING_ZERO);
vldfreq.SetRange(MIN_Freq, MAX_Freq);
mFreqT = S.Id(ID_Freq).AddTextBox(_("LFO Freq&uency (Hz):"), wxT(""), 12);
mFreqT->SetValidator(vldfreq);
S.SetStyle(wxSL_HORIZONTAL);
mFreqS = S.Id(ID_Freq).AddSlider( {}, DEF_Freq * SCL_Freq, MAX_Freq * SCL_Freq, MIN_Freq * SCL_Freq);
mFreqS->SetName(_("LFO frequency in hertz"));
mFreqS->SetMinSize(wxSize(100, -1));
FloatingPointValidator<double> vldphase(1, &mPhase);
vldphase.SetRange(MIN_Phase, MAX_Phase);
mPhaseT = S.Id(ID_Phase).AddTextBox(_("LFO Sta&rt Phase (deg.):"), wxT(""), 12);
mPhaseT->SetValidator(vldphase);
S.SetStyle(wxSL_HORIZONTAL);
mPhaseS = S.Id(ID_Phase).AddSlider( {}, DEF_Phase * SCL_Phase, MAX_Phase * SCL_Phase, MIN_Phase * SCL_Phase);
mPhaseS->SetName(_("LFO start phase in degrees"));
mPhaseS->SetLineSize(10);
mPhaseS->SetMinSize(wxSize(100, -1));
IntegerValidator<int> vlddepth(&mDepth);
vlddepth.SetRange(MIN_Depth, MAX_Depth);
mDepthT = S.Id(ID_Depth).AddTextBox(_("Dept&h (%):"), wxT(""), 12);
mDepthT->SetValidator(vlddepth);
S.SetStyle(wxSL_HORIZONTAL);
mDepthS = S.Id(ID_Depth).AddSlider( {}, DEF_Depth * SCL_Depth, MAX_Depth * SCL_Depth, MIN_Depth * SCL_Depth);
mDepthS->SetName(_("Depth in percent"));
mDepthS->SetMinSize(wxSize(100, -1));
FloatingPointValidator<double> vldres(1, &mRes);
vldres.SetRange(MIN_Res, MAX_Res);
mResT = S.Id(ID_Res).AddTextBox(_("Reso&nance:"), wxT(""), 12);
mResT->SetValidator(vldres);
S.SetStyle(wxSL_HORIZONTAL);
mResS = S.Id(ID_Res).AddSlider( {}, DEF_Res * SCL_Res, MAX_Res * SCL_Res, MIN_Res * SCL_Res);
mResS->SetName(_("Resonance"));
mResS->SetMinSize(wxSize(100, -1));
IntegerValidator<int> vldfreqoffset(&mFreqOfs);
vldfreqoffset.SetRange(MIN_FreqOfs, MAX_FreqOfs);
mFreqOfsT = S.Id(ID_FreqOfs).AddTextBox(_("Wah Frequency Offse&t (%):"), wxT(""), 12);
mFreqOfsT->SetValidator(vldfreqoffset);
S.SetStyle(wxSL_HORIZONTAL);
mFreqOfsS = S.Id(ID_FreqOfs).AddSlider( {}, DEF_FreqOfs * SCL_FreqOfs, MAX_FreqOfs * SCL_FreqOfs, MIN_FreqOfs * SCL_FreqOfs);
mFreqOfsT->SetName(_("Wah frequency offset in percent"));
mFreqOfsT->SetMinSize(wxSize(100, -1));
FloatingPointValidator<double> vldoutgain(1, &mOutGain);
vldoutgain.SetRange(MIN_OutGain, MAX_OutGain);
mOutGainT = S.Id(ID_OutGain).AddTextBox(_("&Output gain (dB):"), wxT(""), 12);
mOutGainT->SetValidator(vldoutgain);
S.SetStyle(wxSL_HORIZONTAL);
mOutGainS = S.Id(ID_OutGain).AddSlider( {}, DEF_OutGain * SCL_OutGain, MAX_OutGain * SCL_OutGain, MIN_OutGain * SCL_OutGain);
mOutGainS->SetName(_("Output gain (dB)"));
mOutGainS->SetMinSize(wxSize(100, -1));
}
S.EndMultiColumn();
}