1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 16:48:44 +02:00

26 Commits

Author SHA1 Message Date
Paul Licameli
bff30b6ae9 Eliminate idle event handler of CellularPanel...
... achieving the intent of b7386c2db1a136c4684f1e52e53d2f21262032dd by other
means
2019-07-07 13:48:27 -04:00
Paul Licameli
30715e4fe2 Pass AudacityProject as context into TrackPanelCell key handlers...
... as was done for mouse events.

This eliminates some need for GetActiveProject(), which is good, and prepares
for the fix for bug 2141
2019-06-28 13:18:07 -04:00
Paul Licameli
cb2ea25afc Define drawing function of CellularPanel, which visits nodes 2019-06-26 23:39:42 -04:00
Paul Licameli
5cd77187ef Fix TrackPanel rectangle calculations...
... There was an incorrect click-to-resize area active when the last track was
partly scrolled off the bottom

This big predated 2.3.3. development
2019-06-26 21:24:31 -04:00
Paul Licameli
349b882911 Fix failures to repaint track focus border caused by 25f4d6c 2019-06-26 10:03:07 -04:00
Paul Licameli
b7386c2db1 Use idle events to update TrackPanel cursor...
... As when recording starts or stops, or the Tools button has changed, or
scrolling has changed the results of hit-test.

This reduces TrackPanel's intrusions into other code, including ProjectHistory.

Also for AdornedRulerPanel, which shares the base class CellularPanel
2019-06-12 11:05:55 -04:00
Paul Licameli
db8c4c5e5a Global keyboard capture handling into new files, better comments...
... and break its compile dependency on CommandManager.h by letting it install
callbacks.

This also removes Objective-C mixed code from CommmandManager.

This also eliminates four inclusions of Project.h!

Capture handler state is also global, not per project, though the
CommandManager's callbacks still do depend on the active project.
2019-05-18 15:14:18 -04:00
Paul Licameli
6c57948d8f Remove unnecessary #include-s from .cpp files...
... Unnecessary because transitively included.

But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -04:00
Paul Licameli
a915a510bd include <wx/setup.h> in all files where wxUSE* macros are used...
... even if it's redundant; improving on what was done at b47e2f9
2019-03-23 14:56:02 -04:00
Paul Licameli
02db402b54 Bug2064: ESC key should abort drags in time ruler on Linux...
... Reimplement the ESC key handling in TrackPanel and time ruler on all
operating systems so that it does not rely on the focused window, but instead
uses the application-wide event filter.

This includes reversion of 9491605cfc8a7d60117365884fd494996b5ebbaf
2019-03-18 12:43:14 -04:00
Paul Licameli
173a300427 Include nothing before Audacity.h, as comments say we should...
... and remove some duplicated inclusions
2019-03-17 21:41:39 -04:00
Paul Licameli
5bb4e1446f Another override of CellularPanel::FindRect taking a predicate 2019-03-17 15:57:52 -04:00
Paul Licameli
1bcb7c20a5 Remove some nested #include from Project.h 2019-03-16 13:09:54 -04:00
Paul Licameli
d4c8e9e7b9 Bug2056 residual: Linux only time ruler drags and focus...
... Cross platform differences in Focus handling are confusing, and we don't
know yet how to abort drags and also put focus back where we want it on Linux.

So don't take focus even temporarily in the time ruler.  Sorry, ESC key won't
work.
2019-02-09 18:38:37 -05:00
Paul Licameli
93f4e3bd66 Bug2056: TrackPanel should keep focus after quick play...
... Fixed as suggested by David Bailes.

Confirmed on Mac and Windows that the intended ESC key handling to abort drag
in the ruler also now works.  (It didn't on Windows in 2.3.0.)
2019-02-01 14:30:19 -05:00
Paul Licameli
01551913f0 nonvirtual reimplementation of CellularPanel::FindRect using nodes 2018-11-01 18:25:02 -04:00
Paul Licameli
cfa7afcb24 nonvirtual reimplementation of CellularPanel::FindCell using nodes 2018-11-01 18:25:02 -04:00
Paul Licameli
588c050bbb Define visitation procedure skeleton for subdivision of CellularPanel 2018-11-01 17:43:04 -04:00
Paul Licameli
542adefac1 Bug1931: more precautions, higher level and more general...
... Do for release as was already done for click and drag:  hold a shared
pointer.

This will protect against reentrancy surprises as in this bug, where a
reference to the handle may be removed during one of the handle's own
methods.
2018-08-12 15:55:27 -04:00
Paul Licameli
22f85f244b Bug1917: TrackPanel should keep focus after click or drag...
... though ruler won't, and if you start to drag in TrackPanel but abort it
with the ESC key, that too returns focus
2018-08-07 10:42:38 -04:00
Paul Licameli
3010d3aaa8 More conservative rewriting of status as mouse moves over panels 2018-08-06 21:52:47 -04:00
Paul Licameli
0fc4747742 CellularPanel handles leave and capture loss like other transitions 2018-08-05 14:55:27 -04:00
Paul Licameli
ff98ca5a32 CellularPanel saves and restores focus for each click-drag-release...
... while the project makes note of which window has temporarily given up the
focus; and TrackPanel can detect that, so that the yellow border of the focused
track is still drawn while the panel "lends" the focus.

Why do all this?  So that, when the ruler is another CellularPanel, ESC key
will work to abort drags in the ruler, but TrackPanel appearance won't change
during the drags.
2018-08-05 14:51:58 -04:00
Paul Licameli
7cbe85facf Add CellularPanel::LastCell 2018-08-05 14:34:56 -04:00
Paul Licameli
4e1a80f5ac Move CellularPanel data members into a state structure out of the .h file 2018-08-05 14:33:48 -04:00
Paul Licameli
f6609e5ffb Move class CellularPanel into its own files 2018-08-05 14:02:55 -04:00