![]() |
Audacity 3.2.0
|
#include <SliderHandle.h>
Public Types | |
using | SliderFn = LWSlider *(*)(AudacityProject *, const wxRect &, Track *) |
![]() | |
using | Result = unsigned |
using | Cell = TrackPanelCell |
Public Member Functions | |
SliderHandle (SliderFn sliderFn, const wxRect &rect, const std::shared_ptr< Track > &pTrack) | |
SliderHandle & | operator= (const SliderHandle &)=default |
std::shared_ptr< Track > | GetTrack () const |
bool | IsClicked () const |
![]() | |
virtual | ~UIHandle ()=0 |
virtual void | Enter (bool forward, AudacityProject *pProject) |
virtual bool | HasRotation () const |
virtual bool | Rotate (bool forward) |
virtual bool | HasEscape (AudacityProject *pProject) const |
virtual bool | Escape (AudacityProject *pProject) |
virtual bool | HandlesRightClick () |
Whether the handle has any special right-button handling. More... | |
virtual Result | Click (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0 |
virtual Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0 |
virtual HitTestPreview | Preview (const TrackPanelMouseState &state, AudacityProject *pProject)=0 |
virtual Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent)=0 |
virtual Result | Cancel (AudacityProject *pProject)=0 |
virtual bool | StopsOnKeystroke () |
virtual void | OnProjectChange (AudacityProject *pProject) |
Result | GetChangeHighlight () const |
void | SetChangeHighlight (Result val) |
![]() | |
virtual | ~TrackPanelDrawable ()=0 |
virtual void | Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) |
virtual wxRect | DrawingArea (TrackPanelDrawingContext &context, const wxRect &rect, const wxRect &panelRect, unsigned iPass) |
Protected Member Functions | |
virtual | ~SliderHandle () |
virtual float | GetValue ()=0 |
virtual Result | SetValue (AudacityProject *pProject, float newValue)=0 |
virtual Result | CommitChanges (const wxMouseEvent &event, AudacityProject *pProject)=0 |
virtual TranslatableString | Tip (const wxMouseState &state, AudacityProject &project) const =0 |
void | Enter (bool forward, AudacityProject *) override |
Result | Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) final override |
Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) final override |
HitTestPreview | Preview (const TrackPanelMouseState &state, AudacityProject *pProject) final override |
Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) final override |
Result | Cancel (AudacityProject *pProject) final override |
LWSlider * | GetSlider (AudacityProject *pProject) |
Protected Attributes | |
std::weak_ptr< Track > | mpTrack |
wxRect | mRect {} |
SliderFn | mSliderFn |
float | mStartingValue {} |
bool | mIsClicked {} |
![]() | |
Result | mChangeHighlight { 0 } |
Private Member Functions | |
SliderHandle (const SliderHandle &)=delete | |
Additional Inherited Members | |
![]() | |
static UIHandle::Result | NeedChangeHighlight (const UIHandle &, const UIHandle &) |
![]() | |
static wxRect | MaximizeWidth (const wxRect &rect, const wxRect &panelRect) |
static wxRect | MaximizeHeight (const wxRect &rect, const wxRect &panelRect) |
Definition at line 22 of file SliderHandle.h.
using SliderHandle::SliderFn = LWSlider *(*)( AudacityProject*, const wxRect&, Track* ) |
Definition at line 27 of file SliderHandle.h.
|
privatedelete |
|
explicit |
Definition at line 20 of file SliderHandle.cpp.
|
protectedvirtual |
Definition at line 33 of file SliderHandle.cpp.
|
finaloverrideprotectedvirtual |
Implements UIHandle.
Definition at line 105 of file SliderHandle.cpp.
References GetSlider(), mpTrack, mStartingValue, LWSlider::OnMouseEvent(), RefreshCode::RefreshCell, and SetValue().
|
finaloverrideprotectedvirtual |
Implements UIHandle.
Definition at line 37 of file SliderHandle.cpp.
References RefreshCode::Cancelled, TrackPanelMouseEvent::event, GetSlider(), GetValue(), mIsClicked, mStartingValue, RefreshCode::RefreshCell, and SetValue().
|
protectedpure virtual |
Implemented in GainSliderHandle, and PanSliderHandle.
Referenced by Release().
|
finaloverrideprotectedvirtual |
Implements UIHandle.
Definition at line 64 of file SliderHandle.cpp.
References TrackPanelMouseEvent::event, LWSlider::Get(), GetSlider(), LWSlider::OnMouseEvent(), RefreshCode::RefreshCell, and SetValue().
|
overrideprotectedvirtual |
Reimplemented from UIHandle.
Definition at line 28 of file SliderHandle.cpp.
References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.
|
protected |
Definition at line 116 of file SliderHandle.cpp.
References TrackList::Get(), TrackList::Lock(), mpTrack, mRect, and mSliderFn.
Referenced by Cancel(), Click(), Drag(), and Release().
|
inline |
Definition at line 35 of file SliderHandle.h.
|
protectedpure virtual |
Implemented in GainSliderHandle, and PanSliderHandle.
Referenced by Click().
|
inline |
Definition at line 36 of file SliderHandle.h.
|
default |
|
finaloverrideprotectedvirtual |
Implements UIHandle.
Definition at line 76 of file SliderHandle.cpp.
References TrackPanelMouseState::state, and Tip().
|
finaloverrideprotectedvirtual |
Implements UIHandle.
Definition at line 86 of file SliderHandle.cpp.
References CommitChanges(), TrackPanelMouseEvent::event, LWSlider::Get(), GetSlider(), mpTrack, LWSlider::OnMouseEvent(), RefreshCode::RefreshCell, and SetValue().
|
protectedpure virtual |
Implemented in GainSliderHandle, and PanSliderHandle.
Referenced by Cancel(), Click(), Drag(), and Release().
|
protectedpure virtual |
Implemented in GainSliderHandle, and PanSliderHandle.
Referenced by Preview().
|
protected |
Definition at line 82 of file SliderHandle.h.
Referenced by Click().
|
protected |
Definition at line 75 of file SliderHandle.h.
Referenced by Cancel(), GetSlider(), GainSliderHandle::GetWaveTrack(), PanSliderHandle::GetWaveTrack(), and Release().
|
protected |
Definition at line 76 of file SliderHandle.h.
Referenced by GetSlider().
|
protected |
Definition at line 77 of file SliderHandle.h.
Referenced by GetSlider().
|
protected |
Definition at line 80 of file SliderHandle.h.