Audacity  2.2.0
TrackSelectHandle Class Referencefinal

#include <TrackSelectHandle.h>

Inheritance diagram for TrackSelectHandle:
UIHandle

Public Member Functions

 TrackSelectHandle (const std::shared_ptr< Track > &pTrack)
 
TrackSelectHandleoperator= (const TrackSelectHandle &)=default
 
virtual ~TrackSelectHandle ()
 
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 *) override
 
bool StopsOnKeystroke () override
 
- Public Member Functions inherited from UIHandle
virtual ~UIHandle ()=0
 
virtual void Enter (bool forward)
 
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< TrackSelectHandle > &holder, const std::shared_ptr< Track > &pTrack)
 
- Static Public Member Functions inherited from UIHandle
static UIHandle::Result NeedChangeHighlight (const UIHandle &, const UIHandle &)
 

Private Member Functions

 TrackSelectHandle (const TrackSelectHandle &)=delete
 
void CalculateRearrangingThresholds (const wxMouseEvent &event)
 

Private Attributes

std::shared_ptr< TrackmpTrack
 
bool mClicked {}
 
int mMoveUpThreshold {}
 
int mMoveDownThreshold {}
 
int mRearrangeCount {}
 

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

TrackSelectHandle::TrackSelectHandle ( const TrackSelectHandle )
privatedelete
TrackSelectHandle::TrackSelectHandle ( const std::shared_ptr< Track > &  pTrack)
explicit
TrackSelectHandle::~TrackSelectHandle ( )
virtual

Member Function Documentation

void TrackSelectHandle::CalculateRearrangingThresholds ( const wxMouseEvent &  event)
private

Figure out how far the user must drag the mouse up or down before the track will swap with the one above or below

References TrackList::CanMoveDown(), TrackList::CanMoveUp(), GetActiveProject(), TrackList::GetGroupHeight(), TrackList::GetNext(), TrackList::GetPrev(), AudacityProject::GetTracks(), mMoveDownThreshold, mMoveUpThreshold, and mpTrack.

UIHandle::Result TrackSelectHandle::Cancel ( AudacityProject pProject)
overridevirtual
UIHandlePtr TrackSelectHandle::HitAnywhere ( std::weak_ptr< TrackSelectHandle > &  holder,
const std::shared_ptr< Track > &  pTrack 
)
static

References AssignUIHandlePtr().

Referenced by TrackControls::HitTest().

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

Reimplemented from UIHandle.

Member Data Documentation

bool TrackSelectHandle::mClicked {}
private
int TrackSelectHandle::mMoveDownThreshold {}
private
int TrackSelectHandle::mMoveUpThreshold {}
private
std::shared_ptr<Track> TrackSelectHandle::mpTrack
private
int TrackSelectHandle::mRearrangeCount {}
private

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