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

334 Commits

Author SHA1 Message Date
Pokechu22
a76ad22c91 Fix midi channel toggling
This reintroduces the buttons to toggle display of individual midi
channels, and cleans up the code behind that feature.

This functionality has actually been present in production versions of
audacity for a while, at least for clicking.  However, the buttons
themselves were not drawn, making it exteremly painful (but possible) to
use.

As requested by PRL, this is always enabled if USE_MIDI is defined.
2017-05-02 00:37:31 -04:00
Paul Licameli
5dd6a3558b Use #ifdef not #if in two places 2017-04-29 15:53:55 -04:00
James Crook
8ad2e599ab Tweak Theming. Reticules, Down buttons; Selected buttons. 2017-04-06 20:44:24 +01:00
James Crook
fefc856901 Update slider in tracks on theme change. 2017-04-05 20:16:12 +01:00
David Bailes
a7a4a70e5f Two commands added, neither on a menu:
Clip Left
Clip Right

If the cursor lies within a clip, the clip and the cursor is moved 1 pixel left/right.
If the cursor position is at both a clip end and a clip start, the second of these clips is moved.

The movement currently ignores the snap to setting on the selection bar, and there is no snapping to the clip boundaries of other clips.
Following the behaviour or shifting with the mouse, the distance moved is rounded to an integral number of samples, and the minimum distance moved is one sample.
2017-04-03 13:53:48 +01:00
James Crook
028ed19d90 Sync with DarkAudacity 2017-04-02 23:07:13 +01:00
Pokechu22
59d740ad77 Use a dedicated velocity slider for note tracks
This gets rid of the offset rectangle hack that was needed to re-use gain
sliders for note track velocities.  It also removes the need for changing
the style of a single slider.  Perhaps most importantly, it fixes link
errors regarding GainSlider(int).

See https://sourceforge.net/p/audacity/mailman/message/35752524/ for
details on why this change is needed and what caused it.
2017-04-01 12:48:43 -04:00
Paul Licameli
0af9b46eac Move many fields out of Envelope that are needed only during editing 2017-03-17 17:52:31 -04:00
Paul Licameli
54aea4bccf Rewrite TrackPanel::FindTrack as FindCell ...
... which reports disjoint rectangles for the track control panel, the vertical
ruler, and the proper track area.
2017-03-17 17:52:28 -04:00
Paul Licameli
81285ee0c1 More const and override 2017-03-17 17:52:20 -04:00
Darrell Walisser
43291687a5 Bug 1401 - Wait for window visibility before starting timer 2017-02-25 16:16:42 -05:00
David Bailes
ff9763f984 Add two commands to move the cursor/selection to next/prev label
The two commands are "selection to next label" and "selection to previous label".
They have default shortcuts alt+right and alt+left.

A label track does not have to be the focus. If there is a single label track in the project, that it used. If there is more than one label track, then the first label track, if any, starting at the focused track is used.

If the commands are used during playback of the project, playback continues from the new cursor/selection.

The commands provide feedback to screen readers: the name of the label, and position in the form of "i of n".
2016-10-24 14:24:20 +01:00
James Crook
fe2dfca3e0 Bug 1522 - No pointer or Status Bar indication of CTRL-click in waveform to move selection boundary
I also took the opportunity to modifier the Status Bar indications when in the TrackInfo.
1) We now mention ctrl click can select or deselect track.
2) If there is only one track, we don't now prompt about rearranging tracks, since you can't.
3) If you hover in a label track's VRuler (which is just a spacer so that things line up), you now don't get a message.
2016-10-07 21:38:18 +01:00
James Crook
37a0cd3af6 Bug 1484 - Cannot one-step extend/contract selections vertically or horizontally to specific TrackSelFunc
Progresses us a little towards closing.  Ctrl-Click on waveform now removes track selection status, not just adds it, and we don't flicker on again subsequently when we drag.  Ctrl-Click won't remove the last remaining selection (by design).  Shift-Click can now reduce us down to one track, rather than the previous behaviour when reducing track selection.
2016-10-03 13:28:25 +01:00
Paul Licameli
88611a4530 Fewer C-style pointer casts of tracks; comments justify static_cast 2016-09-15 12:12:43 -04:00
James Crook
0f417a65c7 RaphaelMarinier - Initialise mFreqSelTrack (found by Valgrind) 2016-09-11 22:00:01 +01:00
James Crook
c57f829200 Bug 1484 - (Residual) Shift-Click calculates start/end for itself.
Smarter logic, which extends down from the first or up from the last.
2016-08-30 23:46:12 +01:00
Paul Licameli
5761972dfa BHug1488: Don't crash exiting from command-line benchmark test...
Problem was that cfd7648fce2388ec8ae35b38004f2ae111c484af fixed a memory leak
but created a dangling pointer bug, which does not happen during usual run
of Audacity because AudacityProject::OnCloseWindow is reached then before
destroying AudacityProject.

Fixed it by using a std::shared_pointer for the TrackList that both
AudacityProject and TrackPanel must use.
2016-08-20 13:58:56 -04:00
Paul Licameli
13e056de43 More uses of safenew 2016-08-08 10:07:37 -04:00
Paul Licameli
60260520dc Remove some naked new amd delete in: TrackPanel 2016-08-08 07:38:30 -04:00
Paul Licameli
3b6dcfcc32 Remove some naked new amd delete in: TrackPanel::mAx 2016-08-08 07:38:30 -04:00
Paul Licameli
cc5d1036fa Pinch and spread gestures on Mac touchpad, if EVT_MAGNIFY is defined 2016-07-03 12:14:08 -04:00
Paul Licameli
28c31903e9 Update mixer board selection state correctly for undo/redo 2016-06-26 13:31:00 -04:00
Paul Licameli
4823244050 Bug1426: Better selection for key-modified clicks in TCP, Mixer board 2016-06-26 12:03:45 -04:00
Paul Licameli
ee7b3b2b89 Bug1426: Update mixer board for change of set of selected tracks 2016-06-26 11:24:11 -04:00
Paul Licameli
21431d1982 No longer need silly extra indirection to void a VS compiler warning 2016-06-26 10:45:57 -04:00
Paul Licameli
dd786984db Bug320: Better change of selection when Shift+Click in a track...
... But Shift+Click in the track control panel is still different:  se bug 1425
2016-06-26 10:39:29 -04:00
Paul Licameli
1409c9507d Fix crashes when opening track control panel menu 2016-06-13 10:06:20 -04: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
4f2ee32a1a One second countdown now based on the correct timer interval 2016-05-27 11:40:17 -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
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
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
Paul Licameli
e7477746df Computing best font size for TrackInfo is redone when preferences change 2016-05-01 17:55:48 -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
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
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
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
0c9deb398c Fix mac build. No standard headers in Audacity.h. 2016-03-01 12:22:37 -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
e2f7e5f6f6 travis 2016-02-24 20:45:49 -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
9bf098c7d9 Sweep unnecessary wxString copies: rest 2016-02-23 02:15:56 -05:00