... Because LabelTrack, unlike the others, will also need a mouse y coordinate.
The extra information is present when using the time-shift tool but not when
using the items in ClipMenus.
... for shifting of clips among tracks
But this (temporarily) breaks the behavior of dragging back to the original
clip without first releasing the mouse
... than the one clicked in; and the clip can't fit into the new track, but it
can still slide horizontally within its track.
This eliminates a redundant use of WaveClip::Offset().
... There is an AttachedVirtualFunction which is a factory for TrackShifter,
and subclasses of it appropriate for different kinds of tracks.
The logic to choose the intervals of tracks that move is replicated in them.
The old logic is not yet removed.
Enough logic is moved into them, so that snapping in TimeShift, and DoClipMove
in ClipMenus.cpp, make no direct special use of classes WaveTrack and WaveClip.
Not yet defining a new subclass for shifting of labels -- that will be the last
step.
... Preserving existing behavior, but maybe these cases should be reconsidered
and made more uniform. (e.g. should hit test on NoteTrack sometimes miss, as
with WaveTrack?)
Also made details of WaveTrack hit testing consistent with what ClipMenus does
... in TimeShiftHandle. They do nothing useful yet, but responsibilities
will shift into them.
TypeSwitch is avoided and the subclasses are defined in appropriate places
for dependency management, thanks to AttachedVirtualFunction.
one taking candidate list directly, the others delegating to it.
Some members removed, some in-class initializers.
The special constructor for TimeShift only has extra arguments. It will go
away.
... Start Audacity; generate some noise; shift clip with Time-Shift tool;
command+Q to exit; say No to save changes.
The scope of a GuardedCall needs to be expanded, because Conn() can throw,
so that no exceptions escape the destructor of SqliteSampleBlock.
But now there is an error dialog on exit instead of a crash.
The error icon was gone because we are now using the ErrorDialog, which didn't have it. So added back explicitly. I decided to go with wxART_WARNING rather than wxART_ERROR because nearly all of these present as warnings.
... Implemented giving the Multi-view choice the special implementation that it
needs.
The "multi" choice is always last in the preference and in the command editing
drop-down menus, but that could be changed.
Multi-view should not be treated as another registered kind of sub-view on par
with others. This would complicate the implementation in worse ways.