Audacity  3.0.3
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 "PrefsPanel.h"
18 
19 class wxChoice;
20 class ShuttleGui;
21 
22 #define DEVICE_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Device") }
23 
24 class DevicePrefs final : public PrefsPanel
25 {
26  public:
27  DevicePrefs(wxWindow * parent, wxWindowID winid);
28  virtual ~DevicePrefs();
31 
32  bool Commit() override;
33  ManualPageID HelpPageName() override;
34  void PopulateOrExchange(ShuttleGui & S) override;
35 
36  private:
37  void Populate();
38  void GetNamesAndLabels();
39 
40  void OnHost(wxCommandEvent & e);
41  void OnDevice(wxCommandEvent & e);
42 
45 
46  wxString mPlayDevice;
47  wxString mRecordDevice;
48  wxString mRecordSource;
50 
51  wxChoice *mHost;
52  wxChoice *mPlay;
53  wxChoice *mRecord;
54  wxChoice *mChannels;
55 
56  DECLARE_EVENT_TABLE()
57 };
58 
59 #endif
DevicePrefs::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: DevicePrefs.cpp:128
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
DevicePrefs::~DevicePrefs
virtual ~DevicePrefs()
Definition: DevicePrefs.cpp:62
DevicePrefs::OnDevice
void OnDevice(wxCommandEvent &e)
Definition: DevicePrefs.cpp:324
TranslatableStrings
std::vector< TranslatableString > TranslatableStrings
Definition: TranslatableString.h:295
DevicePrefs::HelpPageName
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
Definition: DevicePrefs.cpp:77
PrefsPanel.h
DevicePrefs::GetNamesAndLabels
void GetNamesAndLabels()
Definition: DevicePrefs.cpp:109
DevicePrefs::OnHost
void OnHost(wxCommandEvent &e)
Definition: DevicePrefs.cpp:212
DevicePrefs::GetDescription
TranslatableString GetDescription() override
Definition: DevicePrefs.cpp:72
wxArrayStringEx
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
Definition: wxArrayStringEx.h:18
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
DevicePrefs::mRecordChannels
long mRecordChannels
Definition: DevicePrefs.h:49
DevicePrefs::mHost
wxChoice * mHost
Definition: DevicePrefs.h:51
DevicePrefs::mPlay
wxChoice * mPlay
Definition: DevicePrefs.h:52
DevicePrefs::Populate
void Populate()
Definition: DevicePrefs.cpp:82
DevicePrefs::Commit
bool Commit() override
Definition: DevicePrefs.cpp:388
DevicePrefs::mRecord
wxChoice * mRecord
Definition: DevicePrefs.h:53
DevicePrefs::mChannels
wxChoice * mChannels
Definition: DevicePrefs.h:54
DevicePrefs::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: DevicePrefs.cpp:67
DevicePrefs::mRecordSource
wxString mRecordSource
Definition: DevicePrefs.h:48
TaggedIdentifier< ManualPageIDTag >
DevicePrefs::mHostNames
TranslatableStrings mHostNames
Definition: DevicePrefs.h:43
PrefsPanel
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
Definition: PrefsPanel.h:51
DevicePrefs::DevicePrefs
DevicePrefs(wxWindow *parent, wxWindowID winid)
Definition: DevicePrefs.cpp:56
DevicePrefs
A PrefsPanel used to select recording and playback devices and other settings.
Definition: DevicePrefs.h:25
DevicePrefs::mPlayDevice
wxString mPlayDevice
Definition: DevicePrefs.h:46
DevicePrefs::mHostLabels
wxArrayStringEx mHostLabels
Definition: DevicePrefs.h:44
DevicePrefs::mRecordDevice
wxString mRecordDevice
Definition: DevicePrefs.h:47
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631