Audacity  2.2.0
SliderHandle Class Referenceabstract

#include <SliderHandle.h>

Inheritance diagram for SliderHandle:
UIHandle GainSliderHandle PanSliderHandle

Public Types

using SliderFn = LWSlider *(*)(AudacityProject *, const wxRect &, Track *)
 
- Public Types inherited from UIHandle
enum  DrawingPass { Cells, Panel }
 
using Result = unsigned
 
using Cell = TrackPanelCell
 

Public Member Functions

 SliderHandle (SliderFn sliderFn, const wxRect &rect, const std::shared_ptr< Track > &pTrack)
 
SliderHandleoperator= (const SliderHandle &)=default
 
std::shared_ptr< TrackGetTrack () const
 
bool IsClicked () const
 
- Public Member Functions inherited from UIHandle
virtual ~UIHandle ()=0
 
virtual bool HasRotation () const
 
virtual bool Rotate (bool forward)
 
virtual bool HasEscape () const
 
virtual bool Escape ()
 
virtual void DrawExtras (DrawingPass pass, wxDC *dc, const wxRegion &updateRegion, const wxRect &panelRect)
 
virtual bool StopsOnKeystroke ()
 
virtual void OnProjectChange (AudacityProject *pProject)
 
Result GetChangeHighlight () const
 
void SetChangeHighlight (Result val)
 

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
 
void Enter (bool forward) override
 
Result Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) finaloverride
 
Result Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) finaloverride
 
HitTestPreview Preview (const TrackPanelMouseState &state, const AudacityProject *pProject) finaloverride
 
Result Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) finaloverride
 
Result Cancel (AudacityProject *pProject) finaloverride
 
LWSliderGetSlider (AudacityProject *pProject)
 

Protected Attributes

std::weak_ptr< TrackmpTrack
 
wxRect mRect {}
 
SliderFn mSliderFn
 
float mStartingValue {}
 
bool mIsClicked {}
 
- Protected Attributes inherited from UIHandle
Result mChangeHighlight { 0 }
 

Private Member Functions

 SliderHandle (const SliderHandle &)=delete
 

Additional Inherited Members

- Static Public Member Functions inherited from UIHandle
static UIHandle::Result NeedChangeHighlight (const UIHandle &, const UIHandle &)
 

Member Typedef Documentation

using SliderHandle::SliderFn = LWSlider *(*)( AudacityProject*, const wxRect&, Track* )

Constructor & Destructor Documentation

SliderHandle::SliderHandle ( const SliderHandle )
privatedelete
SliderHandle::SliderHandle ( SliderFn  sliderFn,
const wxRect &  rect,
const std::shared_ptr< Track > &  pTrack 
)
explicit
SliderHandle::~SliderHandle ( )
protectedvirtual

Member Function Documentation

UIHandle::Result SliderHandle::Cancel ( AudacityProject pProject)
finaloverrideprotectedvirtual
UIHandle::Result SliderHandle::Click ( const TrackPanelMouseEvent event,
AudacityProject pProject 
)
finaloverrideprotectedvirtual
virtual Result SliderHandle::CommitChanges ( const wxMouseEvent &  event,
AudacityProject pProject 
)
protectedpure virtual

Implemented in PanSliderHandle, and GainSliderHandle.

UIHandle::Result SliderHandle::Drag ( const TrackPanelMouseEvent event,
AudacityProject pProject 
)
finaloverrideprotectedvirtual
void SliderHandle::Enter ( bool  forward)
overrideprotectedvirtual

Reimplemented from UIHandle.

References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.

LWSlider * SliderHandle::GetSlider ( AudacityProject pProject)
protected
std::shared_ptr<Track> SliderHandle::GetTrack ( ) const
inline

References mpTrack.

virtual float SliderHandle::GetValue ( )
protectedpure virtual

Implemented in PanSliderHandle, and GainSliderHandle.

bool SliderHandle::IsClicked ( ) const
inline

References mIsClicked.

SliderHandle& SliderHandle::operator= ( const SliderHandle )
default
HitTestPreview SliderHandle::Preview ( const TrackPanelMouseState state,
const AudacityProject pProject 
)
finaloverrideprotectedvirtual

Implements UIHandle.

UIHandle::Result SliderHandle::Release ( const TrackPanelMouseEvent event,
AudacityProject pProject,
wxWindow *  pParent 
)
finaloverrideprotectedvirtual
virtual Result SliderHandle::SetValue ( AudacityProject pProject,
float  newValue 
)
protectedpure virtual

Implemented in PanSliderHandle, and GainSliderHandle.

Referenced by Cancel().

Member Data Documentation

bool SliderHandle::mIsClicked {}
protected

Referenced by IsClicked().

wxRect SliderHandle::mRect {}
protected

Referenced by GetSlider().

SliderFn SliderHandle::mSliderFn
protected

Referenced by GetSlider().

float SliderHandle::mStartingValue {}
protected

Referenced by Cancel().


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