1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 15:49:36 +02:00

816 Commits

Author SHA1 Message Date
Paul Licameli
c63dcbd3ca Oops, forgot the vertical rulers in the subdivision of TrackPanel ! 2018-11-02 10:30:56 -04:00
Paul Licameli
39fc20c5ee TrackPanelCellIterator is no longer needed 2018-11-01 18:25:02 -04: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
128ba93ae7 Implement TrackPanel::Root() 2018-11-01 18:25:01 -04:00
Paul Licameli
4fe97acbc9 Define CellularPanel::Root 2018-11-01 17:37:22 -04:00
Paul Licameli
30d55f476e Define abstract classes TrackPanelNode and TrackPanelGroup 2018-11-01 17:33:15 -04:00
Paul Licameli
5b01f57919 Update comments about TrackPanel and TrackArtist...
... Remove mention of obsolete plans for TrackPanel refactor, superseded by a
different refactor now accomplished.

Remove detailed mention of names of functions and data members that implement
drawing.

Move most of Roger's comments about drawing into Overlay.h which is now the
more relevant place.

Commented more correctly what TrackPanelListener is.
2018-10-31 08:06:18 -04:00
Paul Licameli
912b24f211 Revert "Small widening of the click-to-deselect area below the tracks..."
This reverts commit c101cf3b32ab5023308f2331b5c49df51a492736.
2018-10-30 21:56:22 -04:00
Paul Licameli
c101cf3b32 Small widening of the click-to-deselect area below the tracks...
... this should make the division of the TrackPanel area defined in
TrackPanelCellIterator::UpdateRect exhaustive.
2018-10-30 13:03:47 -04:00
Paul Licameli
2741d58880 TrackList emits more events for certain changes of state of tracks...
... Also rewrote some of the existing event handling so all events from
TrackList are of the same, custom event class, and distinguishing addition
from resizing events, though this distinction is not yet used
2018-10-27 11:31:42 -04:00
Paul Licameli
303553ae4e Take class AdornedRulerPanel out of src/widgets...
... It's not a utility widget like RulerPanel.  It has a lot of application
specific logic in it.
2018-10-24 15:04:41 -04:00
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