1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 00:20:06 +02:00
audacity/src/toolbars/DeviceToolBar.h
James Crook 9e1291b2b7 Improve initial and minimum widths of resizable toolbars.
In particular, device toolbar previously could be made ridiculously small.
Also in the default configuration it takes a whole line, so we now use that space in its initial size.

Mixer Toolbar initial size was a little small.  Now it matches the Transport Toolbar width.
Meter Toolbar initial size was too small.
Transcription Toolbar was a little too small.  Better to start out slightly wider than previously.
2018-07-22 15:19:51 +01:00

83 lines
1.8 KiB
C++

/**********************************************************************
Audacity: A Digital Audio Editor
DeviceToolbar.h
Dominic Mazzoni
**********************************************************************/
#ifndef __AUDACITY_DEVICE_TOOLBAR__
#define __AUDACITY_DEVICE_TOOLBAR__
#include "../MemoryX.h"
#include <vector>
#include "ToolBar.h"
class wxImage;
class wxSize;
class wxPoint;
class wxChoice;
class wxStaticText;
struct DeviceSourceMap;
class DeviceToolBar final : public ToolBar {
public:
DeviceToolBar();
virtual ~DeviceToolBar();
void Create(wxWindow * parent) override;
void UpdatePrefs() override;
void DeinitChildren();
void Populate() override;
void Repaint(wxDC * WXUNUSED(dc)) override {};
void EnableDisableButtons() override;
bool Layout() override;
void OnFocus(wxFocusEvent &event);
void OnCaptureKey(wxCommandEvent &event);
void OnChoice(wxCommandEvent & event);
/// When the prefs don't exist this value is used.
/// 883 takes a complete row in the default initial size of Audacity.
int GetInitialWidth() override{ return 883; }
int GetMinToolbarWidth() override { return 350; }
void ShowInputDialog();
void ShowOutputDialog();
void ShowHostDialog();
void ShowChannelsDialog();
void RefillCombos();
private:
int ChangeHost();
void ChangeDevice(bool isInput);
void FillHosts();
void FillHostDevices();
void FillInputChannels();
void SetDevices(const DeviceSourceMap *in, const DeviceSourceMap *out);
void RepositionCombos();
void SetNames();
void RegenerateTooltips() override;
void ShowComboDialog(wxChoice *combo, const wxString &title);
wxChoice *mInput;
wxChoice *mOutput;
wxChoice *mInputChannels;
wxChoice *mHost;
public:
DECLARE_CLASS(DeviceToolBar)
DECLARE_EVENT_TABLE()
};
#endif