... ViewInfo should only be concerned with screen geometry.
(And so it won't depend on AudioIO (even higher level) after stream time moves
there.)
PlaybackScroller receives the timer event directly (not from ViewInfo) and
caches playback position instead. Then, as before, it propagates the event
to PlayIndicatorOverlay.
... This makes it impossible to forget to include the EXPERIMENTAL definitions
(such as when cutting and pasting code) and so get unintended quiet changes of
behavior.
The EXPERIMENTAL flags are now specified instead in new file Experimental.cmake
... New files, but (almost) empty; don't use the global variable gAudioIO,
but use one of two accessor function names (which are the same function for
now).
AudioIOBase will have fewer dependencies than AudioIO -- in particular, no
dependency on tracks.
It won't include StartStream. It will contain functions to query the
present state of streams, and device capabilities.
... Unnecessary because transitively included.
But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
... except Audacity.h; and in no others.
Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.
This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.
Also move inclusions of Experimental.h earlier.
Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
... instead, re-process the event, and let each handler bind to the one it
depends on.
This still leaves a critical ordering of construction of playback scroller and
play indicator overlay in AudacityProject::AudacityProject (reverse of the
previous), but that will be removed by other means.
Added preferences for Zoom-Toggle and put into menus.
New helper functions for determining zoom scaling.
Optional EXPERIMENTAL_ZOOM_TOGGLE_BUTTON added, and Light theme updated.
Not enabled for 2.2.2.
This brings more of the code from DarkAudacity into Audacity, though not yet enabled. This will make cherry picking later easier.
- Changing colour of html displays now possible, as colour links are visible for substitution. (Can't use css as wxHTML is very limited).
- Export can now be preset to a particular format independent of preferences.
- SnapTo reversion on zoom now a DA controlled option.
- Caching of pinning preference for faster repaint because preferences are slow.
- Record Append now has sensible limit on number of tracks, rather than giving an error, and flipping the meaning of shift is now DA controlled.
...fix differing results on Mac by calculating only in double, so that selection
remains centered at extreme zoom-in for long projects (about 20 min.) and
selection after about 15 min.
Added forcing time64 to be positive. Fixes problem where large negative value overflows into int.
More careful computation of TimeToPosition() so floor is only called with in range values.
Re-instated 'true' flags for hiddenMid calls, which I'd mistakenly dropped, so that (later) FishEye can distinguish.
... and anticipate a problems fisheye will introduce with time ruler display
and horizontal scrolling past zero.
Will be used in waveform and spectrogram drawing, and in hit-test for sample
editing. Those things will no longer make the assumption of uniform zoom
level across the width of the screen, though that does remain true without the
rest of the fisheye project.
... miscellaneous direct uses of ZoomInfo::zoom to test and set zoom level.
This includes all the remaining assignments to it.
But moving TrackInfo::PositionToTime and TrackInfo::TimeToPosition into
ZoomInfo and using them is needed to eliminate many more uses.
Also #if'd out the unused AudacityProject::OnZoomToggle().