1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-24 23:21:21 +01:00

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.
This commit is contained in:
Paul Licameli
2017-06-28 23:21:20 -04:00
parent c1f667f170
commit 3a8280c562
76 changed files with 327 additions and 277 deletions

View File

@@ -14,6 +14,7 @@ Paul Licameli
class AudacityProject;
struct HitTestResult;
struct TrackPanelMouseEvent;
struct TrackPanelMouseState;
class ViewInfo;
class wxKeyEvent;
class wxPoint;
@@ -28,10 +29,12 @@ public:
virtual ~TrackPanelCell () = 0;
// Indicate a status bar message, cursor, and click-drag-release handler
// appropriate to the mouse position and modifier keys.
// appropriate to the mouse position, modifier keys, and button-down state.
// The button-down state passed to the function is as it will be at click
// time -- not necessarily as it is now.
// TrackPanel is not responsible for memory management of the handler.
virtual HitTestResult HitTest
(const TrackPanelMouseEvent &event,
(const TrackPanelMouseState &state,
const AudacityProject *pProject) = 0;
// Return value is a bitwise OR of RefreshCode values