Audacity  2.2.0
TimeShiftHandle Class Referencefinal

#include <TimeShiftHandle.h>

Inheritance diagram for TimeShiftHandle:
UIHandle

Public Member Functions

 TimeShiftHandle (const std::shared_ptr< Track > &pTrack, bool gripHit)
 
TimeShiftHandleoperator= (const TimeShiftHandle &)=default
 
bool IsGripHit () const
 
std::shared_ptr< TrackGetTrack () const
 
virtual ~TimeShiftHandle ()
 
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
 
void DrawExtras (DrawingPass pass, wxDC *dc, const wxRegion &, const wxRect &panelRect) 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 OnProjectChange (AudacityProject *pProject)
 
Result GetChangeHighlight () const
 
void SetChangeHighlight (Result val)
 

Static Public Member Functions

static void CreateListOfCapturedClips (ClipMoveState &state, const ViewInfo &viewInfo, Track &capturedTrack, TrackList &trackList, bool syncLocked, double clickTime)
 
static void DoSlideHorizontal (ClipMoveState &state, TrackList &trackList, Track &capturedTrack)
 
static UIHandlePtr HitAnywhere (std::weak_ptr< TimeShiftHandle > &holder, const std::shared_ptr< Track > &pTrack, bool gripHit)
 
static UIHandlePtr HitTest (std::weak_ptr< TimeShiftHandle > &holder, const wxMouseState &state, const wxRect &rect, const std::shared_ptr< Track > &pTrack)
 
- Static Public Member Functions inherited from UIHandle
static UIHandle::Result NeedChangeHighlight (const UIHandle &, const UIHandle &)
 

Private Member Functions

 TimeShiftHandle (const TimeShiftHandle &)=delete
 

Static Private Member Functions

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

Private Attributes

std::shared_ptr< TrackmCapturedTrack
 
wxRect mRect {}
 
bool mDidSlideVertically {}
 
bool mSlideUpDownOnly {}
 
bool mSnapPreferRightEdge {}
 
int mMouseClickX {}
 
std::shared_ptr< SnapManagermSnapManager {}
 
ClipMoveState mClipMoveState {}
 
bool mGripHit {}
 

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

TimeShiftHandle::TimeShiftHandle ( const TimeShiftHandle )
privatedelete
TimeShiftHandle::TimeShiftHandle ( const std::shared_ptr< Track > &  pTrack,
bool  gripHit 
)
explicit
TimeShiftHandle::~TimeShiftHandle ( )
virtual

Member Function Documentation

UIHandle::Result TimeShiftHandle::Cancel ( AudacityProject pProject)
overridevirtual
void TimeShiftHandle::DrawExtras ( DrawingPass  pass,
wxDC *  dc,
const wxRegion &  ,
const wxRect &  panelRect 
)
overridevirtual

Reimplemented from UIHandle.

void TimeShiftHandle::Enter ( bool  forward)
overridevirtual

Reimplemented from UIHandle.

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

std::shared_ptr<Track> TimeShiftHandle::GetTrack ( ) const
inline

References mCapturedTrack.

UIHandlePtr TimeShiftHandle::HitAnywhere ( std::weak_ptr< TimeShiftHandle > &  holder,
const std::shared_ptr< Track > &  pTrack,
bool  gripHit 
)
static
HitTestPreview TimeShiftHandle::HitPreview ( const AudacityProject pProject,
bool  unsafe 
)
staticprivate

References _(), HitAnywhere(), and MakeCursor().

UIHandlePtr TimeShiftHandle::HitTest ( std::weak_ptr< TimeShiftHandle > &  holder,
const wxMouseState &  state,
const wxRect &  rect,
const std::shared_ptr< Track > &  pTrack 
)
static

method that tells us if the mouse event landed on a time-slider that allows us to time shift the sequence. (Those are the two "grips" drawn at left and right edges for multi tool mode.)

Referenced by WaveTrack::DetailedHitTest().

bool TimeShiftHandle::IsGripHit ( ) const
inline

References mGripHit.

Referenced by TrackArtist::DrawWaveform().

TimeShiftHandle& TimeShiftHandle::operator= ( const TimeShiftHandle )
default
HitTestPreview TimeShiftHandle::Preview ( const TrackPanelMouseState state,
const AudacityProject pProject 
)
overridevirtual

Implements UIHandle.

References AudacityProject::IsAudioActive().

bool TimeShiftHandle::StopsOnKeystroke ( )
inlineoverridevirtual

Reimplemented from UIHandle.

Member Data Documentation

std::shared_ptr<Track> TimeShiftHandle::mCapturedTrack
private

Referenced by GetTrack().

ClipMoveState TimeShiftHandle::mClipMoveState {}
private
bool TimeShiftHandle::mDidSlideVertically {}
private
bool TimeShiftHandle::mGripHit {}
private

Referenced by IsGripHit().

int TimeShiftHandle::mMouseClickX {}
private
wxRect TimeShiftHandle::mRect {}
private
bool TimeShiftHandle::mSlideUpDownOnly {}
private
std::shared_ptr<SnapManager> TimeShiftHandle::mSnapManager {}
private
bool TimeShiftHandle::mSnapPreferRightEdge {}
private

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