Audacity 3.2.0
Public Member Functions | Protected Attributes | List of all members
MixerTrackSlider Class Referencefinal

#include <MixerBoard.h>

Inheritance diagram for MixerTrackSlider:
[legend]
Collaboration diagram for MixerTrackSlider:
[legend]

Public Member Functions

 MixerTrackSlider (wxWindow *parent, wxWindowID id, const TranslatableString &name, const wxPoint &pos, const wxSize &size, const ASlider::Options &options=ASlider::Options{})
 
virtual ~MixerTrackSlider ()
 
void OnMouseEvent (wxMouseEvent &event)
 
void OnFocus (wxFocusEvent &event)
 
void OnCaptureKey (wxCommandEvent &event)
 
- Public Member Functions inherited from ASlider
 ASlider (wxWindow *parent, wxWindowID id, const TranslatableString &name, const wxPoint &pos, const wxSize &size, const Options &options=Options{})
 
virtual ~ASlider ()
 
bool AcceptsFocus () const override
 
bool AcceptsFocusFromKeyboard () const override
 
void SetFocusFromKbd () override
 
bool SetBackgroundColour (const wxColour &colour) override
 
void GetScroll (float &line, float &page)
 
void SetScroll (float line, float page)
 
void SetToolTipTemplate (const TranslatableString &tip)
 
float Get (bool convert=true)
 
void Set (float value)
 
void Increase (float steps)
 
void Decrease (float steps)
 
bool ShowDialog (wxPoint pos=wxPoint(-1, -1))
 
void SetSpeed (float speed)
 
void OnErase (wxEraseEvent &event)
 
void OnPaint (wxPaintEvent &event)
 
void OnSize (wxSizeEvent &event)
 
void OnMouseEvent (wxMouseEvent &event)
 
void OnCaptureLost (wxMouseCaptureLostEvent &event)
 
void OnKeyDown (wxKeyEvent &event)
 
void OnSlider (wxCommandEvent &event)
 
void OnSetFocus (wxFocusEvent &event)
 
void OnKillFocus (wxFocusEvent &event)
 
void OnTimer (wxTimerEvent &event)
 
bool Enable (bool enable=true) override
 
bool IsEnabled () const
 

Protected Attributes

bool mIsPan
 
- Protected Attributes inherited from ASlider
int mStyle
 

Additional Inherited Members

- Static Public Member Functions inherited from ASlider
static TempAllowFocus TemporarilyAllowFocus ()
 

Detailed Description

Definition at line 43 of file MixerBoard.h.

Constructor & Destructor Documentation

◆ MixerTrackSlider()

MixerTrackSlider::MixerTrackSlider ( wxWindow *  parent,
wxWindowID  id,
const TranslatableString name,
const wxPoint &  pos,
const wxSize &  size,
const ASlider::Options options = ASlider::Options{} 
)

Definition at line 84 of file MixerBoard.cpp.

90: ASlider(parent, id, name, pos, size, options)
91{
92}
const TranslatableString name
Definition: Distortion.cpp:76
ASlider(wxWindow *parent, wxWindowID id, const TranslatableString &name, const wxPoint &pos, const wxSize &size, const Options &options=Options{})
Definition: ASlider.cpp:1681

◆ ~MixerTrackSlider()

virtual MixerTrackSlider::~MixerTrackSlider ( )
inlinevirtual

Definition at line 52 of file MixerBoard.h.

52{}

Member Function Documentation

◆ OnCaptureKey()

void MixerTrackSlider::OnCaptureKey ( wxCommandEvent &  event)

Definition at line 115 of file MixerBoard.cpp.

116{
117 wxKeyEvent *kevent = (wxKeyEvent *)event.GetEventObject();
118 int keyCode = kevent->GetKeyCode();
119
120 // Pass LEFT/RIGHT/UP/DOWN/PAGEUP/PAGEDOWN through for input/output sliders
121 if (keyCode == WXK_LEFT || keyCode == WXK_RIGHT ||
122 keyCode == WXK_UP || keyCode == WXK_DOWN ||
123 keyCode == WXK_PAGEUP || keyCode == WXK_PAGEDOWN) {
124 return;
125 }
126
127 event.Skip();
128
129 return;
130}

◆ OnFocus()

void MixerTrackSlider::OnFocus ( wxFocusEvent &  event)

Definition at line 110 of file MixerBoard.cpp.

111{
112 KeyboardCapture::OnFocus( *this, event );
113}
void OnFocus(wxWindow &window, wxFocusEvent &event)
a function useful to implement a focus event handler The window releases the keyboard if the event is...

References KeyboardCapture::OnFocus().

Here is the call graph for this function:

◆ OnMouseEvent()

void MixerTrackSlider::OnMouseEvent ( wxMouseEvent &  event)

Definition at line 94 of file MixerBoard.cpp.

95{
97
98 if (event.ButtonUp())
99 {
100 MixerTrackCluster* pMixerTrackCluster = (MixerTrackCluster*)(this->GetParent());
101 switch (mStyle)
102 {
103 case DB_SLIDER: pMixerTrackCluster->HandleSliderGain(true); break;
104 case PAN_SLIDER: pMixerTrackCluster->HandleSliderPan(true); break;
105 default: break; // no-op
106 }
107 }
108}
#define DB_SLIDER
Definition: ASlider.h:33
#define PAN_SLIDER
Definition: ASlider.h:34
int mStyle
Definition: ASlider.h:353
void OnMouseEvent(wxMouseEvent &event)
Definition: ASlider.cpp:1785
void HandleSliderGain(const bool bWantPushState=false)
Definition: MixerBoard.cpp:410
void HandleSliderPan(const bool bWantPushState=false)
Definition: MixerBoard.cpp:439

References DB_SLIDER, MixerTrackCluster::HandleSliderGain(), MixerTrackCluster::HandleSliderPan(), ASlider::mStyle, ASlider::OnMouseEvent(), and PAN_SLIDER.

Here is the call graph for this function:

Member Data Documentation

◆ mIsPan

bool MixerTrackSlider::mIsPan
protected

Definition at line 60 of file MixerBoard.h.


The documentation for this class was generated from the following files: