![]() |
Audacity 3.2.0
|
#include <TimeShiftHandle.h>
Public Member Functions | |
TimeShiftHandle (std::shared_ptr< Track > pTrack, bool gripHit) | |
TimeShiftHandle & | operator= (TimeShiftHandle &&)=default |
bool | IsGripHit () const |
virtual | ~TimeShiftHandle () |
std::shared_ptr< const Channel > | FindChannel () const override |
void | Enter (bool forward, AudacityProject *) override |
Result | Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
HitTestPreview | Preview (const TrackPanelMouseState &state, AudacityProject *pProject) override |
Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override |
Result | Cancel (AudacityProject *pProject) override |
bool | StopsOnKeystroke () override |
bool | Clicked () const |
std::shared_ptr< Track > | GetTrack () const |
![]() | |
virtual | ~UIHandle ()=0 |
virtual void | Enter (bool forward, AudacityProject *pProject) |
virtual bool | HasRotation () const |
virtual bool | Rotate (bool forward) |
virtual bool | HasEscape (AudacityProject *pProject) const |
virtual bool | Escape (AudacityProject *pProject) |
virtual bool | HandlesRightClick () |
Whether the handle has any special right-button handling. More... | |
virtual Result | Click (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0 |
virtual Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0 |
virtual HitTestPreview | Preview (const TrackPanelMouseState &state, AudacityProject *pProject)=0 |
virtual Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent)=0 |
virtual Result | Cancel (AudacityProject *pProject)=0 |
virtual bool | StopsOnKeystroke () |
virtual void | OnProjectChange (AudacityProject *pProject) |
virtual std::shared_ptr< const Channel > | FindChannel () const =0 |
virtual bool | IsDragging () const |
Result | GetChangeHighlight () const |
void | SetChangeHighlight (Result val) |
![]() | |
virtual | ~TrackPanelDrawable ()=0 |
virtual void | Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) |
virtual wxRect | DrawingArea (TrackPanelDrawingContext &context, const wxRect &rect, const wxRect &panelRect, unsigned iPass) |
Static Public Member Functions | |
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 UIHandle::Result | NeedChangeHighlight (const UIHandle &, const UIHandle &) |
![]() | |
static wxRect | MaximizeWidth (const wxRect &rect, const wxRect &panelRect) |
static wxRect | MaximizeHeight (const wxRect &rect, const wxRect &panelRect) |
Protected Member Functions | |
bool | WasMoved () const |
Private Member Functions | |
TimeShiftHandle (const TimeShiftHandle &)=delete | |
void | DoSlideVertical (ViewInfo &viewInfo, wxCoord xx, TrackList &trackList, Track *dstTrack, double &desiredSlideAmount) |
void | Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override |
wxRect | DrawingArea (TrackPanelDrawingContext &, const wxRect &rect, const wxRect &panelRect, unsigned iPass) override |
Static Private Member Functions | |
static HitTestPreview | HitPreview (const AudacityProject *pProject, bool unsafe) |
Private Attributes | |
wxRect | mRect {} |
bool | mDidSlideVertically {} |
bool | mSlideUpDownOnly {} |
bool | mSnapPreferRightEdge {} |
std::shared_ptr< SnapManager > | mSnapManager {} |
ClipMoveState | mClipMoveState {} |
bool | mGripHit {} |
Additional Inherited Members | |
![]() | |
using | Result = unsigned |
using | Cell = TrackPanelCell |
![]() | |
Result | mChangeHighlight { 0 } |
Definition at line 294 of file TimeShiftHandle.h.
|
privatedelete |
TimeShiftHandle::TimeShiftHandle | ( | std::shared_ptr< Track > | pTrack, |
bool | gripHit | ||
) |
Substitute the leader track before assigning mCapturedTrack
Definition at line 32 of file TimeShiftHandle.cpp.
References ClipMoveState::mCapturedTrack, and mClipMoveState.
|
virtual |
Definition at line 118 of file TimeShiftHandle.cpp.
|
overridevirtual |
Implements UIHandle.
Definition at line 979 of file TimeShiftHandle.cpp.
References ProjectHistory::Get(), ClipMoveState::initialized, mClipMoveState, RefreshCode::RefreshAll, RefreshCode::RefreshNone, and ProjectHistory::RollbackState().
Referenced by Drag(), and Release().
|
overridevirtual |
Implements UIHandle.
Definition at line 466 of file TimeShiftHandle.cpp.
References AttachedVirtualFunction< Tag, Return, This, Arguments >::Call(), Cancelled, RefreshCode::Cancelled, ClipMoveState::CapturedInterval(), ClipMoveState::clear(), TrackPanelMouseEvent::event, anonymous_namespace{TimeShiftHandle.cpp}::FindCandidates(), ProjectAudioIO::Get(), ViewInfo::Get(), SyncLockState::Get(), TrackList::Get(), ProjectSettings::Get(), ProjectSettings::GetTool(), ClipMoveState::Init(), ProjectAudioIO::IsAudioActive(), SyncLockState::IsSyncLocked(), mClipMoveState, mDidSlideVertically, TrackShifter::Miss, ClipMoveState::mMouseClickX, mRect, mSlideUpDownOnly, mSnapManager, mSnapPreferRightEdge, ToolCodes::multiTool, params, TrackPanelMouseEvent::pCell, TrackPanelMouseEvent::rect, RefreshCode::RefreshNone, ClipMoveState::shifters, ClipMoveState::snapLeft, ClipMoveState::snapRight, and TrackShifter::Track.
Referenced by AffordanceHandle::Click().
bool TimeShiftHandle::Clicked | ( | ) | const |
Definition at line 52 of file TimeShiftHandle.cpp.
References ClipMoveState::initialized, and mClipMoveState.
Referenced by AffordanceHandle::Preview().
|
private |
Definition at line 738 of file TimeShiftHandle.cpp.
References TrackList::Any(), PackedArray::begin(), anonymous_namespace{TimeShiftHandle.cpp}::CheckFit(), PackedArray::end(), TrackList::Find(), anonymous_namespace{TimeShiftHandle.cpp}::FindCorrespondence(), forward, Track::IsLeader(), ClipMoveState::mCapturedTrack, mClipMoveState, mDidSlideVertically, ClipMoveState::mMouseClickX, NotifyingSelectedRegion::move(), ClipMoveState::movingSelection, ZoomInfo::PositionToTime(), ViewInfo::selectedRegion, Track::SharedPointer(), and ClipMoveState::shifters.
Referenced by Drag().
|
overridevirtual |
Implements UIHandle.
Definition at line 826 of file TimeShiftHandle.cpp.
References anonymous_namespace{TimeShiftHandle.cpp}::AdjustToSnap(), Cancel(), Cancelled, ClipMoveState::DoHorizontalOffset(), ClipMoveState::DoSlideHorizontal(), DoSlideVertical(), TrackPanelMouseEvent::event, ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Find(), CommonTrackPanelCell::FindTrack(), ProjectAudioIO::Get(), ViewInfo::Get(), TrackList::Get(), ClipMoveState::hSlideAmount, ProjectAudioIO::IsAudioActive(), ClipMoveState::mCapturedTrack, mClipMoveState, ClipMoveState::mMouseClickX, ClipMoveState::movingSelection, mRect, mSlideUpDownOnly, mSnapManager, mSnapPreferRightEdge, TrackPanelMouseEvent::pCell, RefreshCode::RefreshAll, RefreshCode::RefreshNone, Track::SharedPointer(), and ClipMoveState::shifters.
Referenced by AffordanceHandle::Drag().
|
overrideprivatevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 989 of file TimeShiftHandle.cpp.
References TrackPanelDrawingContext::dc, TrackArt::DrawSnapLines(), mClipMoveState, mSnapManager, TrackArtist::PassSnapping, ClipMoveState::snapLeft, and ClipMoveState::snapRight.
|
overrideprivatevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 1003 of file TimeShiftHandle.cpp.
References TrackPanelDrawable::MaximizeHeight(), and TrackArtist::PassSnapping.
|
overridevirtual |
Reimplemented from UIHandle.
Definition at line 57 of file TimeShiftHandle.cpp.
References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.
Referenced by AffordanceHandle::Enter().
|
overridevirtual |
Implements UIHandle.
Definition at line 122 of file TimeShiftHandle.cpp.
References GetTrack().
std::shared_ptr< Track > TimeShiftHandle::GetTrack | ( | ) | const |
Definition at line 42 of file TimeShiftHandle.cpp.
References ClipMoveState::mCapturedTrack, and mClipMoveState.
Referenced by FindChannel(), NoteTrackAffordanceHandle::SelectAt(), and AffordanceHandle::UpdateTrackSelection().
|
static |
Definition at line 84 of file TimeShiftHandle.cpp.
References AssignUIHandlePtr().
Referenced by WaveChannelView::DoDetailedHitTest(), CommonChannelView::HitTest(), and HitTest().
|
staticprivate |
Definition at line 64 of file TimeShiftHandle.cpp.
References MakeCursor(), and XO().
Referenced by Preview().
|
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.)
Definition at line 93 of file TimeShiftHandle.cpp.
References HitAnywhere().
Referenced by WaveformView::DetailedHitTest().
|
inline |
Definition at line 305 of file TimeShiftHandle.h.
Referenced by WaveformView::DoDraw().
|
default |
|
overridevirtual |
Implements UIHandle.
Definition at line 924 of file TimeShiftHandle.cpp.
References ProjectAudioIO::Get(), HitPreview(), and ProjectAudioIO::IsAudioActive().
|
overridevirtual |
Implements UIHandle.
Definition at line 933 of file TimeShiftHandle.cpp.
References Cancel(), CONSOLIDATE, RefreshCode::FixScrollbars, ProjectAudioIO::Get(), ProjectHistory::Get(), ClipMoveState::hSlideAmount, ProjectAudioIO::IsAudioActive(), mClipMoveState, mDidSlideVertically, anonymous_namespace{TimeShiftHandle.cpp}::MigrationFailure(), NONE, ProjectHistory::PushState(), RefreshCode::RefreshAll, RefreshCode::RefreshNone, ClipMoveState::shifters, ClipMoveState::snapLeft, ClipMoveState::snapRight, and XO().
Referenced by AffordanceHandle::Release().
|
inlineoverridevirtual |
|
protected |
Definition at line 47 of file TimeShiftHandle.cpp.
References ClipMoveState::initialized, mClipMoveState, mDidSlideVertically, and ClipMoveState::wasMoved.
Referenced by AffordanceHandle::Release().
|
private |
Definition at line 380 of file TimeShiftHandle.h.
Referenced by Cancel(), Click(), Clicked(), DoSlideVertical(), Drag(), Draw(), GetTrack(), Release(), TimeShiftHandle(), and WasMoved().
|
private |
Definition at line 369 of file TimeShiftHandle.h.
Referenced by Click(), DoSlideVertical(), Release(), and WasMoved().
|
private |
Definition at line 381 of file TimeShiftHandle.h.
|
private |
Definition at line 367 of file TimeShiftHandle.h.
|
private |
Definition at line 370 of file TimeShiftHandle.h.
|
private |
Definition at line 378 of file TimeShiftHandle.h.
|
private |
Definition at line 372 of file TimeShiftHandle.h.