Paul Licameli
c279fb6588
Choose track or clip shifting behavior without a TypeSwitch...
...
... Preserving existing behavior, but maybe these cases should be reconsidered
and made more uniform. (e.g. should hit test on NoteTrack sometimes miss, as
with WaveTrack?)
Also made details of WaveTrack hit testing consistent with what ClipMenus does
2020-09-19 13:23:47 -04:00
Paul Licameli
8f8c20ac80
TrackShifters can classify track intervals as fixed or not
2020-09-19 13:23:47 -04:00
Paul Licameli
d8a894b95b
Define TrackShifter, subclasses, factory method; collect them...
...
... in TimeShiftHandle. They do nothing useful yet, but responsibilities
will shift into them.
TypeSwitch is avoided and the subclasses are defined in appropriate places
for dependency management, thanks to AttachedVirtualFunction.
2020-09-19 13:23:47 -04:00
Paul Licameli
c7896a3656
Bug2493, Enh2460: Multi-view option in Tracks preferences & macros...
...
... Implemented giving the Multi-view choice the special implementation that it
needs.
The "multi" choice is always last in the preference and in the command editing
drop-down menus, but that could be changed.
Multi-view should not be treated as another registered kind of sub-view on par
with others. This would complicate the implementation in worse ways.
2020-09-10 15:28:28 -04:00
Paul Licameli
42d99db8b8
Revert "Bug 2493 - No command for setting multi-view"
...
This reverts commit 7e573b9b2ffa4dd013bf965bc79755a314db258a.
2020-09-10 13:51:38 -04:00
James Crook
7e573b9b2f
Bug 2493 - No command for setting multi-view
...
Bug 2460 - Enh: Can't select "Multi-view" as default view mode in Tracks preferences
This fixes both.
2020-09-09 17:35:39 +01:00
Yuri Chornoivan
d1ada5f08c
Fix minor typos
2020-04-11 10:06:24 +01:00
Paul Licameli
e4d5eefee0
A tooltip for the sub-view rearranging cursor
2020-02-20 13:25:03 -05:00
Paul Licameli
ab4751d092
Remove some unused things
2020-02-14 09:43:55 -05:00
Paul Licameli
2ec2ad378d
Break dependency cycle introduced at a69fba9
2020-01-19 14:36:28 -05:00
Paul Licameli
7cff170cf7
Sub-view objects report their complete type, not just an enum value
2020-01-18 20:28:53 -05:00
Paul Licameli
36aad4d1c6
Don't hard-code the exhaustive list of sub-view types...
...
... in Wave track context menu and SetTrackVisualsCommand
Instead, discover them through a registry.
This eliminates some duplication of string constants and prepares for
non-intrusive generalization to more kinds of sub-views.
This makes the command agnostic about which subview types are known, but the
context menu still has special case treatment for Spectrogram Settings and
Wave Colors.
2020-01-18 20:26:12 -05:00
Paul Licameli
fb8ba0ce43
Some briefer type aliases for wave track display type
2020-01-18 19:35:17 -05:00
Paul Licameli
000d63c95e
Widen the hot zone for sub-view rearrangement...
...
... so it's wider than the close button
2020-01-17 16:14:23 -05:00
Paul Licameli
f10b303279
A close box button for sub-views
2020-01-17 16:10:46 -05:00
Paul Licameli
0f3f13502c
Fix hot zones of sub-view cursors...
...
which got broken at 876cd92ed3a1729a4211938ab3c67c649df4cb3e
And remove duplicate function
2020-01-17 16:04:45 -05:00
Paul Licameli
851b49d912
Avoid churn of handles for sub-view adjustment and rearrangement
2020-01-17 15:53:33 -05:00
Paul Licameli
b45e3e8aac
Separate default waveform scale choice in Tracks preferences...
...
... Some complications in handling correct migration of preferences from
config files in older versions
2020-01-17 12:28:52 -05:00
Paul Licameli
6c3731061f
Switch priority of adjust and rearrange hit tests for sub-views
2020-01-17 11:03:25 -05:00
Paul Licameli
6fd29ad863
Restrict y coords of the hot zone for the new sub-view rearrangement
2020-01-16 15:01:52 -05:00
Paul Licameli
a95838a3e8
Better cursors for sub-view rearrangement
2020-01-16 12:06:59 -05:00
Paul Licameli
a1ef73398b
Implement click and drag to rearrange sub-view permutation...
...
... The hot zone is 15 pixels wide at the left of the track contents, and the
cursor is a hand. Those particular choices can be easily amended.
2020-01-15 13:50:28 -05:00
Paul Licameli
1fa41808c2
Some refactoring of SubViewAdjustHandle
2020-01-15 13:44:10 -05:00
Paul Licameli
94af81b9f7
Fix Ubuntu build
2020-01-15 11:08:17 -05:00
Paul Licameli
9e0372cbea
Bold, clickable, butting clip boundaries also in spectrum view
2020-01-14 15:16:30 -05:00
Paul Licameli
97b7572504
Stroke clip edges in spectrum views too, improving split appearance
2020-01-14 14:37:54 -05:00
Paul Licameli
d28967b7ad
Bug2275 residual: don't get into state where you can't select audio...
...
... if you enter multi-view, then (try to) toggle both sub-views off.
Now instead, the second toggling will have no effect.
2020-01-09 15:15:11 -05:00
Paul Licameli
dd0e41048f
Bug2282 residual: Partition sub-view heights 1:1 not 2:1...
...
... when doing steps to reproduce in that bug report
2020-01-09 15:15:10 -05:00
Paul Licameli
8fa01eceb4
Bugs 2282, 2275: crashes in multi-view...
...
... when you shrink a sub-view then toggle it, or toggle all views off then
exit multi-view
Fix it by making GetSubViews more robust to contents of mPlacements
2020-01-09 15:15:04 -05:00
Paul Licameli
d01c24d4d6
Revert "Bug 2282 - Multi-view: Array out of bounds exception (crash)"
...
This reverts commit e047c07a90e25eaee775922ee3b963f154c3ea76.
2020-01-09 15:12:00 -05:00
Paul Licameli
da2f5491ae
Revert "Bug 2275 - Crash when unchecking Multi-view with neither of the views checked"
...
This reverts commit 57ff92b20c01ce6da39475858775619a532e106b.
2020-01-09 15:12:00 -05:00
Paul Licameli
d50dae4dd2
Bug2279 fix reimplemented...
...
... Don't hard-code the number of sub-views as two.
This modifies the fix at commit 596fd7c02f487aac65046c0ec46d680d69ee21e8
2020-01-09 14:01:12 -05:00
James Crook
57ff92b20c
Bug 2275 - Crash when unchecking Multi-view with neither of the views checked
2020-01-09 15:56:00 +00:00
James Crook
e047c07a90
Bug 2282 - Multi-view: Array out of bounds exception (crash)
2020-01-09 15:13:36 +00:00
James Crook
596fd7c02f
Bug 2279 - Multi-view: turning it on does not cause a split Multi-view to be displayed
2020-01-09 14:04:31 +00:00
Paul Licameli
f64bc5a829
Pass non-const AudacityProject to HitTest::Preview...
...
... because that will be needed for elimination of some GetActiveProject()
calls. Because some overrides need to find the focused track, but that may
mutate the project by setting the focused track when it wasn't yet defined.
2020-01-04 09:40:33 -05:00
Paul Licameli
0256156dec
Implement Multi View checkbox menu item in wave track TCP...
...
... When it's off (default), Spectrum and Waveform buttons behave as before,
and dragging of the sub-view separator is disabled.
When it transitions to off, and the view is split, then the top sub-view takes
up the whole view.
When it transitions on, nothing visible happens.
When it is on, and you choose Spectrum or Waveform, then the corrsponding
sub-view toggles visibility.
When a sub-view is turned on by the menu item, it appears lowest.
2020-01-01 15:37:49 -05:00
Paul Licameli
917e84f382
Implement double-click at the view separator to split view evenly...
...
... And this can even change an unsplit view to evenly split when you get the
cursor near the top or bottom
2019-12-31 11:21:28 -05:00
Paul Licameli
b747e88304
Bug2256: complete the fix, see 17ed489
2019-12-30 23:11:55 -05:00
Paul Licameli
17ed4899ec
Bug2256: Resizing channels should not change subview proportions
2019-12-30 17:38:07 -05:00
Paul Licameli
0c44d0f7d3
Bug2244: need a distinct cursor for adjustment of split views...
...
... Adapted from the bandwidth adjustment cursor for spectral selection, with
reversal of white and black, so the new ones are white around black
2019-12-30 15:18:31 -05:00
Paul Licameli
49cab86fc1
TranslatableString for tooltips and status bar messages
2019-12-20 21:54:49 -05:00
James Crook
23f05c618c
Fix signed/unsigned comparison warnings.
2019-12-06 11:33:22 +00:00
Paul Licameli
c707edad7a
Don't lose split view after undo & redo, or an effect
2019-11-26 04:49:15 -05:00
Paul Licameli
54e0df5660
Implement a dragging handle to adjust wave track sub-view heights
2019-11-23 16:44:42 -05:00
Paul Licameli
d26b55ee3c
WaveTrackSubView has a back-pointer to the WaveTrackView
2019-11-23 15:27:04 -05:00
Paul Licameli
af9959dc98
Rewrite WaveTrackView::GetSubViews to cache last computed heights
2019-11-23 15:02:09 -05:00
Paul Licameli
633153c91f
Delegate DoDetailedHitTest through base class WaveTrackSubView
2019-07-11 10:37:30 -04:00
Paul Licameli
dd369da6a0
Define WaveTrackView::GetAllSubViews
2019-07-10 11:35:57 -04:00
Paul Licameli
fa6b5dea88
Generalize WaveTrackView::GetDisplay to return multiple values...
...
... something better might be done in Nyquist Lisp, where we still pass a
single value
2019-07-10 10:19:04 -04:00