... which I think was only meant to define a precompiled header for speed on
Windows, and is not necessary for compilation. It is not included in many
other places.
The result is to shrink the big s.c.c. from 44 to 38. Five files remain in
a new small component:
CommandManager
Menus
ToolBar
ToolDock
ToolManager
The sixth freed file is AudacityHeaders itself.
... somewhat analogously to separating AudacityProject from ProjectWindow:
separating core data from views of it.
Track is no longer a cell of TrackPanel, but is associated with objects that
are cells, and one hope for the future is to make the association one-to-many,
supporting, for instance, simultaneous wave and spectrogram views.
The big strongly connected component shrinks from 58 to 44:
+2 files in it are new:
CommonTrackControls
CommonTrackView
+6 files are unfortunately back in it, but should be free again after some
further work to separate LabelTrack from LabelTrackView:
BackgroundCell
LabelTrackControls
LabelTrackView (renamed from LabelTrackUI)
SelectHandle
TimeShiftHandle
TrackSelectHandle
-18 files break out into another strongly connected component, with one new
file (TrackView) and one formerly free file now trapped (TrackPanelResizerCell):
AutoRecovery
Clipboard
NoteTrack
ODComputeSummaryTask
ODDecodeBlockFile
ODDecodeTask
ODManager
ODPCMAliasBlockFile
ODTask
ODWaveTrackTaskQueue
ProjectFileIO
ProjectHistory
Track
TrackPanelResizeHandle
TrackPanelResizerCell
TrackView
TracksPrefs
UndoManager
WaveClip
WaveTrack
-3 files are freed from cycles, intermediate between the two components:
ButtonHandle
SelectionState
SliderHandle
-1 more is freed, not used by the big component, using the smaller one:
TrackVRulerControls
... 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.
... but it does nothing yet.
This will be important to preserve undo/redo behavior of view changes, when
view state is moved out of the proper Track objects.
... 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.
... and use std::enable_shared_from_this
Temporarily putting TrackControls.cpp back into the big s.c.c, now 59 files
Future rewriting might even eliminate all mention of those classes in
the definition of the Track classes.
... so that they and a few others will be in a small s.c.c. that breaks off
the big one -- when the dependencies of Track and its subclasses on TrackPanel
are severed.
... Mostly into CommonCommandFlags.cpp, but some elsewhere, to avoid giving
that new file problematic dependencies on LabelTrack, ControlToolBar, and
EffectManager.
Note that CutCopyAvailableFlag is critically ordered, for message purposes,
only with AudioIONotAvailableFlag, the only flag with a message that it combines
with in menu item definitions.
The dependency on LabelTrack.cpp might not be a bad one later, if the track and
its view can be separated, and that would allow CutCopyAvailableFlag to be
put with the others. But much other work on LabelTrack must happen first.
... In fact it was only ever different from flags when flags had the special
NoAutoSelect and mask did not. Now put that bit in the mask too, and make
the special NoAutoSelect always true in MenuManager::GetUpdateFlags(). This
still preserves the intended effects of NoAutoSelect.