Audacity  2.2.2
DevicePrefs.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  DevicePrefs.h
6 
7  Joshua Haberman
8  James Crook
9 
10 **********************************************************************/
11 
12 #ifndef __AUDACITY_DEVICE_PREFS__
13 #define __AUDACITY_DEVICE_PREFS__
14 
15 #include <wx/defs.h>
16 
17 #include <wx/choice.h>
18 #include <wx/string.h>
19 #include <wx/window.h>
20 
21 #include "PrefsPanel.h"
22 
23 class ShuttleGui;
24 
25 class DevicePrefs final : public PrefsPanel
26 {
27  public:
28  DevicePrefs(wxWindow * parent, wxWindowID winid);
29  virtual ~DevicePrefs();
30  bool Commit() override;
31  wxString HelpPageName() override;
32  void PopulateOrExchange(ShuttleGui & S) override;
33 
34  private:
35  void Populate();
36  void GetNamesAndLabels();
37 
38  void OnHost(wxCommandEvent & e);
39  void OnDevice(wxCommandEvent & e);
40 
41  wxArrayString mHostNames;
42  wxArrayString mHostLabels;
43 
44  wxString mPlayDevice;
45  wxString mRecordDevice;
46  wxString mRecordSource;
48 
49  wxChoice *mHost;
50  wxChoice *mPlay;
51  wxChoice *mRecord;
52  wxChoice *mChannels;
53 
54  DECLARE_EVENT_TABLE()
55 };
56 
58 {
59 public:
60  PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
61 };
62 
63 #endif
wxString mRecordSource
Definition: DevicePrefs.h:46
wxChoice * mHost
Definition: DevicePrefs.h:49
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
wxString HelpPageName() override
DevicePrefs(wxWindow *parent, wxWindowID winid)
Definition: DevicePrefs.cpp:55
wxChoice * mChannels
Definition: DevicePrefs.h:52
void PopulateOrExchange(ShuttleGui &S) override
wxChoice * mRecord
Definition: DevicePrefs.h:51
void Populate()
Definition: DevicePrefs.cpp:65
bool Commit() override
void GetNamesAndLabels()
Definition: DevicePrefs.cpp:91
wxChoice * mPlay
Definition: DevicePrefs.h:50
Used within the PrefsDialog, classes derived from this class include AudioIOPrefs, BatchPrefs, DirectoriesPrefs, FileFormatPrefs, GUIPrefs, KeyConfigPrefs, MousePrefs, QualityPrefs, SpectrumPrefs and ThemePrefs.
Definition: PrefsPanel.h:45
void OnHost(wxCommandEvent &e)
PrefsPanel * operator()(wxWindow *parent, wxWindowID winid) override
virtual ~DevicePrefs()
Definition: DevicePrefs.cpp:61
A PrefsPanel used to select recording and playback devices and other settings.
Definition: DevicePrefs.h:25
wxArrayString mHostLabels
Definition: DevicePrefs.h:42
wxString mPlayDevice
Definition: DevicePrefs.h:44
long mRecordChannels
Definition: DevicePrefs.h:47
wxString mRecordDevice
Definition: DevicePrefs.h:45
wxArrayString mHostNames
Definition: DevicePrefs.h:41
void OnDevice(wxCommandEvent &e)