... 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.
... 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.
... use an AttachedVirtualFunction to compute the default view height from
the controls.
This frees LabelTrackControls from cycles.
Also made Track::DoSetHeight non-virtual
... non-intrusively in the Track suclasses, registering functions instead.
For each abstract factory function (of two), build a table of concrete factory
functions, paralleling the hierarchy of Track subclesses. Dispatch using
runt time type information in the Track objects.
... and eliminate some unnecessary calls to SubstitutePendingChangedTrack,
because the track and the substitute store Y and height in their shared
TrackView object.
Also make GetMinimizedHeight() virtual to avoid inclusion of TrackPanel.h in
TrackView.cpp.
... And Track no longer inherits TrackPanelCell, so be careful to rewrite
some dynamic_casts too to check instead for TrackView. Those casts won't fail
to recompile if not rewritten.
... in anticipation of making views to tracks many-to-one, but then the rulers
should be one-to-one with the views. So go through the view to get the ruler.
The ruler is really a left-hand extension for each view.