Audacity 3.2.0
|
A ToolBar that provides the record and playback volume settings. More...
#include <MixerToolBar.h>
Public Member Functions | |
MixerToolBar (AudacityProject &project) | |
Methods for MixerToolBar. More... | |
virtual | ~MixerToolBar () |
void | Create (wxWindow *parent) override |
void | UpdatePrefs () override |
void | UpdateControls () |
void | SetMixer (wxCommandEvent &event) |
void | Populate () override |
void | Repaint (wxDC *WXUNUSED(dc)) override |
void | EnableDisableButtons () override |
int | GetMinToolbarWidth () override |
int | GetInitialWidth () override |
Resizable toolbars should implement these. More... | |
void | OnFocus (wxFocusEvent &event) |
void | OnCaptureKey (wxCommandEvent &event) |
void | OnSlider (wxCommandEvent &event) |
void | OnAudioCapture (AudioIOEvent) |
void | ShowOutputGainDialog () |
void | ShowInputGainDialog () |
void | AdjustOutputGain (int adj) |
void | AdjustInputGain (int adj) |
void | RegenerateTooltips () override |
Public Member Functions inherited from ToolBar | |
ToolBar (AudacityProject &project, int type, const TranslatableString &label, const wxString §ion, bool resizable=false) | |
virtual | ~ToolBar () |
bool | AcceptsFocus () const override |
virtual void | SetToDefaultSize () |
virtual void | Create (wxWindow *parent) |
virtual void | EnableDisableButtons ()=0 |
virtual void | ReCreateButtons () |
void | UpdatePrefs () override |
virtual void | RegenerateTooltips ()=0 |
int | GetType () |
TranslatableString | GetTitle () |
TranslatableString | GetLabel () |
wxString | GetSection () |
ToolDock * | GetDock () |
void | SetLabel (const TranslatableString &label) |
virtual void | SetDocked (ToolDock *dock, bool pushed) |
virtual bool | Expose (bool show=true) |
bool | IsResizable () const |
bool | IsVisible () const |
bool | IsDocked () const |
bool | IsPositioned () |
void | SetVisible (bool bVisible) |
void | SetPositioned () |
virtual int | GetInitialWidth () |
Resizable toolbars should implement these. More... | |
virtual int | GetMinToolbarWidth () |
virtual wxSize | GetDockedSize () |
wxSize | GetSmartDockedSize () |
virtual void | ResizingDone () |
Public Member Functions inherited from wxPanelWrapper | |
wxPanelWrapper () | |
wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) | |
bool | Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) |
void | SetLabel (const TranslatableString &label) |
void | SetName (const TranslatableString &name) |
void | SetToolTip (const TranslatableString &toolTip) |
void | SetName () |
Public Member Functions inherited from wxTabTraversalWrapper< wxPanel > | |
wxTabTraversalWrapper (Args &&... args) | |
wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete | |
wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Static Public Member Functions | |
static MixerToolBar & | Get (AudacityProject &project) |
static const MixerToolBar & | Get (const AudacityProject &project) |
Static Public Member Functions inherited from ToolBar | |
static AButton * | MakeButton (wxWindow *parent, teBmps eUp, teBmps eDown, teBmps eHilite, teBmps eDownHi, teBmps eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxWindowID id, wxPoint placement, bool processdownevents, wxSize size) |
static AButton * | MakeButton (ToolBar *parent, teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled, int id, bool processdownevents, const TranslatableString &label) |
static void | MakeAlternateImages (AButton &button, int idx, teBmps eUp, teBmps eDown, teBmps eHilite, teBmps eDownHi, teBmps eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxSize size) |
static void | SetButtonToolTip (AudacityProject &project, AButton &button, const ComponentInterfaceSymbol commands[], size_t nCommands) |
static void | MakeButtonBackgroundsSmall () |
static void | MakeButtonBackgroundsLarge () |
Protected Attributes | |
float | mInputSliderVolume |
float | mOutputSliderVolume |
Protected Attributes inherited from ToolBar | |
AudacityProject & | mProject |
TranslatableString | mLabel |
wxString | mSection |
int | mType |
Private Member Functions | |
void | InitializeMixerToolBar () |
void | SetToolTips () |
Private Attributes | |
Observer::Subscription | mSubscription |
ASlider * | mInputSlider |
ASlider * | mOutputSlider |
bool | mEnabled |
Additional Inherited Members | |
Public Types inherited from ToolBar | |
using | Holder = wxWindowPtr< ToolBar > |
Protected Member Functions inherited from ToolBar | |
void | SetButton (bool down, AButton *button) |
wxBoxSizer * | GetSizer () |
void | Add (wxWindow *window, int proportion=0, int flag=wxALIGN_TOP, int border=0, wxObject *userData=NULL) |
void | Add (wxSizer *sizer, int proportion=0, int flag=0, int border=0, wxObject *userData=NULL) |
void | Add (int width, int height, int proportion=0, int flag=0, int border=0, wxObject *userData=NULL) |
void | AddSpacer (int size=14) |
void | AddStretchSpacer (int prop=1) |
void | Detach (wxWindow *window) |
void | Detach (wxSizer *sizer) |
void | Updated () |
int | GetResizeGrabberWidth () |
Returns the width in pixels of the resizer element. More... | |
virtual void | Populate ()=0 |
virtual void | Repaint (wxDC *dc)=0 |
void | OnErase (wxEraseEvent &event) |
void | OnPaint (wxPaintEvent &event) |
void | OnMouseEvents (wxMouseEvent &event) |
Protected Member Functions inherited from PrefsListener | |
virtual void | UpdateSelectedPrefs (int id) |
PrefsListener () | |
virtual | ~PrefsListener () |
virtual void | UpdatePrefs ()=0 |
Static Protected Member Functions inherited from ToolBar | |
static void | MakeMacRecoloredImage (teBmps eBmpOut, teBmps eBmpIn) |
static void | MakeMacRecoloredImageSize (teBmps eBmpOut, teBmps eBmpIn, const wxSize &size) |
static void | MakeRecoloredImage (teBmps eBmpOut, teBmps eBmpIn) |
static void | MakeRecoloredImageSize (teBmps eBmpOut, teBmps eBmpIn, const wxSize &size) |
Static Protected Member Functions inherited from PrefsListener | |
static void | Broadcast (int id=0) |
Call this static function to notify all PrefsListener objects. More... | |
A ToolBar that provides the record and playback volume settings.
Definition at line 24 of file MixerToolBar.h.
MixerToolBar::MixerToolBar | ( | AudacityProject & | project | ) |
Methods for MixerToolBar.
Definition at line 58 of file MixerToolBar.cpp.
|
virtual |
Definition at line 66 of file MixerToolBar.cpp.
void MixerToolBar::AdjustInputGain | ( | int | adj | ) |
Definition at line 296 of file MixerToolBar.cpp.
References ASlider::Decrease(), ASlider::Increase(), mInputSlider, SetMixer(), and UpdateControls().
void MixerToolBar::AdjustOutputGain | ( | int | adj | ) |
Definition at line 283 of file MixerToolBar.cpp.
References ASlider::Decrease(), ASlider::Increase(), mOutputSlider, SetMixer(), and UpdateControls().
|
overridevirtual |
Reimplemented from ToolBar.
Definition at line 81 of file MixerToolBar.cpp.
References ToolBar::Create(), and UpdatePrefs().
|
inlineoverridevirtual |
|
static |
Definition at line 70 of file MixerToolBar.cpp.
References ToolManager::Get(), and MixerBarID.
Referenced by Get(), ExtraActions::Handler::OnInputGain(), ExtraActions::Handler::OnInputGainDec(), ExtraActions::Handler::OnInputGainInc(), ExtraActions::Handler::OnOutputGain(), ExtraActions::Handler::OnOutputGainDec(), ExtraActions::Handler::OnOutputGainInc(), and ProjectManager::OnTimer().
|
static |
Definition at line 76 of file MixerToolBar.cpp.
References Get().
|
inlineoverridevirtual |
Resizable toolbars should implement these.
Reimplemented from ToolBar.
Definition at line 44 of file MixerToolBar.h.
|
inlineoverridevirtual |
|
private |
void MixerToolBar::OnAudioCapture | ( | AudioIOEvent | event | ) |
Definition at line 138 of file MixerToolBar.cpp.
References AudioIOEvent::CAPTURE, ASlider::Enable(), mEnabled, mInputSlider, mOutputSlider, ToolBar::mProject, AudioIOEvent::pProject, and AudioIOEvent::type.
Referenced by Populate().
void MixerToolBar::OnCaptureKey | ( | wxCommandEvent & | event | ) |
Definition at line 154 of file MixerToolBar.cpp.
References mInputSlider, and mOutputSlider.
void MixerToolBar::OnFocus | ( | wxFocusEvent & | event | ) |
Definition at line 149 of file MixerToolBar.cpp.
References KeyboardCapture::OnFocus().
Referenced by Populate().
void MixerToolBar::OnSlider | ( | wxCommandEvent & | event | ) |
|
overridevirtual |
Implements ToolBar.
Definition at line 87 of file MixerToolBar.cpp.
References ToolBar::Add(), ThemeBase::Bitmap(), ThemeBase::Colour(), ASlider::Enable(), AudioIO::Get(), ASlider::Options::Line(), mEnabled, mInputSlider, mOutputSlider, mSubscription, OnAudioCapture(), OnFocus(), safenew, Observer::Publisher< Message, NotifyAll >::Subscribe(), theTheme, UpdateControls(), and XO.
|
inlineoverridevirtual |
Implements ToolBar.
Definition at line 59 of file MixerToolBar.h.
Referenced by UpdatePrefs().
|
inlineoverride |
Definition at line 41 of file MixerToolBar.h.
void MixerToolBar::SetMixer | ( | wxCommandEvent & | event | ) |
Definition at line 250 of file MixerToolBar.cpp.
References AudioIO::Get(), ASlider::Get(), mInputSlider, mInputSliderVolume, mOutputSlider, mOutputSliderVolume, and SetToolTips().
Referenced by AdjustInputGain(), AdjustOutputGain(), ShowInputGainDialog(), and ShowOutputGainDialog().
|
private |
Definition at line 309 of file MixerToolBar.cpp.
References format, ASlider::IsEnabled(), mInputSlider, mOutputSlider, ASlider::SetToolTipTemplate(), and XO.
Referenced by SetMixer(), and UpdateControls().
void MixerToolBar::ShowInputGainDialog | ( | ) |
Definition at line 275 of file MixerToolBar.cpp.
References mInputSlider, SetMixer(), ASlider::ShowDialog(), and UpdateControls().
void MixerToolBar::ShowOutputGainDialog | ( | ) |
Definition at line 267 of file MixerToolBar.cpp.
References mOutputSlider, SetMixer(), ASlider::ShowDialog(), and UpdateControls().
void MixerToolBar::UpdateControls | ( | ) |
Definition at line 223 of file MixerToolBar.cpp.
References ASlider::Enable(), AudioIO::Get(), ASlider::Get(), mEnabled, mInputSlider, mInputSliderVolume, mOutputSlider, mOutputSliderVolume, ASlider::Set(), and SetToolTips().
Referenced by AdjustInputGain(), AdjustOutputGain(), Populate(), ShowInputGainDialog(), and ShowOutputGainDialog().
|
overridevirtual |
Implements PrefsListener.
Definition at line 176 of file MixerToolBar.cpp.
References ASlider::Enable(), AudioIO::Get(), mEnabled, mInputSlider, RegenerateTooltips(), ToolBar::SetLabel(), ToolBar::Updated(), ToolBar::UpdatePrefs(), and XO.
Referenced by Create().
|
private |
Definition at line 74 of file MixerToolBar.h.
Referenced by OnAudioCapture(), Populate(), UpdateControls(), and UpdatePrefs().
|
private |
Definition at line 72 of file MixerToolBar.h.
Referenced by AdjustInputGain(), OnAudioCapture(), OnCaptureKey(), Populate(), SetMixer(), SetToolTips(), ShowInputGainDialog(), UpdateControls(), and UpdatePrefs().
|
protected |
Definition at line 62 of file MixerToolBar.h.
Referenced by SetMixer(), and UpdateControls().
|
private |
Definition at line 73 of file MixerToolBar.h.
Referenced by AdjustOutputGain(), OnAudioCapture(), OnCaptureKey(), Populate(), SetMixer(), SetToolTips(), ShowOutputGainDialog(), and UpdateControls().
|
protected |
Definition at line 63 of file MixerToolBar.h.
Referenced by SetMixer(), and UpdateControls().
|
private |
Definition at line 70 of file MixerToolBar.h.
Referenced by Populate().