Commit Graph

14 Commits

Author SHA1 Message Date
Paul Licameli c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli caa312ab7b Remove some unneeded #includes and forward declarations 2020-11-20 13:47:47 -05:00
Paul Licameli 3a1456bf53 Make OverlayPanel independent of AColor 2019-07-13 16:08:29 -04:00
Paul Licameli db16150366 Break cycle: TrackPanelResizerCell, TrackPanelResizeHandle, TrackView 2019-07-09 14:55:31 -04:00
Paul Licameli 1ca079b503 Move drawing code for margins and separators 2019-06-26 23:39:42 -04:00
Paul Licameli b4c7a8ef2a TrackPanelResizerCell, also in 1-to-1 with TrackView, now owned by it 2019-06-18 16:01:06 -04:00
Paul Licameli bebd709e98 Define and use CommonTrackCell 2019-06-18 16:01:06 -04:00
James Crook 657159d542 Fix C4189 and C4100 Warnings
C4189 is 'Local variable initialised but not used'
C4100 is 'Unreferenced parameter'

Fixed some other warnings, e.g. about empty if, too.
2018-10-10 19:46:24 +01:00
Paul Licameli ecc869bdbe Remove GetLink(ed) in TrackPanel resizing code 2018-10-01 13:42:32 -04:00
Paul Licameli 8e44827980 TrackPanelCell hit tests can return multiple results...
.. though only the first is used yet
2017-07-09 08:17:40 -04:00
Paul Licameli b3d62e2ab6 Simplify by removing class HitTestResult...
... Because all hit tests returned all fields blank, or else, returned a
UIHandle object whose Preview method gives the rest of the information; so
the other fields were redundant.
2017-07-09 07:57:34 -04:00
Paul Licameli 2c1a16f593 Changed lifetime management of UIHandle objects, no singletons...
... Rather, construct them during hit tests (also capturing more state sooner
rather than at Click time, and adding some accessors for later use)

This also fixes bug 1677 by other means and avoids similar problems.

A cell may be implemented to re-use a previously hit handle object, not yet
clicked, in a later hit test, by remembering a weak pointer, but TrackPanel
holds the strong pointers that determine when the object is destroyed.

And the objects will surely be destroyed after drag-release, or ESC key.

For now they are also destroyed whenever not dragging, and hit-testing is
re-invoked; that will be changed later, so that the re-use mentioned above
becomes effective, but still they will be destroyed when the pointer moves
from one cell to another.
2017-07-09 07:23:28 -04:00
Paul Licameli 3a8280c562 Distinguish TrackPanelMouseState from TrackPanelMouseEvent...
... Let cell hit tests, and handle preview, know states only, not transitions.

Cell hit tests are passed a mouse state that does not always match the current,
but anticipates the button click to come; usually left, but if the Control
[sic] key on Mac is down, then right.

Thus, pressing and releasing Mac Control in multi-tool switches in and out of
the magnifier cursor.
2017-07-09 06:38:55 -04:00
Paul Licameli c1f667f170 Move some handle and cell classes into their own files 2017-07-09 06:38:54 -04:00