1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-10 06:01:09 +02:00

672 Commits

Author SHA1 Message Date
Paul Licameli
04377f71c6 Bug1249: Drag to rearrange tracks: don't halt at panel top or bottom 2016-06-21 17:03:25 -04:00
Paul Licameli
013bcf9635 Bug122: Dragging selected point label should update cursor 2016-06-20 23:13:35 -04:00
Taiki Kim
51557c8959 Record state modification when changing a track's spectrogram settings
Fixes Bug 1277.
2016-06-18 13:39:58 -07:00
Paul Licameli
bb7dba2b67 Shortcut keys can appear as intended in Track Control Panel menus...
... Delayed construction of the menus was needed.

So far this only affects the four menu items that move tracks up and down.
2016-06-12 00:00:04 -04:00
Paul Licameli
e4fadf4aaf Improve scrubbing speed control (2 finger swipe) on Mac 2016-05-28 11:59:22 -04:00
Paul Licameli
af7a92c2ab Improve scrub responsiveness: a secondary thread polls the mouse 2016-05-28 11:59:22 -04:00
Steve Daulton
0377a24f90 Comment out unused TrackPanel::BuildVRulerMenuItems function
The function builds pop up menus that are never displayed and
creates runtime debug warnings. It is left over from PRL's experiment
in 2.1.2 with a context menu for the vertical ruler.
2016-05-27 10:45:01 +01:00
Paul Licameli
4f9810cd1f Two-fingered horizontal swipe on mac touchpad scrolls the wave 2016-05-25 12:31:30 -04:00
Paul Licameli
ba883cbcf4 Improve responsiveness of drag seek during click-scrub...
.. by refreshing the TrackPanel window less often.
2016-05-23 18:37:42 -04:00
Paul Licameli
7e0de9a9bc Fix incidentals to Bug 1331, though not the bug itself...
... See comments #1 and #2 at
http://bugzilla.audacityteam.org/show_bug.cgi?id=1331

Don't make strange undo history if, e.g., R to record (or other keystroke
with undoable effects) interrupts a drag with undoable effects (like time
shift).  Ensure that by first simulating a mouse button up event to stop the
drag, before dispatching the keystroke.

Don't crash if certain other drags, that do not have undoable effects, such
as selection or vertical ruler drag -- are interrupted by a keystroke
command (Ctrl+C in particular could cause crash).  However, in these cases,
the drag is still allowed to continue.
2016-05-21 23:19:09 -04:00
Paul Licameli
6acb0f99b3 Fix minor error in some position to time calculations 2016-05-18 14:55:03 -04:00
Paul Licameli
80e19f2130 Ruler is in the ctrl+f6 cycle instead of reachable by arrows; experimental...
... flag for turning off navigability of the ruler.
2016-05-10 15:16:12 -04:00
Paul Licameli
5944391e24 Let's commit to EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL 2016-05-09 23:21:56 -04:00
Paul Licameli
3466e91ed1 Insert calls to DrawOverlays() on the ruler, though they do nothing yet 2016-05-09 11:37:32 -04:00
Paul Licameli
7c2a531486 New base classes of TrackPanel just for the bitmap backing and overlay system...
... to make it reusable by other classes.

Also, don't create a second DC when repainting TrackPanel.
2016-05-09 11:37:32 -04:00
Henric Jungheim
3c83eab4d7 Fix uninitialized pointer in TrackPanel.cpp 2016-05-06 22:17:16 -07:00
Paul Licameli
c616d433c2 Make key navigation to ruler work on Windows 2016-05-06 18:13:24 -04:00
Paul Licameli
519a2020ff Navigation to and from the ruler using up and down arrow keys...
... This affects those keys (and NUMPAD arrows), also (shift-)ctrl-f6,
ctrl-home, ctrl-end (which are command-left and right on mac)

Those should be tested to ensure correct restoration of the yellow rectangle,
appropriately in the tracks or the ruler.

This should also be tested with and without the Tracks preference for cyclic
movement of the focus.
2016-05-06 16:50:24 -04:00
Paul Licameli
ba0b5a70a3 Bug1387: enable autoscrolling even when the track extends beyond the screen 2016-05-04 21:03:44 -04:00
Paul Licameli
b4763d2608 Bug1325: A better fix that avoids platform dependent code and still ...
... distinguishes button state as we wanted to.
2016-05-03 14:49:08 -04:00
Paul Licameli
1910c9eda1 Bug1325: Drag-scrolling now works again on Mac. ...
... The explanation was not, as I had thought, that mouse capture is simply
broken in wxWidgets 3.0.2 for Mac.

Instead, it now appears that Leaving mouse events always falsely report no
buttons are down, which confused our code.
2016-05-03 14:18:00 -04:00
Paul Licameli
e7477746df Computing best font size for TrackInfo is redone when preferences change 2016-05-01 17:55:48 -04:00
Paul Licameli
2a257fc9bf Move a few steps in the construction of TrackPanel and AdornedRulerPanel 2016-04-30 22:48:54 -04:00
Paul Licameli
5a5775c1c1 Implement showing and hiding of a srub bar portion of the ruler...
... activated by clicking near the left end of the ruler, then using the
context menu.

This is not finished work, but a proof of concept for a possible new scrubbing
UI.
2016-04-27 18:39:47 -04:00
Paul Licameli
9ab0e42f29 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.
2016-04-26 12:12:06 -04:00
Paul Licameli
cd57e0a26c Scrubbing phase 2. Scrub starts with click on the indicator in the ruler...
... and works in any of the six tools.

Click and drag in select tool during scrub works just as when not scrubbing.

Seeks now only if you left-click or drag in the ruler, but this may change.

Mouse motion anywhere on the screen controls scrub as before.

No mouse clicks in TrackPanel are used by scrubbing.

The Ctrl-Click in TrackPanel is now unused.  Should 2.1.0 behavior be restored?
That was click to quick play, redundant with click in the (lower part of) the
ruler.
2016-04-26 12:12:06 -04:00
Paul Licameli
fb2bc65168 Exchange the effects of page up and page down keys. 2016-04-21 12:40:11 -04:00
Paul Licameli
26771b6db9 Add transport menu items for scrubbing and seeking...
... This includes new always-seeking modes unlike scrubbing which can switch
to seeking and back according to the left mouse button state.

The reason for this is that visually impaired users should not be required to
click with the mouse in the track panel window to signal seeking.  But mouse
movements can still control scrubbing, because we poll the global mouse
position in the timer, not relying on events from any window object.
2016-04-21 12:13:39 -04:00
Paul Licameli
169958bdd8 Remove a comment 2016-04-20 19:41:03 -04:00
Paul Licameli
81fae8d71c Rework the ESC key to stop playback as an application event handler...
... So it does not depend on the focused window, and can work when selection
toolbar has focus.  But TrackPanel's escape handling may still take precedence
over it.
2016-04-20 15:34:49 -04:00
Paul Licameli
d26395029f ESC key stops play as well as scrub, but not record. Details: ...
... If there is play but also an escapable drag action in TrackPanel, such as
a change of selection, then ESC aborts the drag.  A second ESC would stop play.

The event handling for these ESC actions may be in the wrong place though.  If
you ctrl-f6 during play so that the selection toolbar gets focus, then ESC
does not work to stop play.
2016-04-20 14:08:18 -04:00
Paul Licameli
ce95bce85a Bug991: Pause button and command should be disabled during scrubbing...
... and they will be as soon as ctrl-mouse down.
2016-04-18 21:49:27 -04:00
Paul Licameli
0514ed432a Bug1052: Appearance should change immediately after ctrl-(double-)click...
... for scrubbing.

Now the green play indicator appears, though the play button on the control
toolbar does not go down until the mouse moves.
2016-04-18 20:28:33 -04:00
Paul Licameli
4fc4f529a0 Bug1053: Meaningful status bar messages for scrubbing 2016-04-18 19:28:56 -04:00
Paul Licameli
c99d2df05d ESC key stops scrubbing 2016-04-18 14:37:33 -04:00
Paul Licameli
9f65b80647 Reimplement quick play indicator as an overlay like the cursor 2016-04-18 14:31:36 -04:00
Paul Licameli
8b7ae748a3 Scrub speed as overlay; scrub event handling details out of TrackPanel.cpp 2016-04-18 14:31:36 -04:00
Paul Licameli
1722ee9e32 Define TrackPanelOverlay, use it to reimplement play indicator and cursor...
... but scrub speed display is disabled
2016-04-18 14:31:36 -04:00
Paul Licameli
def8b7fa9b MakeCursor returns smart pointer; TrackPanel stores smart pointers to cursors 2016-04-09 23:07:27 -04:00
Paul Licameli
b28ec2957a Make EXPERIMENTAL_MIDI_OUT compilable, but it doesn't link 2016-04-09 15:10:05 -04:00
Paul Licameli
05f5375e4a Use std::vector for wave track locations 2016-02-27 12:08:03 -05:00
Paul Licameli
990080ae7d Replace virtual with override wherever possible; eliminate needless virtual...
... for functions in final classes.

override is like const -- it's not necessary, but it helps the compiler to
catch mistakes.

There may be some overriding functions not explicitly declared virtual and I did
not identify such cases, in which I might also add override.
2016-02-26 12:35:38 -05:00
Paul Licameli
7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
2016-02-24 20:58:30 -05:00
Paul Licameli
cd9bd79d83 Use an enumeration for UndoManager::PushState 2016-02-24 19:10:35 -05:00
Paul Licameli
73ced7b93f Remove UndoManager.h from other headers 2016-02-24 19:10:34 -05:00
Paul Licameli
c98b090182 Rename SyncLockTracksIterator::First to StartWith to be consistent 2016-02-24 12:59:28 -05:00
Paul Licameli
9bf098c7d9 Sweep unnecessary wxString copies: rest 2016-02-23 02:15:56 -05:00
Paul Licameli
dbaa811577 Stack-allocate where possible! ...
... Removed many unnecessary naked news and deletes.
2016-02-17 18:15:57 -05:00
Paul Licameli
df6a7c5464 More uses of safenew for classes we derive from wxWindow classes...
... Also removed some unnecessary deletes of widgets that are managed by parent
windows
2016-02-14 20:39:28 -05:00
Paul Licameli
3f237daddc Use macro safenew for many allocations of wxWindow subclasses 2016-02-14 20:20:19 -05:00