... and some latent support added for multiple views.
Still unsettled is what Nyquist should do with tracks with multiple view types;
for now only pass one of them.
... and much generality for the future in reporting the sub-view division to
TrackPanel.
SetDisplay will have the effect of making one of possibly multiple views take
up all the height. Where we need to save and restore or otherwise copy the
sub-views, there is more information now than just one enum value.
... use an AttachedVirtualFunction to compute the default view height from
the controls.
This frees LabelTrackControls from cycles.
Also made Track::DoSetHeight non-virtual
... Different classes for the views, vertical rulers, and dragging handles in
the rulers.
Track panel subdivision finds the delegate sub-view of the appropriate kind to
display and interact with, with the help of a new virtual function in TrackView.
Some anticipation of split views of wave tracks too, not implemented yet.
This adds some files, splitting up existing files that collected too much
unrelated functionality, because waveform and spectrogram drawing and
interaction in fact have very little in common.
It was not done to break up old dependency cycles. In fact it leaves the
new SpectrumView and WaveformView in cycles with WaveTrackView. Something
might be done to fix that later.
... by a redefined area subdivision policy in TrackPanel
So the SpectrumView, WaveformView, and associated ruler and handle classes
find real use, while WaveTrackView is really used only for its height and to
supply the delegate, and WaveTrackVRulerControls and WaveTrackVZoomHandle
are not used
There is also some anticipation of multiple track views
Problem:
Currently KeyboardCapture::Capture(this) is called in TrackPanel::OnTrackFocusChange().
So the keyboard handler is not automatically set when the track panel becomes the focus.
Example of a symptom:
A project contains a label track, and is the focus, and type to create a label is enabled.
Move to focus to another window, and then back to the Audacity window.
Type a character. A label is not created.
Fix:
Move the call KeyboardCapture::Capture(this) to TrackPanel::SetFocusedCell(), so that it gets called when the TrackPanel becomes the focus.