6#include "../../../ui/TimeShiftHandle.h"
7#include "../../../../NoteTrack.h"
26 if (
mpTrack->IsSelected() && time >= t0 && time < t1 )
44 if (t0 < track.GetStartTime())
45 t0 = track.GetStartTime();
46 if (t0 > track.GetEndTime())
47 t0 = track.GetEndTime();
59 return std::make_unique<NoteTrackShifter>(track);
DEFINE_ATTACHED_VIRTUAL_OVERRIDE(MakeNoteTrackShifter)
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
A Track that is used for Midi notes. (Somewhat old code).
std::shared_ptr< NoteTrack > mpTrack
Track & GetTrack() const override
There is always an associated track.
NoteTrackShifter(NoteTrack &track)
double AdjustT0(double t0) const override
~NoteTrackShifter() override
bool SyncLocks() override
Whether unfixing of an interval should propagate to all overlapping intervals in the sync lock group.
HitTestResult HitTest(double time, const ViewInfo &viewInfo, HitTestParams *) override
Decide how shift behaves, based on the track that is clicked in.
void SelectInterval(const TrackInterval &interval) override
Notifies the shifter that a region is selected, so it may update its fixed and moving intervals.
Abstract base class for an object holding data associated with points on a time axis.
A start and an end time, and mutative access to optional extra information.
Abstract base class for policies to manipulate a track type with the Time Shift tool.
void CommonSelectInterval(const TrackInterval &interval)
void UnfixAll()
Change all intervals from fixed to moving.
void InitIntervals()
Derived class constructor can initialize all intervals reported by the track as fixed,...
HitTestResult
Possibilities for HitTest on the clicked track.
@ Selection
Shift chosen intervals of this track; may shift other tracks' intervals.
@ Intervals
Shift intervals only of selected track and sister channels.
NotifyingSelectedRegion selectedRegion
For defining overrides of the method.
Optional, more complete information for hit testing.