1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 14:02:57 +02:00
Commit Graph

60 Commits

Author SHA1 Message Date
Paul Licameli
6c98a5a2aa In ViewInfo, remove GetLabelWidth() and add comments
(cherry picked from audacity commit cef8e228f9)

Signed-off-by: akleja <storspov@gmail.com>
2021-09-30 12:42:50 +02:00
Vitaly Sverchinsky
30aaad2a1b Splitting mSelIndex
Using mTextEditIndex for tracking active text box index, and mNavigationIndex used to track selection for keyboard navigation purposes See #1195

(cherry picked from audacity commit b90b5cfd47)

Signed-off-by: akleja <storspov@gmail.com>
2021-09-30 12:42:50 +02:00
Vitaly Sverchinsky
54fe74896b Label text selection outline removed
(cherry picked from audacity commit 21ec893f76)

Signed-off-by: akleja <storspov@gmail.com>
2021-09-30 12:42:50 +02:00
Vitaly Sverchinsky
e293af8776 Label affordance: dragging label with bar between handles
(cherry picked from audacity commit 542a9be2ea)

Signed-off-by: akleja <storspov@gmail.com>
2021-09-30 12:42:50 +02:00
Vitaly Sverchinsky
d261985898 Label drawing changes
Changing bar size between label handles, minor refactoring (making named constants, which should ease changing drawing geometry, without necessety to make changes to internals)

(cherry picked from audacity commit 17a7de639f)

Signed-off-by: akleja <storspov@gmail.com>
2021-09-30 12:42:50 +02:00
Vitaly Sverchinsky
89fa2cb996 Defaulting label font size to be system preferred
(cherry picked from audacity commit 97094e852c)

Signed-off-by: akleja <storspov@gmail.com>
2021-09-30 12:42:50 +02:00
Paul Licameli
c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli
e653b4aaf8 Eliminate Experimental.h, configure compile options instead...
... This makes it impossible to forget to include the EXPERIMENTAL definitions
(such as when cutting and pasting code) and so get unintended quiet changes of
behavior.

The EXPERIMENTAL flags are now specified instead in new file Experimental.cmake
2021-04-27 12:40:07 -04:00
James Crook
5d28d6989e Bug 2699 - Cannot edit labels with emoji in them correctly.
Fixed on Windows 10.
Probably still broken on mac and linux.
2021-03-23 16:41:08 +00:00
Leland Lucius
9940f1cf64 Bug 2571 - Linux: No digit highlight in Edit Label time / frequency controls 2021-02-12 01:50:05 -06:00
Paul Licameli
23f32a8319 Remove some unnecessary #include directives 2021-01-30 12:37:47 -05:00
Paul Licameli
35e9afe34d Remove unnecessary parts of fix for bug 2501...
... Don't need to put the project in a strange state where Undo commands are
ignored until labels are de-selected
2021-01-26 04:23:45 -05:00
Leland Lucius
a03a6abb4b Bug 2501 - Undo for label edit results in a blank label 2021-01-24 23:27:50 -06:00
Paul Licameli
c67842f525 Bug2494: Label cut/copy/paste on Mac and the system clipboard...
... The fix also requires commit 58ad95e7981c9a2b116f318539c37889281baabe of
https://github.com/audacity/wxWidgets.git in the wxWidgets build
2020-12-02 17:50:39 -05:00
Paul Licameli
2b542bf734 Move TrackShifter subclasses each to its own new source file...
... These do not require header files; they are tiny proto-plugins that work
by registration of AttachedVirtualFunction overrides at startup.

Dependency may go from them to TrackView subclasses but not back; so in
principle a reduced Audacity without time-shift could be linked that still uses
the TrackView subclasses.

But other work to make the hit test for the Time Shift tool registrable would
have to precede that.
2020-09-21 17:31:48 +01:00
Paul Licameli
4abd38b9a0 Bug2464 extra: labels should be draggable from one track to another 2020-09-21 17:31:48 +01:00
Paul Licameli
9b1901c971 A convenience function in LabelTrackShifter eliminates repetition 2020-09-21 17:31:48 +01:00
Paul Licameli
c48b813795 Bug2464: Shifting a label should shift wave clips too...
... Implemented non-invasively just with overrides in LabelTrackShifter

Exceeding the bug description: it's also possible to drag just the subset of
labels that fall partly or wholly in the selected region.

I expect details of the new behavior may be debated.
2020-09-20 01:01:17 -04:00
Paul Licameli
4ca3e7096f Track factory cleanup (#646)
* Don't need TrackFactory to make LabelTrack

* Don't need TrackFactory to make NoteTrack

* Don't need TrackFactory to make TimeTrack, or ZoomInfo in the factory

* Remove some forward declarations

* Rename TrackFactory as WaveTrackFactory, move it out of Track.cpp
2020-08-22 18:44:49 -05:00
David Bailes
975ee0cc07 Bug 2496 - Label edit typing prepends selected text
Problem:
labelStruct, a copy of the label is initialized before call to RemoveSelectedText() which acts on the real label. So when the label is updated using labelStruct, the selected text has not been removed.

Fix:
Initialize labelStruct after the call to RemoveSelectedText().
2020-07-10 10:37:02 +01:00
James Crook
d4c91c7a65 Bug 2388 - Point label and range label can appear identical 2020-04-11 17:36:50 +01:00
Yuri Chornoivan
d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
James Crook
b16251f0ed Bug 2380 - Enh: Point label micro-range issue 2020-04-04 23:10:07 +01:00
James Crook
a41e16cb1f Update wording per https://wiki.audacityteam.org/wiki/Wording
Also wording on Mac, Command+Click
2020-04-04 16:03:04 +01:00
James Crook
1176b61953 Wording changes, per wiki:
https://wiki.audacityteam.org/wiki/Wording
2020-01-10 17:02:31 +00:00
Paul Licameli
d244b55709 Don't use GetActiveProject when drawing label track 2020-01-06 14:14:21 -05:00
Paul Licameli
f0b75832b4 Remove uses of GetActiveProject in some dialogs 2020-01-04 13:55:34 -05:00
Paul Licameli
92b857d551 Remove unnecessary const_cast 2020-01-04 11:59:44 -05:00
Paul Licameli
89a3771730 TranslatableString for AudacityTextEntryDialog message and caption 2019-12-21 11:23:32 -05:00
Paul Licameli
4eb220e7b9 TranslatableString for undo history short and long descriptions 2019-12-16 14:19:23 -05:00
James Crook
23f05c618c Fix signed/unsigned comparison warnings. 2019-12-06 11:33:22 +00:00
David Bailes
664452b1a8 Bug 2183 - Characters in labels cannot be deleted
Fix: update the actual label (labelStruct is a copy).
2019-08-03 09:13:53 +01:00
Paul Licameli
05997dc267 Bug2180: complete the fix...
... Don't forget the unbinding of the event handler

See previous commit, e589ed8ecf
2019-08-01 06:33:52 -04:00
Paul Licameli
e589ed8ecf Bug2180: Type-to-create labels twice should work...
Bug began at 0750f62e88

Track::SetSelected is virtual, after all, but then LabelTrack informs
LabelTrackView of selection changes by events, so that LabelTrack remains
independent of LabelTrackView.

This might make much of the rest of the guily commit unnecessary (the resetting
of selected index to -1 only lazily), but it is harmless.
2019-07-31 16:40:16 -04:00
Paul Licameli
93bb862aa2 Remove unnecessary #include 2019-07-18 15:05:37 -04:00
Paul Licameli
33f3d4b82d Heavyweight version of SelectedRegion stored in ViewInfo emits events 2019-07-17 12:43:39 -04:00
Paul Licameli
2bec03ac08 TrackView subclasses do not depend on corresponding TrackControls...
... use an AttachedVirtualFunction to compute the default view height from
the controls.

This frees LabelTrackControls from cycles.

Also made Track::DoSetHeight non-virtual
2019-07-09 00:05:01 -04:00
Paul Licameli
9ca295c9f7 Remove some unnecessary #include-s 2019-07-08 23:53:41 -04:00
Paul Licameli
acfd2b7010 TrackFocus is a new attached object...
... removing the need to use TrackPanel to get and set the focused track

ProjectAudioManager loses its direct dependency on TrackPanel
2019-07-03 19:10:21 -04:00
Paul Licameli
52ff705b0d ScrollIntoView out of TrackPanel, into ProjectWindow 2019-07-03 13:32:32 -04:00
Paul Licameli
a5364119eb Eliminate many calls to RedrawProject & TrackPanel::Refresh()...
... Let the window respond to an undo manager event instead, whenever there
is a push or modify

Maybe this makes a few unnecessary redraws that did not happen before.  If
that is important, then we should figure out how to put the logic for eliding
the redraw into ProjectWindow, and the extra information needed for the
decision into the events, but not make intrusions in other code all over the
place.
2019-07-02 08:17:01 -04:00
Paul Licameli
37f75d8049 Bug2141: Tabbing should work in focused label track, selected or not 2019-06-28 18:12:48 -04:00
Paul Licameli
f77ddc43d9 Smuggle AudacityProject into LabelTrackView::GetSelectedIndex() ...
... and eliminate some more calls to GetActiveProject
2019-06-28 18:09:29 -04:00
Paul Licameli
30715e4fe2 Pass AudacityProject as context into TrackPanelCell key handlers...
... as was done for mouse events.

This eliminates some need for GetActiveProject(), which is good, and prepares
for the fix for bug 2141
2019-06-28 13:18:07 -04:00
Paul Licameli
b05acc32da Move drawing code for track names 2019-06-27 00:10:53 -04:00
Paul Licameli
b881a6e918 Move drawing code for tracks, free EnvelopeEditor from cycles 2019-06-26 23:39:42 -04:00
Paul Licameli
f87dfd43c1 GetVRulerWidth, GetLabelWidth, GetLeftOffset out of TrackPanel.h...
... And some things demoted from ViewInfo to ZoomInfo, related to x coordinates
only
2019-06-26 21:25:15 -04:00
Paul Licameli
dc9e436dde Change the track view copy function...
... It is const, renamed CopyTo, and invokes the create-on-demand factory in
the destination track; this means Track.cpp doesn't need to do that, and so
does not need TrackView.h
2019-06-22 21:46:33 -04:00
Paul Licameli
8793d6b475 Demote Copy to CommonTrackCell; Track points only to that base class 2019-06-22 21:46:33 -04:00
Paul Licameli
3e0d48cc14 Redefine the factories for track views and controls...
... non-intrusively in the Track suclasses, registering functions instead.

For each abstract factory function (of two), build a table of concrete factory
functions, paralleling the hierarchy of Track subclesses.  Dispatch using
runt time type information in the Track objects.
2019-06-21 09:16:49 -04:00