Audacity  2.2.0
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 #include <wx/dynarray.h>
21 
22 #include "PrefsPanel.h"
23 
24 class ShuttleGui;
25 
26 class DevicePrefs final : public PrefsPanel
27 {
28  public:
29  DevicePrefs(wxWindow * parent);
30  virtual ~DevicePrefs();
31  bool Commit() override;
32  wxString HelpPageName() override;
33 
34  private:
35  void Populate();
37  void GetNamesAndLabels();
38 
39  void OnHost(wxCommandEvent & e);
40  void OnDevice(wxCommandEvent & e);
41 
42  wxArrayString mHostNames;
43  wxArrayString mHostLabels;
44 
45  wxString mPlayDevice;
46  wxString mRecordDevice;
47  wxString mRecordSource;
49 
50  wxChoice *mHost;
51  wxChoice *mPlay;
52  wxChoice *mRecord;
53  wxChoice *mChannels;
54 
55  DECLARE_EVENT_TABLE()
56 };
57 
59 {
60 public:
61  PrefsPanel *Create(wxWindow *parent) override;
62 };
63 
64 #endif
wxString mRecordSource
Definition: DevicePrefs.h:47
wxChoice * mHost
Definition: DevicePrefs.h:50
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:369
wxString HelpPageName() override
Definition: DevicePrefs.cpp:410
Definition: DevicePrefs.h:58
wxChoice * mChannels
Definition: DevicePrefs.h:53
wxChoice * mRecord
Definition: DevicePrefs.h:52
DevicePrefs(wxWindow *parent)
Definition: DevicePrefs.cpp:55
void Populate()
Definition: DevicePrefs.cpp:65
PrefsPanel * Create(wxWindow *parent) override
Definition: DevicePrefs.cpp:415
bool Commit() override
Definition: DevicePrefs.cpp:373
void PopulateOrExchange(ShuttleGui &S)
Definition: DevicePrefs.cpp:109
void GetNamesAndLabels()
Definition: DevicePrefs.cpp:91
wxChoice * mPlay
Definition: DevicePrefs.h:51
Used within the PrefsDialog, classes derived from this class include AudioIOPrefs, BatchPrefs, DirectoriesPrefs, FileFormatPrefs, GUIPrefs, KeyConfigPrefs, MousePrefs, QualityPrefs, SpectrumPrefs and ThemePrefs.
Definition: PrefsPanel.h:43
void OnHost(wxCommandEvent &e)
Definition: DevicePrefs.cpp:195
virtual ~DevicePrefs()
Definition: DevicePrefs.cpp:61
A PrefsPanel used to select recording and playback devices and other settings.
Definition: DevicePrefs.h:26
wxArrayString mHostLabels
Definition: DevicePrefs.h:43
wxString mPlayDevice
Definition: DevicePrefs.h:45
Definition: PrefsPanel.h:70
long mRecordChannels
Definition: DevicePrefs.h:48
wxString mRecordDevice
Definition: DevicePrefs.h:46
wxArrayString mHostNames
Definition: DevicePrefs.h:42
void OnDevice(wxCommandEvent &e)
Definition: DevicePrefs.cpp:308