1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-07 15:22:34 +02:00

164 Commits

Author SHA1 Message Date
Paul Licameli
080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -05:00
Paul Licameli
2fbe04eda0 Replace more Connect with Bind; needed redeclaration of custom events 2018-02-21 19:30:40 -05:00
Paul Licameli
e0d826a542 Prohibit copy of TrackList, no longer needed; allow swap and move 2018-02-21 19:21:01 -05:00
Paul Licameli
539e870302 Add machinery to TrackList for pending changes to tracks 2018-02-21 19:20:56 -05:00
Paul Licameli
33cfd92c0a Define TrackId to identify tracks across undo states 2018-02-21 19:20:56 -05:00
Paul Licameli
3f05063681 Split "Do" functions out of the "Set" functions for some Track settings 2018-02-21 19:20:55 -05:00
Paul Licameli
242e9a5668 Some reimplementation of track iterators and GetLink() ...
... avoiding direct usage of the inherited end() and of the increment and
decrement of the std::list iterators
2018-02-21 19:20:55 -05:00
Paul Licameli
4ef8da8f16 Revert "Preliminaries to support better interaction of undo and recording"
This reverts commit 6e75ae58ac56d9c94af5a4ce97951f627808473a, reversing
changes made to 714d53e00f803643131bb775858ac930b39dd5b8.
2018-01-14 21:36:33 -05:00
Paul Licameli
950898dcb9 Revert "Bug 1823: Better interaction of undo and record..."
This reverts commit 1e8aba968da56374d74fb5589caa56caf5fe1283, reversing
changes made to 6e75ae58ac56d9c94af5a4ce97951f627808473a.
2018-01-14 21:27:41 -05:00
Paul Licameli
2409d46d4c Prohibit copy of TrackList, no longer needed; allow swap and move 2018-01-14 19:33:39 -05:00
Paul Licameli
ce5a67a9e9 Iterate over the pending tracks for drawing 2018-01-14 19:04:03 -05:00
Paul Licameli
a0c3a4b43c Add machinery to TrackList for pending changes to tracks 2018-01-14 19:03:57 -05:00
Paul Licameli
bd2c7e6abc Define TrackId to identify tracks across undo states 2018-01-14 19:03:54 -05:00
Paul Licameli
8b60e7f02d Split "Do" functions out of the "Set" functions for some Track settings 2018-01-14 19:03:52 -05:00
Paul Licameli
92ba1f10e1 Some reimplementation of track iterators and GetLink() ...
... avoiding direct usage of the inherited end() and of the increment and
decrement of the std::list iterators
2018-01-14 19:03:50 -05:00
Paul Licameli
0265b8792d More stl idiom for TrackList and its iterators 2018-01-14 16:58:19 -05:00
Paul Licameli
a30defe8ca Redo "Provide STL idiom for iterating tracks..." ...
... Being careful not to use operator == on a default-constructed
std::list::iterator, which violates assertions in the MSVC libraries.

This reverts commit 7fb5ec4b7ab4f9302bd94446db86924cd2b8d67f.
2018-01-14 14:25:02 -05:00
James Crook
7fb5ec4b7a Revert "Provide STL idiom for iterating tracks..."
Unsafe on MSVC 2013.
2018-01-14 14:24:21 +00:00
Paul Licameli
f9dab3679c Provide STL idiom for iterating tracks...
... and require qualified name access to use the underlying std::list iterators
that return shared_ptr to Track.

Which should not be done very much outside of class TrackList, but a few
places need it.
2018-01-13 19:37:05 -05:00
Paul Licameli
5407079c62 Remove EXPERIMENTAL_OUTPUT_DISPLAY...
... Maybe a good feature idea, but the implementation pollutes the code in
too many places.

It's a special case of the more general idea of many-to-one associations
between screen rectangles and track objects.  More generalized ways to
accommodate that should be sought.
2018-01-12 12:08:09 -05:00
Paul Licameli
c975de8c5e More use of shared_ptr to Track, for safety...
... This even makes it possible to remove the prohibition of undo and redo
during transport, not that we want to though.  Playback and recording will
continue, using track objects that might not be in the current project.
2018-01-10 20:05:11 -05:00
James Crook
13c6fdf663 VZooming Changes
1: Guard zone 8 pixels wide in VRuler to reduce risk of accidental use.
2: VerticalZooming preference, for VRuler zooming, off by default,
3: Enabled Paul's right-click menu in VRuler with some extra
presets (x2 and x0.5)
4: Rearranged some messy code with lots of ifs to use a switch.

Also, with EXPERIMENTAL_HALF_WAVE defined we now get a
'half wave' option in the VRuler menu, that shows the wave top half.
We also use it in collapsed waves (and collapsing and restoring
a WaveTrack will get you back to normal zoom.
2017-12-11 18:41:48 +00:00
James Crook
f463eda36c Clean up some dead code and MSVC warnings.
- Dead code from experiments in SelectionBar removed.
- Many warnings about unused parameters fixed with WXUNUSED()
- Many warnings about signed / unsigned comparisons cleaned up.
- Several 'local variable declared but not used' warnings fixed.
2017-12-08 15:20:39 +00:00
Paul Licameli
f136b5c530 Reviewed uses of InconsistencyException outside Sequence.cpp 2017-11-19 01:48:41 -05:00
Paul Licameli
5dd72acc02 Bug1770: fix crash applying chains 2017-11-04 20:59:55 -04:00
Paul Licameli
8279adc797 Changing NoteTrack height, keep # of piano keys (roughly) constant...
This fix is imperfect, but quick and easy
2017-07-19 14:46:23 -04:00
Paul Licameli
8fae9802dc Prohibit use of inherited TrackList::clear() 2017-07-14 22:30:02 -04:00
Paul Licameli
8bf3791edf TrackList constructed only by factory function, to avoid more trouble 2017-07-14 21:55:32 -04:00
Paul Licameli
67282cbb61 SnapManager::Snap returns its results in a struct 2017-07-13 12:11:13 -04:00
Paul Licameli
bca09f4320 null check 2017-07-10 11:53:23 -04:00
Paul Licameli
16645f6b95 Back-pointer from Track to TrackList is weak (fixes crashes) 2017-07-10 11:48:11 -04:00
Paul Licameli
8e44827980 TrackPanelCell hit tests can return multiple results...
.. though only the first is used yet
2017-07-09 08:17:40 -04:00
Paul Licameli
b3d62e2ab6 Simplify by removing class HitTestResult...
... Because all hit tests returned all fields blank, or else, returned a
UIHandle object whose Preview method gives the rest of the information; so
the other fields were redundant.
2017-07-09 07:57:34 -04:00
Paul Licameli
2c1a16f593 Changed lifetime management of UIHandle objects, no singletons...
... Rather, construct them during hit tests (also capturing more state sooner
rather than at Click time, and adding some accessors for later use)

This also fixes bug 1677 by other means and avoids similar problems.

A cell may be implemented to re-use a previously hit handle object, not yet
clicked, in a later hit test, by remembering a weak pointer, but TrackPanel
holds the strong pointers that determine when the object is destroyed.

And the objects will surely be destroyed after drag-release, or ESC key.

For now they are also destroyed whenever not dragging, and hit-testing is
re-invoked; that will be changed later, so that the re-use mentioned above
becomes effective, but still they will be destroyed when the pointer moves
from one cell to another.
2017-07-09 07:23:28 -04:00
Paul Licameli
3a8280c562 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.
2017-07-09 06:38:55 -04:00
Paul Licameli
6684c7b9b0 More careful use of weak pointers to tracks in UIHandles 2017-06-28 01:46:59 -04:00
Paul Licameli
708d84ac22 CommonTrackPanelCell::FindTrack returns shared_ptr 2017-06-27 23:09:35 -04:00
Paul Licameli
bce3571372 Redo hit test priorities in TrackPanel...
Zoom tool takes precedence;

Otherwise do special hits appropriate to the track subclass -- and only
WaveTrack here uses Tools toolbar state, and now disallows clicks on things
when they are not drawn because the view is spectrogram;

Finally, default to right button zooming in Multi tool, or to time shift in
that tool, or to selection adjustment in Multi or in Select tool.
2017-06-27 08:26:07 -04:00
Paul Licameli
28b40e02fb Manage TrackPanelResizerCell by shared_ptr, no singleton 2017-06-26 16:39:07 -04:00
Paul Licameli
35ce499ce1 Manage TrackControls and TrackVRulerControls by shared_ptr; ...
... they are not singletons; and the back-pointers to their Tracks are weak.
2017-06-26 16:34:10 -04:00
Paul Licameli
2806b509e2 Fix crashes in repainting, and update first visible track correctly 2017-06-26 15:20:35 -04:00
Paul Licameli
d3c9a1decb JAWS fix?: Now do the delay of event handling...
... Queue, don't immediately process, TrackList events, and if listeners want
to hold pointers to tracks, let them use weak_ptr or shared_ptr
2017-06-25 13:35:17 -04:00
Paul Licameli
bd5d2bf114 Accessor for shared pointer to track, given only a bare pointer 2017-06-25 13:35:15 -04:00
Paul Licameli
750fc34fac Clarify what the TrackList events are for...
Also fixes this bug:

Vertical rulers did not narrow as needed after deletion of the lowest track.
2017-06-25 03:00:28 -04:00
Paul Licameli
68dfdab843 Store tracks in TrackList with shared_ptr ...
... but still use unique_ptr from track factories and importers.
2017-06-23 15:05:50 -04:00
Paul Licameli
14d45eda33 Define and use the UIHandle and TrackPanelCell protocols, but...
...no actions reimplemented to them yet.

Later commits will move special cases one at a time from TrackPanel, preserving
all click and drag capabilities at each step.  With a few exceptions, but those
lost abilities are restored in yet later commits.  (Ctrl+Click on the Label
track being one.)
2017-06-15 08:20:56 -04:00
Paul Licameli
f0c149b890 Default MIDI track height is enough to display velocity slider...
... It is computed from the layout table, and in fact comes to 158 pixels,
versus 150 for other tracks.
2017-06-06 22:39:30 -04:00
Paul Licameli
721faf89c6 Avoid possible dangling pointer problems with EVT_TRACKLIST_UPDATED 2017-06-01 14:40:05 -04:00
Paul Licameli
4b2b0d9b91 Fix Windows warning: inconsistent DLL linkage between base & derived 2017-05-23 13:06:50 -04:00
Paul Licameli
3aff330671 Fix compilation of EXPERIMENTAL_OUTPUT_DISPLAY; fix a warning in it 2017-04-23 07:58:11 -04:00