![]() |
Audacity 3.2.0
|
#include <TimeShiftHandle.h>
Public Types | |
using | ShifterMap = std::unordered_map< Track *, std::unique_ptr< TrackShifter > > |
Public Member Functions | |
ClipMoveState ()=default | |
ClipMoveState (const ClipMoveState &) PROHIBITED | |
ClipMoveState & | operator= (const ClipMoveState &) PROHIBITED |
ClipMoveState (ClipMoveState &&)=default | |
ClipMoveState & | operator= (ClipMoveState &&)=default |
void | Init (AudacityProject &project, Track &capturedTrack, TrackShifter::HitTestResult hitTestResult, std::unique_ptr< TrackShifter > pHit, double clickTime, const ViewInfo &viewInfo, TrackList &trackList, bool syncLocked) |
Will associate a TrackShifter with each track in the list. More... | |
const TrackInterval * | CapturedInterval () const |
Return pointer to the first fixed interval of the captured track, if there is one. More... | |
double | DoSlideHorizontal (double desiredSlideAmount) |
Do sliding of tracks and intervals, maybe adjusting the offset. More... | |
void | DoHorizontalOffset (double offset) |
Offset tracks or intervals horizontally, without adjusting the offset. More... | |
void | clear () |
Public Attributes | |
std::shared_ptr< Track > | mCapturedTrack |
bool | initialized { false } |
bool | movingSelection {} |
bool | wasMoved { false } |
double | hSlideAmount {} |
ShifterMap | shifters |
wxInt64 | snapLeft { -1 } |
wxInt64 | snapRight { -1 } |
int | mMouseClickX {} |
Definition at line 205 of file TimeShiftHandle.h.
using ClipMoveState::ShifterMap = std::unordered_map<Track*, std::unique_ptr<TrackShifter> > |
Definition at line 214 of file TimeShiftHandle.h.
|
default |
ClipMoveState::ClipMoveState | ( | const ClipMoveState & | ) |
|
default |
const TrackInterval * ClipMoveState::CapturedInterval | ( | ) | const |
Return pointer to the first fixed interval of the captured track, if there is one.
Pointer may be invalidated by operations on the associated TrackShifter
Definition at line 416 of file TimeShiftHandle.cpp.
References mCapturedTrack, and shifters.
Referenced by anonymous_namespace{TimeShiftHandle.cpp}::AdjustToSnap(), and TimeShiftHandle::Click().
|
inline |
Definition at line 249 of file TimeShiftHandle.h.
Referenced by TimeShiftHandle::Click().
void ClipMoveState::DoHorizontalOffset | ( | double | offset | ) |
Offset tracks or intervals horizontally, without adjusting the offset.
Definition at line 118 of file TimeShiftHandle.cpp.
References TrackList::Channels(), mCapturedTrack, and shifters.
Referenced by TimeShiftHandle::Drag().
double ClipMoveState::DoSlideHorizontal | ( | double | desiredSlideAmount | ) |
Do sliding of tracks and intervals, maybe adjusting the offset.
Definition at line 433 of file TimeShiftHandle.cpp.
References shifters, and wasMoved.
Referenced by anonymous_namespace{ClipMenus.cpp}::DoClipMove(), and TimeShiftHandle::Drag().
void ClipMoveState::Init | ( | AudacityProject & | project, |
Track & | capturedTrack, | ||
TrackShifter::HitTestResult | hitTestResult, | ||
std::unique_ptr< TrackShifter > | pHit, | ||
double | clickTime, | ||
const ViewInfo & | viewInfo, | ||
TrackList & | trackList, | ||
bool | syncLocked | ||
) |
Will associate a TrackShifter with each track in the list.
hitTestResult | must not be `Miss` |
pHit | If null, implies `Track`, overriding previous argument |
Definition at line 282 of file TimeShiftHandle.cpp.
References Track::Aligned, TrackList::Any(), AttachedVirtualFunction< Tag, Return, This, Arguments >::Call(), TrackList::Channels(), Track::GetLinkType(), SyncLock::Group(), initialized, TrackShifter::Intervals, Track::IsAlignedWithLeader(), TrackShifter::Miss, ViewInfo::selectedRegion, TrackShifter::Selection, Track::SharedPointer(), shifters, size, NotifyingSelectedRegion::t0(), NotifyingSelectedRegion::t1(), and TrackShifter::Track.
Referenced by TimeShiftHandle::Click(), and anonymous_namespace{ClipMenus.cpp}::DoClipMove().
|
default |
ClipMoveState & ClipMoveState::operator= | ( | const ClipMoveState & | ) |
double ClipMoveState::hSlideAmount {} |
Definition at line 243 of file TimeShiftHandle.h.
Referenced by TimeShiftHandle::Drag(), and TimeShiftHandle::Release().
bool ClipMoveState::initialized { false } |
Definition at line 240 of file TimeShiftHandle.h.
Referenced by TimeShiftHandle::Cancel(), TimeShiftHandle::Clicked(), Init(), and TimeShiftHandle::WasMoved().
std::shared_ptr<Track> ClipMoveState::mCapturedTrack |
Definition at line 238 of file TimeShiftHandle.h.
Referenced by anonymous_namespace{TimeShiftHandle.cpp}::AdjustToSnap(), CapturedInterval(), DoHorizontalOffset(), TimeShiftHandle::DoSlideVertical(), TimeShiftHandle::Drag(), TimeShiftHandle::GetTrack(), and TimeShiftHandle::TimeShiftHandle().
int ClipMoveState::mMouseClickX {} |
Definition at line 247 of file TimeShiftHandle.h.
Referenced by TimeShiftHandle::Click(), TimeShiftHandle::DoSlideVertical(), and TimeShiftHandle::Drag().
bool ClipMoveState::movingSelection {} |
Definition at line 241 of file TimeShiftHandle.h.
Referenced by TimeShiftHandle::DoSlideVertical(), and TimeShiftHandle::Drag().
ShifterMap ClipMoveState::shifters |
Definition at line 244 of file TimeShiftHandle.h.
Referenced by CapturedInterval(), anonymous_namespace{TimeShiftHandle.cpp}::CheckFit(), TimeShiftHandle::Click(), DoHorizontalOffset(), DoSlideHorizontal(), TimeShiftHandle::DoSlideVertical(), TimeShiftHandle::Drag(), anonymous_namespace{TimeShiftHandle.cpp}::FindCorrespondence(), Init(), and TimeShiftHandle::Release().
wxInt64 ClipMoveState::snapLeft { -1 } |
Definition at line 245 of file TimeShiftHandle.h.
Referenced by anonymous_namespace{TimeShiftHandle.cpp}::AdjustToSnap(), TimeShiftHandle::Click(), TimeShiftHandle::Draw(), and TimeShiftHandle::Release().
wxInt64 ClipMoveState::snapRight { -1 } |
Definition at line 245 of file TimeShiftHandle.h.
Referenced by anonymous_namespace{TimeShiftHandle.cpp}::AdjustToSnap(), TimeShiftHandle::Click(), TimeShiftHandle::Draw(), and TimeShiftHandle::Release().
bool ClipMoveState::wasMoved { false } |
Definition at line 242 of file TimeShiftHandle.h.
Referenced by DoSlideHorizontal(), and TimeShiftHandle::WasMoved().