1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-05 14:18:53 +02:00

754 Commits

Author SHA1 Message Date
James Crook
657159d542 Fix C4189 and C4100 Warnings
C4189 is 'Local variable initialised but not used'
C4100 is 'Unreferenced parameter'

Fixed some other warnings, e.g. about empty if, too.
2018-10-10 19:46:24 +01:00
Paul Licameli
0a55b27d2d Bug1994: Crashes in append-record...
... The crash happened in drawing code.  The recently submitted but long
developed rewriting of track and channel iterations wasn't all reconciled
with the early 2.3.0 development relating to temporary track objects for
display purposes, which was for fixing the interactions of recording and undo.
2018-10-03 13:21:15 -04:00
Paul Licameli
b5f52e7c1c Remove old style track iterator classes 2018-10-01 13:42:34 -04:00
Paul Licameli
a68184f81d Remove GetLink(ed) in track panel drawing and refresh 2018-10-01 13:42:30 -04:00
Paul Licameli
669054b4f4 Remove many uses of GetLink in TrackPanel 2018-10-01 13:42:24 -04:00
Paul Licameli
0c0c2c0d1e Rewrite iteration over visible tracks in TrackArtist...
... also eliminating AudacityProject::GetFirstVisible.
2018-10-01 13:41:51 -04:00
Paul Licameli
23a85893a1 Rewrite some iterations over tracks and channels in TrackPanel 2018-10-01 11:24:25 -04:00
Paul Licameli
b94e8fec96 Remove VisibleTrackIterator 2018-10-01 11:20:52 -04:00
Paul Licameli
fd10ed26cd Use TypeSwitch and track_cast in TrackPanel 2018-10-01 10:58:33 -04:00
Paul Licameli
5d174b2126 Minor corrections to TrackPanel drawing...
... Use correct symbolic constants in three places (no effect);

use proper theme color for the two pixels per track that are left of and
above the shadow (small effect when not Classic theme)
2018-09-15 16:52:39 -04:00
Paul Licameli
34cc1ff577 Rename, rewrite, and simplify use of FindPendingChangedTrack 2018-09-13 13:56:47 -04:00
Paul Licameli
a5c50a112a more const in drawing functions 2018-09-13 13:53:58 -04:00
Paul Licameli
328aa58966 Bug1933: commit 2c28af05e8be98aa9ab609823d1ff1d27fb needs null checks 2018-08-12 15:44:08 -04:00
James Crook
bf6b47dbb4 Bug 1918 - Left to right (LTR) language selection reverses elements that should not be reversed
This does not entirely fix LTR language support, but dramatically ameliorates the problems originally reported in bug 1918.
2018-08-08 16:33:00 +01: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
2c28af05e8 Don't hit any TrackPanel or Ruler cells when mouse is out of window 2018-08-06 21:52:46 -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
f6609e5ffb Move class CellularPanel into its own files 2018-08-05 14:02:55 -04:00
Paul Licameli
7f84e71324 Context menu handling is also in CellularPanel 2018-08-05 14:02:55 -04:00
Paul Licameli
c08c17eafa Add a method to find the rectangle of a given cell...
... Cells are not responsible to remember that; the cells' container determines
that.
2018-08-05 14:02:55 -04:00
Paul Licameli
062066eb79 Split base class CellularPanel out of TrackPanel...
... To be reused with the Ruler too.

The new base class does all the handling of hit tests on cells and managing
of UIHandles, and keyboard events and focus.

It has no knowledge of tracks -- that all resides in overriding functions in
TrackPanel.

Still to do, of course, is reorganizing drawing with callbacks to the cell
objects.
2018-08-05 14:02:52 -04:00
Paul Licameli
d76777bef7 Each cell can define cursor, status, and tooltip in default of hit tests 2018-08-05 13:28:36 -04:00
Paul Licameli
98514194a4 ProcessUIHandleResult takes pointers to TrackPanelCell 2018-08-05 13:28:34 -04:00
Paul Licameli
7395e5acbd Remove pTrack from FoundCell; new function hides some casting 2018-08-04 15:35:36 -04:00
Paul Licameli
79067e43f0 ProcessUIHandleResult is a member function of TrackPanel 2018-08-04 15:35:36 -04:00
Paul Licameli
bbe54f47ca a null check would have fixed crash at 902e1ab0a1 when recording...
... a mono channel into the left side of a stereo track; crash was in drawing;

other code now prevents such recording, but that prevention might be revised
again.
2018-05-24 18:38:04 -04:00
Henric Jungheim
d8da4015ef Make it possible to const'ify xpm. 2018-03-27 05:36:02 -04:00
andheh
ade7854c1d fixed "statement has no effect" warnings 2018-03-06 21:29:31 +00:00
James Crook
e3ef968d57 Add DragCommand. Default Y/N on optional fields. Open/Save project items.
- More Y/N in Optional, making it easier to omit parameters.
- AT removed from Envelope, since T already gives it.
2018-02-24 14:20:29 -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
bf5228267a Calls to Disconnect or Unbind in destructors are not needed, if...
... it's either the source of the connection that is being destroyed, or other
object (such as an ancestor window) transitively owning it and so causing it to
be destroyed too;

or, the sink is being destroyed, and that sink is a wxEvtHandler (which is
always so for Disconnect, though not for Unbind in case Bind was passed a
member function of a non-wxEvtHandler).

wxWidgets takes care of erasing the connection in such cases.

This removes most calls to Disconnect and Unbind.  Many destructors shrank to
nothing.

Notably, in case of popup menu handling, the call to Disconnect is not removable
because the object being destroyed is neither the source nor the sink.
2018-02-21 19:28:06 -05:00
Paul Licameli
28eeca5fa7 Iterate over the pending tracks for drawing and sizing the scrollbars 2018-02-21 19:20:58 -05:00
Paul Licameli
d08ae18ca4 Change details of focusing of tracks in presence of pending ones...
... Don't focus a pending changed track but remap it to the original.

You can focus a pending added track.
2018-02-21 19:20:58 -05:00
Paul Licameli
539e870302 Add machinery to TrackList for pending changes to tracks 2018-02-21 19:20:56 -05:00
Paul Licameli
52a7f2320d Re-fix some warnings about mixing signed and unsigned better...
... Assuming that large unsigned magnitudes with high order bit set are not
the problem, but signed negatives of small magnitude may be:

1) Always cast the unsigned to signed in comparisons, not the other way.

Also:

2) Cast unsigned TERM to signed by itself, before subtracting.  Don't cast
the result.

3) Rewrite some comparisons by moving subtracted term to other side.

See commits
d2fe7b1757d77d93d82d53685a118517a4d2e996
f463eda36c059236ecc168919c745eb687170c95
2018-01-23 18:51:53 -05:00
Pokechu22
1c36409da2 Bug 1819: Hover indication on note track channel toggle appears on all tracks (when they rerender) 2018-01-19 17:01:37 -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
ce5a67a9e9 Iterate over the pending tracks for drawing 2018-01-14 19:04:03 -05:00
Paul Licameli
7d57a17ff4 Change details of focusing of tracks in presence of pending ones...
... Don't focus a pending changed track but remap it to the original.

You can focus a pending added track.
2018-01-14 19:04:01 -05:00
Paul Licameli
a0c3a4b43c Add machinery to TrackList for pending changes to tracks 2018-01-14 19:03:57 -05:00
Paul Licameli
0265b8792d More stl idiom for TrackList and its iterators 2018-01-14 16:58:19 -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
def1d52505 Substitute, don't concatenate, when composing localized strings...
... Avoid English syntax bias.
2018-01-04 04:30:46 -05:00
Paul Licameli
095ee9185f Reimplement the narrowed hot zone for vertical ruler...
... Don't define the TrackPanelCell to be narrower.  Instead, change its
hit-test routine, and only if it is a Wave track.

Previous implementation had the unintended consequence, that a click in the
area excluded from vertical zooming was treated as a click on the background
outside of all tracks, causing de-selection of all tracks.
2017-12-20 23:20:05 -05:00
Paul Licameli
0c2f6bb176 Fix end of range of TrackPanelCellIterator 2017-12-20 11:21:29 -05:00
James Crook
2108515938 Bug 63 - Analysis effects that create labels should give focus to label Track
If a generator, effect or analyser has created a new track, scroll to the bottom of the track list.
Acheived using new function, VerticalScroll()
2017-12-17 14:59:59 +00:00
James Crook
3379b4e499 VZoom cfg defaults different for Audacity and DA.
VZooming remains on by default in Audacity itself.
Also kGuard (the gurard zone in the VRuler) reduced from 8 pixels to 5pixels
following feedback from Steve.
2017-12-12 21:06:09 +00: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
cb363cdd99 Make right half of VRuler inactive.
This is a buffer zone to reduce risk of accidental activation of VRuler scaling.
2017-12-08 22:16:18 +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