Audacity  2.2.0
SampleHandle Class Referencefinal

#include <SampleHandle.h>

Inheritance diagram for SampleHandle:
UIHandle

Public Member Functions

 SampleHandle (const std::shared_ptr< WaveTrack > &pTrack)
 
SampleHandleoperator= (const SampleHandle &)=default
 
virtual ~SampleHandle ()
 
std::shared_ptr< WaveTrackGetTrack () const
 
void Enter (bool forward) override
 
Result Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
Result Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
HitTestPreview Preview (const TrackPanelMouseState &state, const AudacityProject *pProject) override
 
Result Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override
 
Result Cancel (AudacityProject *pProject) override
 
bool StopsOnKeystroke () override
 
- 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 void OnProjectChange (AudacityProject *pProject)
 
Result GetChangeHighlight () const
 
void SetChangeHighlight (Result val)
 

Static Public Member Functions

static UIHandlePtr HitAnywhere (std::weak_ptr< SampleHandle > &holder, const wxMouseState &state, const std::shared_ptr< WaveTrack > &pTrack)
 
static UIHandlePtr HitTest (std::weak_ptr< SampleHandle > &holder, const wxMouseState &state, const wxRect &rect, const AudacityProject *pProject, const std::shared_ptr< WaveTrack > &pTrack)
 
- Static Public Member Functions inherited from UIHandle
static UIHandle::Result NeedChangeHighlight (const UIHandle &, const UIHandle &)
 

Private Member Functions

 SampleHandle (const SampleHandle &)=delete
 
float FindSampleEditingLevel (const wxMouseEvent &event, const ViewInfo &viewInfo, double t0)
 

Static Private Member Functions

static HitTestPreview HitPreview (const wxMouseState &state, const AudacityProject *pProject, bool unsafe)
 

Private Attributes

std::shared_ptr< WaveTrackmClickedTrack
 
wxRect mRect {}
 
sampleCount mClickedStartSample {}
 
sampleCount mLastDragSample {}
 
float mLastDragSampleValue {}
 
bool mAltKey {}
 

Additional Inherited Members

- Public Types inherited from UIHandle
enum  DrawingPass { Cells, Panel }
 
using Result = unsigned
 
using Cell = TrackPanelCell
 
- Protected Attributes inherited from UIHandle
Result mChangeHighlight { 0 }
 

Constructor & Destructor Documentation

SampleHandle::SampleHandle ( const SampleHandle )
privatedelete
SampleHandle::SampleHandle ( const std::shared_ptr< WaveTrack > &  pTrack)
explicit
SampleHandle::~SampleHandle ( )
virtual

Member Function Documentation

UIHandle::Result SampleHandle::Cancel ( AudacityProject pProject)
overridevirtual
UIHandle::Result SampleHandle::Click ( const TrackPanelMouseEvent event,
AudacityProject pProject 
)
overridevirtual
void SampleHandle::Enter ( bool  forward)
overridevirtual

Reimplemented from UIHandle.

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

float SampleHandle::FindSampleEditingLevel ( const wxMouseEvent &  event,
const ViewInfo viewInfo,
double  t0 
)
private
std::shared_ptr<WaveTrack> SampleHandle::GetTrack ( ) const
inline

References mClickedTrack.

Referenced by TrackArtist::DrawClipWaveform().

UIHandlePtr SampleHandle::HitAnywhere ( std::weak_ptr< SampleHandle > &  holder,
const wxMouseState &  state,
const std::shared_ptr< WaveTrack > &  pTrack 
)
static
HitTestPreview SampleHandle::HitPreview ( const wxMouseState &  state,
const AudacityProject pProject,
bool  unsafe 
)
staticprivate
SampleHandle& SampleHandle::operator= ( const SampleHandle )
default
HitTestPreview SampleHandle::Preview ( const TrackPanelMouseState state,
const AudacityProject pProject 
)
overridevirtual
UIHandle::Result SampleHandle::Release ( const TrackPanelMouseEvent event,
AudacityProject pProject,
wxWindow *  pParent 
)
overridevirtual
bool SampleHandle::StopsOnKeystroke ( )
inlineoverridevirtual

Reimplemented from UIHandle.

Member Data Documentation

bool SampleHandle::mAltKey {}
private
sampleCount SampleHandle::mClickedStartSample {}
private
std::shared_ptr<WaveTrack> SampleHandle::mClickedTrack
private

Referenced by GetTrack().

sampleCount SampleHandle::mLastDragSample {}
private
float SampleHandle::mLastDragSampleValue {}
private
wxRect SampleHandle::mRect {}
private

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