1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 15:53:52 +02:00

Control scrub with motion, click, drag, wheel almost anywhere in main window...

... if the event is not handled and skipped by sub-windows first, such as for
toolbar button clicks.

(But track panel clicks are skipped even after doing something, so they may
also cause seeking besides other responses.  So click can seek AND set cursor.)

This is meant to make drag to seek and wheel for change of speed easier,
without needing to keep the mouse in the narrow time ruler.

Also lets you click in the ruler, then move in any direction, and not miss the
motion event that should start the scrub playback.

The event handling is a bit of a hack, using propagation.  It does not use
capture.
This commit is contained in:
Paul Licameli
2016-04-21 20:59:38 -04:00
parent 3d222bcd87
commit 9ab0e42f29
13 changed files with 120 additions and 25 deletions

View File

@@ -34,7 +34,7 @@ class AUDACITY_DLL_API TrackPanelListener /* not final */ {
virtual void TP_ScrollLeft() = 0;
virtual void TP_ScrollRight() = 0;
virtual void TP_ScrollWindow(double scrollto) = 0;
virtual void TP_ScrollUpDown(int delta) = 0;
virtual bool TP_ScrollUpDown(int delta) = 0;
virtual void TP_HandleResize() = 0;
};