... and move one more gPrefs lookup into it.
Don't expect TrackPanel to invoke it always, because sometimes TrackArtist
is standalone, as in Printing.cpp
... keep the name, but change the value to be what it really says:
the proper width of the track control panel, agreeing with the hit-test
area, NOT including the left margin
And change places where the constant was used, adding the margin back again.
Fixes -v / --verbose.
Fixes file paths (Windows and Linux).
Relative file paths would (before this fix) be wrong unless the command
was launched from the same directory as Audacity's working directory
(Windows and Linux only)
... not insets.
This makes them agree with the horizontal extents of the hit-test areas of
event handling code.
Some routines may draw outside of the box passed in to them, as when drawing
the border around a track.
In some of the routines, fewer pixels are painted than before, but these are
always either cleared already when painting left and right margins, or are
overpainted later, as with the right endpoints of sash borders overpainted by
the border around the track.
It combines the old IdentInterface with the ParamsInterface, providing an identifier and parameters (if needed).
The main purpose of the change is to make the class hierarchy (as viewed via doxygen) much easier to follow.
... excepting the duplication still remaining in TrackPanel::FindTrackRect.
Subdivision of the panel's area is defined recusively using helper classes
that each report a refinement of a sub-rectangle on one of the two axes until
what remains is a rectangle occupied by one cell only.
TrackPanelCellIterator, which iterated over TrackPanel's subdivision by other
means, is replaced by this.
CellularPanel thus requires only one virtual function definition for
subdivision, not two as before, and from that figures out in a generalized way
how to find a cell given a point, or a rectangle given a cell, or an iteration
over all cells within visible bounds.
In future, a rewrite of drawing may invoke virtual functions not only on the
cell objects, but also on the groupings of them. For instance to draw the
focus rectangle of a stereo track, which surrounds several of the cells -- the
control panel, the channels, and the resizer between. So it's good to reify
such groupings of cells as objects.
... Remove mention of obsolete plans for TrackPanel refactor, superseded by a
different refactor now accomplished.
Remove detailed mention of names of functions and data members that implement
drawing.
Move most of Roger's comments about drawing into Overlay.h which is now the
more relevant place.
Commented more correctly what TrackPanelListener is.
OnTrackSetChanged sets mUpToDate to false, which assumes that
MixerBoard::OnPaint(evt) will be called, but on Linux, the event
appears to be eaten by MixerTrackCluster::OnPaint and TrackClusters
were not updated.