Audacity  2.2.2
DeviceToolBar.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  DeviceToolbar.h
6 
7  Dominic Mazzoni
8 
9 **********************************************************************/
10 
11 #ifndef __AUDACITY_DEVICE_TOOLBAR__
12 #define __AUDACITY_DEVICE_TOOLBAR__
13 
14 #include "../MemoryX.h"
15 #include <vector>
16 #include "ToolBar.h"
17 
18 class wxImage;
19 class wxSize;
20 class wxPoint;
21 class wxChoice;
22 class wxStaticText;
23 struct DeviceSourceMap;
24 
25 class DeviceToolBar final : public ToolBar {
26 
27  public:
28 
29  DeviceToolBar();
30  virtual ~DeviceToolBar();
31 
32  void Create(wxWindow * parent) override;
33 
34  void UpdatePrefs() override;
35 
36  void DeinitChildren();
37  void Populate() override;
38  void Repaint(wxDC * WXUNUSED(dc)) override {};
39  void EnableDisableButtons() override;
40  bool Layout() override;
41  void OnFocus(wxFocusEvent &event);
42  void OnCaptureKey(wxCommandEvent &event);
43 
44  void OnChoice(wxCommandEvent & event);
45 
48  int GetInitialWidth() override{ return 620; }
49  int GetMinToolbarWidth() override { return 200; }
50 
51  void ShowInputDialog();
52  void ShowOutputDialog();
53  void ShowHostDialog();
54  void ShowChannelsDialog();
55 
56  void RefillCombos();
57 
58  private:
59  int ChangeHost();
60  void ChangeDevice(bool isInput);
61  void FillHosts();
62  void FillHostDevices();
63  void FillInputChannels();
64  void SetDevices(const DeviceSourceMap *in, const DeviceSourceMap *out);
65  void RepositionCombos();
66  void SetNames();
67  void RegenerateTooltips() override;
68  void ShowComboDialog(wxChoice *combo, const wxString &title);
69 
70  wxChoice *mInput;
71  wxChoice *mOutput;
72  wxChoice *mInputChannels;
73  wxChoice *mHost;
74 
75  public:
76 
77  DECLARE_CLASS(DeviceToolBar)
78  DECLARE_EVENT_TABLE()
79 };
80 
81 #endif
82 
void Populate() override
void FillHostDevices()
void RegenerateTooltips() override
wxChoice * mInputChannels
Definition: DeviceToolBar.h:72
void OnChoice(wxCommandEvent &event)
wxChoice * mInput
Definition: DeviceToolBar.h:70
void ShowComboDialog(wxChoice *combo, const wxString &title)
void OnFocus(wxFocusEvent &event)
DeviceToolBar()
Methods for DeviceToolBar.
wxChoice * mOutput
Definition: DeviceToolBar.h:71
A toobar to allow easier changing of input and output devices .
Definition: DeviceToolBar.h:25
void RepositionCombos()
void DeinitChildren()
void SetDevices(const DeviceSourceMap *in, const DeviceSourceMap *out)
void Create(wxWindow *parent) override
void Repaint(wxDC *WXUNUSED(dc)) override
Definition: DeviceToolBar.h:38
void ShowChannelsDialog()
void ChangeDevice(bool isInput)
void ShowOutputDialog()
void OnCaptureKey(wxCommandEvent &event)
bool Layout() override
wxChoice * mHost
Definition: DeviceToolBar.h:73
int GetInitialWidth() override
Definition: DeviceToolBar.h:48
void ShowInputDialog()
int GetMinToolbarWidth() override
Definition: DeviceToolBar.h:49
void FillInputChannels()
void UpdatePrefs() override
void EnableDisableButtons() override
Works with ToolManager and ToolDock to provide a dockable window in which buttons can be placed...
Definition: ToolBar.h:87
virtual ~DeviceToolBar()