当前位置: 首页>>代码示例>>C++>>正文


C++ PopulateOrExchange函数代码示例

本文整理汇总了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();
}
开发者ID:JordanGraves,项目名称:TabMagic,代码行数:25,代码来源:MidiIOPrefs.cpp

示例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 --------------
}
开发者ID:onuryuruten,项目名称:audacity,代码行数:33,代码来源:SpectrumPrefs.cpp

示例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();
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:28,代码来源:Effect.cpp

示例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;
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:29,代码来源:KeyConfigPrefs.cpp

示例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);
}
开发者ID:andreipaga,项目名称:audacity,代码行数:29,代码来源:ExportMultiple.cpp

示例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 --------------
}
开发者ID:MaxKellermann,项目名称:audacity,代码行数:31,代码来源:TracksPrefs.cpp

示例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();
}
开发者ID:jengelh,项目名称:audacity,代码行数:35,代码来源:ExportMultiple.cpp

示例8: S

bool TracksBehaviorsPrefs::Commit()
{
   ShuttleGui S(this, eIsSavingToPrefs);
   PopulateOrExchange(S);

   return true;
}
开发者ID:MindFy,项目名称:audacity,代码行数:7,代码来源:TracksBehaviorsPrefs.cpp

示例9: S

bool EffectsPrefs::Commit()
{
   ShuttleGui S(this, eIsSavingToPrefs);
   PopulateOrExchange(S);

   return true;
}
开发者ID:RaphaelMarinier,项目名称:audacity,代码行数:7,代码来源:EffectsPrefs.cpp

示例10: S

void BatchProcessDialog::Populate()
{
   //------------------------- Main section --------------------
   ShuttleGui S(this, eIsCreating);
   PopulateOrExchange(S);
   // ----------------------- End of main section --------------
}
开发者ID:AkiraShirase,项目名称:audacity,代码行数:7,代码来源:BatchProcessDialog.cpp

示例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();
}
开发者ID:alendubri,项目名称:audacity,代码行数:31,代码来源:ExportMultiple.cpp

示例12: S

bool ModulePrefs::Apply()
{
   ShuttleGui S(this, eIsSavingToPrefs);
   PopulateOrExchange(S);

   return true;
}
开发者ID:Cactuslegs,项目名称:audacity-of-nope,代码行数:7,代码来源:ModulePrefs.cpp

示例13: S

void MacroCommandDialog::Populate()
{
   //------------------------- Main section --------------------
   ShuttleGui S(this, eIsCreating);
   PopulateOrExchange(S);
   // ----------------------- End of main section --------------
}
开发者ID:SteveDaulton,项目名称:audacity,代码行数:7,代码来源:BatchCommandDialog.cpp

示例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 --------------
}
开发者ID:onuryuruten,项目名称:audacity,代码行数:27,代码来源:GUIPrefs.cpp

示例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 --------------
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:35,代码来源:SpectrumPrefs.cpp


注:本文中的PopulateOrExchange函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。