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

47 Commits

Author SHA1 Message Date
Paul Licameli
e1473dfe76 void return, not boolean success, from some Track virtual functions...
... The return codes were mostly ignored anyway, and exceptions will be thrown
instead.

It seems there was also confusion whether the return values of Track::Paste
and Track::SyncLockAdjust were to indicate success or indicate whether there
was any change.  No matter now.
2017-03-31 18:26:52 -04:00
Paul Licameli
25619fb46e Don't create placeholder clips in Duplicate command ...
... when there is no clip at the right edge of the selection.
2017-03-17 17:52:39 -04:00
Paul Licameli
81285ee0c1 More const and override 2017-03-17 17:52:20 -04: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
Paul Licameli
46f38708ed Dir manager uses std::shared_ptr 2016-08-13 12:23:05 -04:00
Paul Licameli
f1799521aa Bug1349 again: Fix export and import of no-name labels 2016-07-12 22:16:15 -04:00
Paul Licameli
cb3e5e6d4f Bug1443: Various odd behavior of label text editor, fixed...
... And label track selection code is simpler to understand, without delayed
side effects happening during drawing.

Left and right arrow keys collapse text range selection correctly
Shift-click adjusts the end of selection nearest the pick
Right (and middle) click and drag do not affect the selection
Copying empty selection has no effect on the clipboard
Left-drag behaves independently of previous selection state
2016-07-11 19:01:28 -04:00
Paul Licameli
ac2730170d Import and Export are methods of LabelStruct 2016-07-10 20:02:14 -04:00
Paul Licameli
0857118916 Put labels directly in a vector, not pointers to them...
... but this brings back some "mutable" members, not in LabelTrack, but in
LabelStruct.

To make that go away, and still have the Draw function const, figure out how to
update the label track layout at the right times, outside of the draw function.
2016-07-10 03:21:06 -04:00
Paul Licameli
15bb2f0434 Lower a piece of text box dragging logic out of TrackPanel...
... This might cause more redrawing of label tracks for left click without
Shift, but who cares.
2016-07-10 03:21:05 -04:00
Paul Licameli
7055a0f7c0 Remove two more unnecessary LabelTrack members; no more mutables! 2016-07-10 03:21:05 -04:00
Paul Licameli
06fd481815 Don't need to delay certain state changes of LabelTrack until drawing 2016-07-10 03:21:05 -04:00
Paul Licameli
7a7379c6fc Label text coordinate calculations don't need a window 2016-07-10 03:21:05 -04:00
Paul Licameli
f01fc64a2d More safenew, const functions, remove unnecessary members 2016-07-10 03:21:05 -04:00
Paul Licameli
39063fba94 Guarantee default selection shows in Label Track's Font listbox...
On my Macintosh, with no audacity.cfg, selection is Lucida Grande when the
dialog opens.

Formerly, I saw no selection.
2016-06-23 13:45:22 -04:00
Paul Licameli
3015a9c8d9 Track cut and copy functions return a unique_ptr argument...
... Because they are factory functions.
2016-03-26 11:50:13 -04:00
Paul Licameli
f42a953752 Track duplication methods return unique_ptr, although some callers...
... simply release() them for now.
2016-03-26 11:50:10 -04:00
Paul Licameli
48a5f55179 More const qualifiers, for copying of tracks, and replacing in lists of tracks
... (the tracks may be const, not the list, when replacing)
2016-02-27 17:30:30 -05:00
Paul Licameli
d097c7fad4 More const qualifications. The source of a paste is const. 2016-02-27 12:54:57 -05:00
Paul Licameli
70c1d57591 More const qualifications, and mutables, for functions that draw tracks...
... The display related  members that had to become mutable are probably
ones that don't belong in the track classes, ultimately.
2016-02-27 12:35:17 -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
ba4006a454 Removed unused functions of LabelTrack, but was there an error? 2016-02-26 12:35:28 -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
a5b6c9fd8f Add some const qualifiers; define TrackListConstIterator 2016-02-24 19:10:39 -05:00
Paul Licameli
56e7653343 "delete"->"DELETE" in comments, easier to find remaining naked operator delete 2016-02-14 18:50:45 -05:00
Paul Licameli
39399d6d8c Bug30: Safer fix avoids crashes! 2016-01-23 11:35:37 -05:00
Paul Licameli
116ea61d11 Bug30: During playback, after CTRL+M, chars, ENTER -- restore track focus. 2016-01-21 10:18:41 -05:00
Paul Licameli
f5f436a3d1 Define LabelTrack::OverATextBox for future use 2015-08-29 13:49:54 -04:00
Paul Licameli
439fdc66ff weaken dependency of TrackPanel.cpp on LabelTrack.h, a bit 2015-08-23 19:02:06 -04:00
Paul Licameli
5580aececc Untangle the control flow of mouse event handling in label tracks 2015-08-10 20:02:24 -04:00
Leland Lucius
f36fe29f96 Fixes for bugs 1122 and 1113
Several other issues were also fixed (hopefully ;-)).

This is a major change to accelerator handling and keyboard
capturing.  Menu shortcuts, non-menu commands, label editing,
navigation, and basically anything else were you might use
the keyboard should be thoroughly tested.
2015-08-08 00:01:24 -05:00
Leland Lucius
7877615454 Move label context menu handling to label track
Application key now brings up the context menu while editing labels
as it should.  This wasn't possible with the old keyboard handling.
2015-07-30 10:38:03 -05:00
Paul Licameli
e0f4595485 TrackArtist, LabelTrack, TimeTrack, Envelope functions take ZoomInfo...
... and SelectedRegion, and not ViewInfo or zoom level as a double.

Also some leftOffset arguments.

Assumptions of uniform zoom level persist in TrackArtist::DrawClipSpectrum and
in TrackArtist::DrawClipWaveform but no longer in the rest.
2015-07-19 11:44:13 -04:00
Paul-Licameli
1f9113f5cc Label track event handler does not directly use zoom (pps) values 2015-07-19 11:44:07 -04:00
Paul-Licameli
bdc2839112 Preliminaries for bug 900
Create WaveTrackCache as a utility class but don't use it anywhere yet.

The possible minor performance problem with effects is fixed by changes
in WaveTrack::GetBestBlockSize().
2015-05-26 20:02:37 -04:00
Paul-Licameli
7d6de21e3a Enh809 - Add persistency of spectral selections, including those in labels 2015-04-10 15:20:50 -04:00
james.k.crook@gmail.com
f5e593cc4c Paul L's new SelectedRegion class replacing use of t0 and t1. Also LabelTrack.h no longer in TrackPanel.h includes.
This change is believed to be a direct refactoring that does not change functionality.  It paves the way for more complex kinds of selection, such as selections involving frequency as well as time.  It also reduces risk of left and right edges being swapped in future code using SelectedRegion, as the default is to swap on assignment if needed.
2014-10-05 17:10:09 +00:00
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
martynshaw99
4ce2643d5f Remove the
// Indentation settings for Vim and Emacs
etc. lines from all files, as Campbell's patch (except for other changes to Languages.cpp)
2013-09-24 00:14:37 +00:00
RichardAsh1981@gmail.com
22166968d3 convert commented out code into a comment on why the obvious code would be wrong 2013-08-30 19:17:04 +00:00
james.k.crook@gmail.com
53032f04f8 Fixed missing include <listctrl.h> and fixed warning on LabelArray from DLL exporting. 2013-08-24 22:16:47 +00:00
v.audacity
0670dbc753 Expose LabelTrack stuff to DLL interface, per "Developing an Plug-in that charges labels and cues from a wav file" thread on audacity-devel. 2013-08-22 20:52:56 +00:00
BusinessmanProgrammerSteve
f6327602e8 Improve consistency of copy/paste operations in label tracks;
use new background-drawing function in label tracks.
2010-09-18 17:41:15 +00:00
BusinessmanProgrammerSteve
23ed04bc6a Improve key/character event handling, esp. for Unicode entry on Windows. 2010-05-11 22:10:44 +00:00
businessmanprogrammersteve
e35e019e17 Change lots of code that uses linking to use the new
scheme.
2010-02-16 20:50:38 +00:00
james.k.crook
5f0a075026 Bugzilla#109 more intuitive label movement. Now circle moves label, chevron moves edge whilst retaining boundary moving behaviour when labels abut. 2010-02-07 11:11:35 +00:00
ra
e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00