本文整理汇总了C++中PopulateOrExchange函数的典型用法代码示例。如果您正苦于以下问题:C++ PopulateOrExchange函数的具体用法?C++ PopulateOrExchange怎么用?C++ PopulateOrExchange使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PopulateOrExchange函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: S
bool MidiIOPrefs::Apply()
{
ShuttleGui S(this, eIsSavingToPrefs);
PopulateOrExchange(S);
const PmDeviceInfo *info;
info = (const PmDeviceInfo *) mPlay->GetClientData(mPlay->GetSelection());
if (info) {
gPrefs->Write(wxT("/MidiIO/PlaybackDevice"),
wxString::Format(wxT("%s: %s"),
wxString(info->interf, wxConvLocal).c_str(),
wxString(info->name, wxConvLocal).c_str()));
}
#ifdef EXPERIMENTAL_MIDI_IN
info = (const PmDeviceInfo *) mRecord->GetClientData(mRecord->GetSelection());
if (info) {
gPrefs->Write(wxT("/MidiIO/RecordingDevice"),
wxString::Format(wxT("%s: %s"),
wxString(info->interf, wxConvLocal).c_str(),
wxString(info->name, wxConvLocal).c_str()));
}
#endif
return gPrefs->Flush();
}
示例2: wxASSERT
void SpectrumPrefs::Populate(int windowSize)
{
mSizeChoices.Add(_("8 - most wideband"));
mSizeChoices.Add(wxT("16"));
mSizeChoices.Add(wxT("32"));
mSizeChoices.Add(wxT("64"));
mSizeChoices.Add(wxT("128"));
mSizeChoices.Add(_("256 - default"));
mSizeChoices.Add(wxT("512"));
mSizeChoices.Add(wxT("1024"));
mSizeChoices.Add(wxT("2048"));
mSizeChoices.Add(wxT("4096"));
mSizeChoices.Add(wxT("8192"));
mSizeChoices.Add(wxT("16384"));
mSizeChoices.Add(_("32768 - most narrowband"));
wxASSERT(mSizeChoices.size() == SpectrogramSettings::NumWindowSizes);
PopulatePaddingChoices(windowSize);
for (int i = 0; i < NumWindowFuncs(); i++) {
mTypeChoices.Add(WindowFuncName(i));
}
mScaleChoices = SpectrogramSettings::GetScaleNames();
mAlgorithmChoices = SpectrogramSettings::GetAlgorithmNames();
//------------------------- Main section --------------------
// Now construct the GUI itself.
ShuttleGui S(this, eIsCreating);
PopulateOrExchange(S);
// ----------------------- End of main section --------------
}
示例3: S
void EffectDialog::Init()
{
ShuttleGui S(this, eIsCreating);
S.SetBorder(5);
S.StartVerticalLay(true);
{
PopulateOrExchange(S);
long buttons = eOkButton;
if (mType == PROCESS_EFFECT || mType == INSERT_EFFECT)
{
buttons |= eCancelButton;
if (mType == PROCESS_EFFECT)
{
buttons |= ePreviewButton;
}
}
S.AddStandardButtons(buttons);
}
S.EndVerticalLay();
Layout();
Fit();
SetMinSize(GetSize());
Center();
}
示例4: S
void KeyConfigPrefs::Populate()
{
ShuttleGui S(this, eIsCreatingFromPrefs);
AudacityProject *project = GetActiveProject();
if (!project) {
S.StartVerticalLay(true);
{
S.StartStatic(wxEmptyString, true);
{
S.AddTitle(_("Keyboard preferences currently unavailable."));
S.AddTitle(_("Open a new project to modify keyboard shortcuts."));
}
S.EndStatic();
}
S.EndVerticalLay();
return;
}
mManager = project->GetCommandManager();
mManager->GetCategories(mCats);
mCats.Insert(_("All"), 0);
PopulateOrExchange(S);
CreateList();
mCommandSelected = -1;
}
示例5: S
void ExportMultiple::OnExport(wxCommandEvent& event)
{
ShuttleGui S(this, eIsSavingToPrefs);
PopulateOrExchange(S);
// Make sure the output directory is in good shape
if (!DirOk()) {
return;
}
mFormatIndex = mFormat->GetSelection();
bool overwrite = mOverwrite->GetValue();
bool ok;
if (mLabel->GetValue()) {
ok = ExportMultipleByLabel(mByName->GetValue(),
mPrefix->GetValue());
}
else {
ok = ExportMultipleByTrack(mByName->GetValue(),
mPrefix->GetValue());
}
if (!ok) {
return;
}
EndModal(1);
}
示例6: S
void TracksPrefs::Populate()
{
mSoloCodes.Add(wxT("Simple"));
mSoloCodes.Add(wxT("Multi"));
mSoloCodes.Add(wxT("None"));
mSoloChoices.Add(_("Simple"));
mSoloChoices.Add(_("Multi-track"));
mSoloChoices.Add(_("None"));
// Keep view choices and codes in proper correspondence --
// we don't display them by increasing integer values.
mViewChoices.Add(_("Waveform"));
mViewCodes.Add(int(WaveTrack::Waveform));
mViewChoices.Add(_("Waveform (dB)"));
mViewCodes.Add(int(WaveTrack::obsoleteWaveformDBDisplay));
mViewChoices.Add(_("Spectrogram"));
mViewCodes.Add(WaveTrack::Spectrum);
//------------------------- Main section --------------------
// Now construct the GUI itself.
// Use 'eIsCreatingFromPrefs' so that the GUI is
// initialised with values from gPrefs.
ShuttleGui S(this, eIsCreatingFromPrefs);
PopulateOrExchange(S);
// ----------------------- End of main section --------------
}
示例7: wxDialog
ExportMultiple::ExportMultiple(AudacityProject *project)
: wxDialog(project, wxID_ANY, wxString(_("Export Multiple")))
, mIterator(new TrackListIterator)
{
SetName(GetTitle());
mProject = project;
mTracks = project->GetTracks();
mPlugins = mExporter.GetPlugins();
this->CountTracksAndLabels();
mBook = NULL;
// create array of characters not allowed in file names
wxString forbid = wxFileName::GetForbiddenChars();
for(unsigned int i=0; i < forbid.Length(); i++)
exclude.Add( forbid.Mid(i, 1) );
ShuttleGui S(this, eIsCreatingFromPrefs);
// Creating some of the widgets cause cause events to fire
// and we don't want that until after we're completely
// created. (Observed on Windows)
mInitialized = false;
PopulateOrExchange(S);
mInitialized = true;
Layout();
Fit();
SetMinSize(GetSize());
Center();
EnableControls();
}
示例8: S
bool TracksBehaviorsPrefs::Commit()
{
ShuttleGui S(this, eIsSavingToPrefs);
PopulateOrExchange(S);
return true;
}
示例9: S
bool EffectsPrefs::Commit()
{
ShuttleGui S(this, eIsSavingToPrefs);
PopulateOrExchange(S);
return true;
}
示例10: S
void BatchProcessDialog::Populate()
{
//------------------------- Main section --------------------
ShuttleGui S(this, eIsCreating);
PopulateOrExchange(S);
// ----------------------- End of main section --------------
}
示例11: wxDialogWrapper
ExportMultiple::ExportMultiple(AudacityProject *project)
: wxDialogWrapper(project, wxID_ANY, wxString(_("Export Multiple")))
{
SetName(GetTitle());
mProject = project;
mTracks = project->GetTracks();
// Construct an array of non-owning pointers
for (const auto &plugin : mExporter.GetPlugins())
mPlugins.push_back(plugin.get());
this->CountTracksAndLabels();
mBook = NULL;
ShuttleGui S(this, eIsCreatingFromPrefs);
// Creating some of the widgets cause events to fire
// and we don't want that until after we're completely
// created. (Observed on Windows)
mInitialized = false;
PopulateOrExchange(S);
mInitialized = true;
Layout();
Fit();
SetMinSize(GetSize());
Center();
EnableControls();
}
示例12: S
bool ModulePrefs::Apply()
{
ShuttleGui S(this, eIsSavingToPrefs);
PopulateOrExchange(S);
return true;
}
示例13: S
void MacroCommandDialog::Populate()
{
//------------------------- Main section --------------------
ShuttleGui S(this, eIsCreating);
PopulateOrExchange(S);
// ----------------------- End of main section --------------
}
示例14: GetLanguages
void GUIPrefs::Populate()
{
// First any pre-processing for constructing the GUI.
GetLanguages(mLangCodes, mLangNames);
mHtmlHelpCodes.Add(wxT("Local"));
mHtmlHelpCodes.Add(wxT("FromInternet"));
mHtmlHelpChoices.Add(_("Local"));
mHtmlHelpChoices.Add(_("From Internet"));
GetRangeChoices(&mRangeChoices, &mRangeCodes);
#if 0
// only for testing...
mLangCodes.Add("kg"); mLangNames.Add("Klingon");
mLangCodes.Add("ep"); mLangNames.Add("Esperanto");
#endif
//------------------------- Main section --------------------
// Now construct the GUI itself.
// Use 'eIsCreatingFromPrefs' so that the GUI is
// initialised with values from gPrefs.
ShuttleGui S(this, eIsCreatingFromPrefs);
PopulateOrExchange(S);
// ----------------------- End of main section --------------
}
示例15: S
void SpectrumPrefs::Populate( )
{
int minFreq;
int maxFreq;
// First any pre-processing for constructing the GUI.
// Unusual handling of maxFreqStr because it is a validated input.
gPrefs->Read(wxT("/Spectrum/MaxFreq"), &maxFreq, 8000L);
gPrefs->Read(wxT("/Spectrum/MinFreq"), &minFreq, 0L);
gPrefs->Read(wxT("/Spectrum/WindowType"), &windowType, 3L);
#ifdef EXPERIMENTAL_FFT_SKIP_POINTS
gPrefs->Read(wxT("/Spectrum/FFTSkipPoints"), &fftSkipPoints, 0L);
#endif //EXPERIMENTAL_FFT_SKIP_POINTS
#ifdef EXPERIMENTAL_FFT_Y_GRID
gPrefs->Read(wxT("/Spectrum/FFTYGrid"), &fftYGrid, false);
#endif //EXPERIMENTAL_FFT_Y_GRID
#ifdef EXPERIMENTAL_FIND_NOTES
gPrefs->Read(wxT("/Spectrum/FFTFindNotes"), &fftFindNotes, false);
gPrefs->Read(wxT("/Spectrum/FindNotesMinA"), &findNotesMinA, -30L);
findNotesMinAStr.Printf(wxT("%d"), findNotesMinA);
gPrefs->Read(wxT("/Spectrum/FindNotesN"), &findNotesN, 5L);
findNotesNStr.Printf(wxT("%d"), findNotesN);
gPrefs->Read(wxT("/Spectrum/FindNotes"), &findNotesQuantize, false);
#endif //EXPERIMENTAL_FIND_NOTES
minFreqStr.Printf(wxT("%d"), minFreq);
maxFreqStr.Printf(wxT("%d"), maxFreq);
//------------------------- Main section --------------------
// Now construct the GUI itself.
// Use 'eIsCreatingFromPrefs' so that the GUI is
// initialised with values from gPrefs.
ShuttleGui S(this, eIsCreatingFromPrefs);
PopulateOrExchange(S);
// ----------------------- End of main section --------------
}