Audacity 3.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 "PrefsPanel.h"
18
19class wxChoice;
20class ShuttleGui;
21
22#define DEVICE_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Device") }
23
24class DevicePrefs final : public PrefsPanel
25{
26 public:
27 DevicePrefs(wxWindow * parent, wxWindowID winid);
28 virtual ~DevicePrefs();
29 ComponentInterfaceSymbol GetSymbol() const override;
30 TranslatableString GetDescription() const override;
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
59PrefsPanel *DevicePrefsFactory(wxWindow *parent, wxWindowID winid, AudacityProject *);
60
61#endif
PrefsPanel * DevicePrefsFactory(wxWindow *parent, wxWindowID winid, AudacityProject *)
#define S(N)
Definition: ToChars.cpp:64
std::vector< TranslatableString > TranslatableStrings
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
A PrefsPanel used to select recording and playback devices and other settings.
Definition: DevicePrefs.h:25
void OnDevice(wxCommandEvent &e)
wxArrayStringEx mHostLabels
Definition: DevicePrefs.h:44
wxChoice * mHost
Definition: DevicePrefs.h:51
ComponentInterfaceSymbol GetSymbol() const override
Definition: DevicePrefs.cpp:66
void PopulateOrExchange(ShuttleGui &S) override
wxChoice * mRecord
Definition: DevicePrefs.h:53
wxString mRecordDevice
Definition: DevicePrefs.h:47
wxString mPlayDevice
Definition: DevicePrefs.h:46
wxString mRecordSource
Definition: DevicePrefs.h:48
void OnHost(wxCommandEvent &e)
TranslatableString GetDescription() const override
Definition: DevicePrefs.cpp:71
virtual ~DevicePrefs()
Definition: DevicePrefs.cpp:61
wxChoice * mPlay
Definition: DevicePrefs.h:52
void GetNamesAndLabels()
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
Definition: DevicePrefs.cpp:76
wxChoice * mChannels
Definition: DevicePrefs.h:54
long mRecordChannels
Definition: DevicePrefs.h:49
void Populate()
Definition: DevicePrefs.cpp:81
bool Commit() override
TranslatableStrings mHostNames
Definition: DevicePrefs.h:43
DevicePrefs(wxWindow *parent, wxWindowID winid)
Definition: DevicePrefs.cpp:55
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
Definition: PrefsPanel.h:51
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:625
Holds a msgid for the translation catalog; may also bind format arguments.
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.