1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-13 15:17:42 +02:00

1181 Commits

Author SHA1 Message Date
Paul Licameli
153eb63b3e Rest of quick play mouse handling is invoked from UIHandle...
... and ESC key aborts the drag of play region
2018-08-05 17:18:25 -04:00
Paul Licameli
9491605cfc CellularPanel handles save/restore of focus for clicks in ruler...
... This lets the ESC key really work to abort drags
2018-08-05 17:18:25 -04:00
Paul Licameli
c85d2cdfa0 UIHandle objects now implement the context menus for the Ruler 2018-08-05 17:18:25 -04:00
Paul Licameli
0ae7f55fea Manage showing and hiding of quick play guide in CellularPanel base 2018-08-05 17:18:25 -04:00
Paul Licameli
af17e1ff95 Quick-play handle object manages lifetime of SnapManager 2018-08-05 17:18:24 -04:00
Paul Licameli
a70e2284b0 Manage ruler status messages and tooltips in CellularPanel base class 2018-08-05 17:18:24 -04:00
Paul Licameli
ba4ae4f7bd Manage ruler cursor changes in CellularPanel base class 2018-08-05 17:18:24 -04:00
Paul Licameli
ce48ac6307 Enable hit tests; let base class manage capture & release of mouse...
... also make popup menus at right up, not down, for consistency with other
popup menus in TrackPanel

Base class also does the event propagation "hack" for ScrubPoller
2018-08-05 17:18:24 -04:00
Paul Licameli
a853b7a3b4 Skeletal hit test and handle objects for quick play and scrubbing 2018-08-05 17:18:23 -04:00
Paul Licameli
bccb135e30 AdornedRulerPanel inherits from CellularPanel -- hit testing, still to do 2018-08-05 17:18:23 -04:00
James Crook
d3e6e92440 Fix Sizer Error. 2018-08-05 21:34:23 +01:00
Paul Licameli
aeece118e8 Rewrite the handling of quick play indicators...
... All updates of position are done in DoGetRectangle().  Ruler need only
expose one function, DrawOverlays().

Don't redraw indicators twice when dragging (hiding and showing again), making
some flicker.  Just do one update.
2018-08-04 15:35:36 -04:00
James Crook
4318cb6780 Bug 1886 - Sluggish behaviour caused by the large time taken to draw the Track Control Panel
All backing bitmaps (not just the one in track panel) now are set to 24 bits.
Big thanks to David Bailes for tracking down the root cause of slow BitBlts, and the comments at https://trac.wxwidgets.org/ticket/14403 which led to the fix.

In testing the bitmaps, I also fixed the sizer errors reported for Export.cpp that wxWidgets now reports as ASSERTS when running in debug builds.
2018-08-03 18:29:49 +01:00
Paul Licameli
0dddcf44cb Some uses of wxWindowRef, a weak pointer that won't become dangling 2018-08-01 22:49:37 -04:00
Paul Licameli
5f27ae905c Changed misleading terminology in scrubber...
... It was confusing that HasStartedScrubbing() could be true
while also not IsScrubbing()
2018-07-29 14:20:11 -04:00
Paul Licameli
b33d3516f0 Rename a function in AdornedRulerPanel...
... Avoid confustion of "capture" meaning recording, with "capture" of the
mouse during drag
2018-07-29 14:18:08 -04:00
Paul Licameli
98a72acfb8 Remove unnecessary moves of return values 2018-07-24 21:25:22 -04:00
Paul Licameli
e432883dec Fix deprecation warnings with wxFont, wxPen, wxBrush ctors...
... Replace some enum constants with the equivalent values from the more
special-purpose enums, as the wx header files recommend, so overloading
selects the ctors with non-int arguments.

In a full rebuild of the debug project on Mac, this reduces the count of
warnings from 264 to 274.
2018-07-23 13:21:15 -04:00
James Crook
6325b443d6 Possible fix for Bug 42 (Timer Record does not stop, moonphase)
This possible fix is based on the idea that YieldFor is flaky, and is holding up events that we SHOULD process.
Therefore we process ALL events, not just some, and we do two yields, in case we are getting behind on the queue.
2018-07-22 20:13:15 +01:00
James Crook
2115e9b5ac Play at speed pop-up dialog changes speed dynamically too.
In fact all the slider pop up dialogs now dynamically change their parent's value.
2018-07-21 18:20:14 +01:00
Paul Licameli
70f27d41d3 Rewrite AdornedRulerPanel with one less friend 2018-07-06 21:11:48 -04:00
James Crook
356fdeba40 Show Pin/Unpin button in red, if recording. 2018-06-29 17:00:25 +01:00
James Crook
20178b15e1 Fix some 'declaration hides' warnings.
We were for example getting many of these:
\audacity\src\widgets\numerictextctrl.h(171): warning C4458: declaration of 'value' hides class member

MSVC2013 didn't warn about these, but MSVC2017 does.
2018-06-27 12:36:13 +01:00
Henric Jungheim
68b7330b69 Avoid MSVC trying to use wxTabTraversalWrapper's move ctor. 2018-06-26 06:53:47 -07:00
David Bailes
4221549ec9 NumericTextCtrl: fix minor bug with NVDA screen reader
Problem: with using up/down arrow NVDA reads the updated field twice.

Fix: remove generation of an unnecessary event.
2018-05-16 14:10:53 +01:00
David Bailes
a13e7191c4 Add an option to use a dialog to enter the name of a new label
Motivation:
1. The text boxes in the label track are not fully accessible for users of screen readers, and I don't think that they can be made to be fully accessible using the accessibility API used by wxWidgets. When such an edit box becomes the focus, this is not announced, and for NVDA users typed characters are not echoed.

2. Provides a work around for bugs 1778 (cannot type diacritics into text label), and 1804 (Windows: Labels do not accept IME (Chinese/Japanese) input).

Fix: Provide an option for a dialog for entering the name. The text box in the dialog is accessible for screen readers. On windows the text box receives wm_keydown and wm_char messages and so is a work around for bug 1804. Being a standard text box, it will presumably be a work around for bug 1778.

1. There is a new option in track behaviors: "Use dialog for the name of new label", which is off by default.

2. When using the commands "Add label at selection" and "Add label at playback position", when the dialog closes, focus is returned to the track which was the focus before the dialog opened. I think this is more convenient for users of screen readers.
2018-05-11 10:23:48 +01:00
Paul Licameli
a9e7a7e5d5 movable_ptr(_with_deleter) -> std::unique_ptr 2018-05-10 00:56:37 -04:00
Paul Licameli
b8a8712ba0 make_movable -> std::make_unique 2018-05-10 00:56:36 -04:00
Paul Licameli
7a0475e39f Remove most uses of AUDACITY_OLD_STD 2018-05-10 00:56:36 -04:00
Steve Daulton
0d5fb01c97 Can't call Fit() on (negative) wxDefaultSize
and SetSizeHints will call Fit()
2018-05-02 16:11:35 +01:00
James Crook
121fdc5703 Fix non-ASCII characters in wxLogDebug
The LogDebugs aren't needed now, as we can get the info via Scripting.
2018-04-15 15:09:15 +01:00
James Crook
933c86dce3 Draw slider background in correct colour on MixerBoard. 2018-04-15 13:46:03 +01:00
James Crook
35d24bbed5 Tweak spacing in vertical rulers.
This is most relevant in MixerBoard.
2018-04-15 11:48:51 +01:00
James Crook
5120a9dfc6 Fine tune spacing between minor ticks in rulers.
The main point of this is not to ask for overcrowded rulers.

We already handle overcrowded rulers well, by not showing the minor ticks.
This change means that we are more likely to ask for a spacing that works.
In turn that means that we are less likely to have anomalies where numbers disappear due to overcrowding and reappear again as you resize the ruler.
2018-04-14 15:44:56 +01:00
James Crook
8344a2bae9 Bug 1867 - Jumping numbers on meter resizing
They jumped because of overcrowding.  Now when overcrowded, don't show
any minor numbers.
2018-04-13 19:26:56 +01:00
James Crook
5fd1f7e606 Bug 1866 - Mac: Sliders have black backgrounds when building on wx3.1.1
Also fixes flicker of sliders on dragging the slider.
2018-04-13 17:24:02 +01:00
James Crook
7178879397 Flicker-Free Grabbers and Mic/Speaker icons.
Previously we were clearing in Erase Background, giving lots of flicker when resizing some toolbar.
Also fixed a mac Slider background painting issue.
2018-04-13 09:48:20 +01:00
James Crook
8ff80bde11 Bug 262 - Enh: Mixer Board: Track strip and border colours to match those in current TrackPanel 2018-04-12 14:45:08 +01:00
David Bailes
0e25f65eb4 Modification to fix for Bug 875 - NumericTextCtrl
Modification to commit 7ab4b8c. The first non-zero digit only becomes the focus on the first visit to the control. On subsequent visits, the focus is the previous focus. Example use case: modifying start and end times by a tenth of a second. The user can move between the controls without loosing his "place".
2018-04-12 11:46:08 +01:00
James Crook
7ab4b8c6df Bug 875 - First character is highlighted when tabbing into TimeText controls, not first non-zero character. 2018-04-09 15:51:18 +01:00
James Crook
98bbb3436d Fix sizers in WarningDialog
AddUnits is only allowed in a HorizontalLay or MultiColumn.
EndVerticalLay was missing.
2018-04-08 19:51:09 +01:00
James Crook
b60fae4470 Fix some warnings on mac
These are mostly missing 'overrides'
2018-04-07 20:28:27 +01:00
James Crook
c0e1c82be9 Add missing files to Mac build.
Also moved the constructor into the .cpp file, so that wxWindow is a fully defined class.
2018-04-04 14:14:59 +01:00
David Bailes
f027708fe1 Fix an issue caused by the accessibility changes in wxWidgets 3.1.1
The main change in wx accessibility is this:
7dab555f71 (diff-04f5191d86f95b1c4d5d9c979da65878)

However wxWindowAccessible has not been updated to take into account of that change. In particular wxWindowAccessible::GetParent() was always wrong, but it was consistent with the rest of the framework. Now it's wrong and inconsistent. This function should return an object with role window, and which has the same name.

The fix is to introduce class WindowAccessible, which is effectively our own version of wxWindowAccessible. This class does not override GetParent(), and so just relies on a standard accessible object to to the right thing in wxIAccessible::get_accParent() (which is does). This class also allows us to have our own version of GetName(), which allows us to set the accessibility names of buttons.

These changes will break the accessibility of Audacity if it is built with wxWidgets 3.0.X. If this is a problem, then there could be some #if stuff in WindowAccessible.h to turn the WindowAccessible class into one which simply inherits from wxWindowAccessible, and doesn't override anything.
2018-04-03 14:57:59 +01:00
James Crook
1f0061ba79 Fix sizing bug in InfoDialog (misuse of wxALIGN_BOTTOM) 2018-03-31 21:08:16 +01:00
James Crook
4ae394ff5e Fix some warnings (MSVC) 2018-03-31 19:47:16 +01:00
Paul Licameli
0fb02a8024 IdentInterfaceSymbol in NumericTextCtrl; don't persist translated 2018-03-28 14:00:17 -04:00
James Crook
545102b168 Bug 1680 - Pan / Gain dialog sliders do not update on text entry 2018-03-25 18:02:14 +01:00
James Crook
d5a2e3af2e Bug 616 - First ampersand in file name removed from File > Recent Files and import dialogues 2018-03-25 16:28:27 +01:00
James Crook
8ce8e7bcce Bug 521 - Lower half of Waveform (dB) vertical scale does not show dB level.
Added a DbMirrorValue for two sided dB scale on Waveform VRuler when in dB view mode.
2018-03-24 20:35:08 +00:00