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 &)=delete | |
ClipMoveState & | operator= (const ClipMoveState &)=delete |
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 ChannelGroupInterval * | 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 236 of file TimeShiftHandle.h.
using ClipMoveState::ShifterMap = std::unordered_map<Track*, std::unique_ptr<TrackShifter> > |
Definition at line 245 of file TimeShiftHandle.h.
|
default |
|
delete |
|
default |
const ChannelGroupInterval * 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 379 of file TimeShiftHandle.cpp.
References mCapturedTrack, and shifters.
Referenced by anonymous_namespace{TimeShiftHandle.cpp}::AdjustToSnap(), and TimeShiftHandle::Click().
|
inline |
Definition at line 280 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 123 of file TimeShiftHandle.cpp.
References 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 396 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 274 of file TimeShiftHandle.cpp.
References AttachedVirtualFunction< Tag, Return, This, Arguments >::Call(), SyncLock::Group(), initialized, TrackShifter::Intervals, TrackShifter::Miss, project, 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 |
|
delete |
double ClipMoveState::hSlideAmount {} |
Definition at line 274 of file TimeShiftHandle.h.
Referenced by TimeShiftHandle::Drag(), and TimeShiftHandle::Release().
bool ClipMoveState::initialized { false } |
Definition at line 271 of file TimeShiftHandle.h.
Referenced by TimeShiftHandle::Cancel(), TimeShiftHandle::Clicked(), Init(), and TimeShiftHandle::WasMoved().
std::shared_ptr<Track> ClipMoveState::mCapturedTrack |
Definition at line 269 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 278 of file TimeShiftHandle.h.
Referenced by TimeShiftHandle::Click(), TimeShiftHandle::DoSlideVertical(), and TimeShiftHandle::Drag().
bool ClipMoveState::movingSelection {} |
Definition at line 272 of file TimeShiftHandle.h.
Referenced by TimeShiftHandle::DoSlideVertical(), and TimeShiftHandle::Drag().
ShifterMap ClipMoveState::shifters |
Definition at line 275 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 276 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 276 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 273 of file TimeShiftHandle.h.
Referenced by DoSlideHorizontal(), and TimeShiftHandle::WasMoved().