Audacity  2.2.0
CutlineHandle Class Referencefinal

#include <CutlineHandle.h>

Inheritance diagram for CutlineHandle:
UIHandle

Public Member Functions

 CutlineHandle (const std::shared_ptr< WaveTrack > &pTrack, WaveTrackLocation location)
 
CutlineHandleoperator= (const CutlineHandle &)=default
 
virtual ~CutlineHandle ()
 
const WaveTrackLocationGetLocation ()
 
std::shared_ptr< WaveTrackGetTrack ()
 
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 (const AudacityProject *pProject, bool cutline, UIHandlePtr ptr)
 
static UIHandlePtr HitTest (std::weak_ptr< CutlineHandle > &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 Types

enum  Operation { Merge, Expand, Remove }
 

Private Member Functions

 CutlineHandle (const CutlineHandle &)=delete
 

Static Private Member Functions

static HitTestPreview HitPreview (bool cutline, bool unsafe)
 

Private Attributes

Operation mOperation { Merge }
 
double mStartTime {}
 
double mEndTime {}
 
WaveTrackLocation mLocation {}
 
std::shared_ptr< WaveTrackmpTrack {}
 

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 }
 

Member Enumeration Documentation

Enumerator
Merge 
Expand 
Remove 

Constructor & Destructor Documentation

CutlineHandle::CutlineHandle ( const CutlineHandle )
privatedelete
CutlineHandle::CutlineHandle ( const std::shared_ptr< WaveTrack > &  pTrack,
WaveTrackLocation  location 
)
explicit
CutlineHandle::~CutlineHandle ( )
virtual

Member Function Documentation

UIHandle::Result CutlineHandle::Drag ( const TrackPanelMouseEvent event,
AudacityProject pProject 
)
overridevirtual

Implements UIHandle.

References RefreshCode::RefreshNone.

void CutlineHandle::Enter ( bool  forward)
overridevirtual

Reimplemented from UIHandle.

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

const WaveTrackLocation& CutlineHandle::GetLocation ( )
inline

References mLocation.

std::shared_ptr<WaveTrack> CutlineHandle::GetTrack ( )
inline

References mpTrack.

Referenced by TrackArtist::DrawWaveform().

static UIHandlePtr CutlineHandle::HitAnywhere ( const AudacityProject pProject,
bool  cutline,
UIHandlePtr  ptr 
)
static
HitTestPreview CutlineHandle::HitPreview ( bool  cutline,
bool  unsafe 
)
staticprivate

References _(), and MakeCursor().

UIHandlePtr CutlineHandle::HitTest ( std::weak_ptr< CutlineHandle > &  holder,
const wxMouseState &  state,
const wxRect &  rect,
const AudacityProject pProject,
const std::shared_ptr< WaveTrack > &  pTrack 
)
static

method that tells us if the mouse event landed on an editable Cutline

References AssignUIHandlePtr(), AudacityProject::GetViewInfo(), and Track::Wave.

Referenced by WaveTrack::DetailedHitTest().

CutlineHandle& CutlineHandle::operator= ( const CutlineHandle )
default
HitTestPreview CutlineHandle::Preview ( const TrackPanelMouseState state,
const AudacityProject pProject 
)
overridevirtual
UIHandle::Result CutlineHandle::Release ( const TrackPanelMouseEvent event,
AudacityProject pProject,
wxWindow *  pParent 
)
overridevirtual
bool CutlineHandle::StopsOnKeystroke ( )
inlineoverridevirtual

Reimplemented from UIHandle.

Member Data Documentation

double CutlineHandle::mEndTime {}
private

Referenced by Cancel().

WaveTrackLocation CutlineHandle::mLocation {}
private

Referenced by GetLocation().

Operation CutlineHandle::mOperation { Merge }
private

Referenced by Cancel().

std::shared_ptr<WaveTrack> CutlineHandle::mpTrack {}
private

Referenced by GetTrack().

double CutlineHandle::mStartTime {}
private

Referenced by Cancel().


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