Commit Graph

25 Commits

Author SHA1 Message Date
Paul Licameli e6e96de0fd Replace most inclusions of MemoryX.h with <memory> ...
... Most often it was needed for a custom definition of std::make_unique, but
we build C++14 now.
2021-06-02 07:08:19 -04:00
Paul Licameli 406b23cae7 More uses of AUDACITY_DLL_API...
... in many places where the function call will later need to be between
modules (or libraries, or the executable) and the annotation will be a necessity
to keep the linkage working on Windows.

That's all that this sweeping commit does.
2021-05-10 10:46:55 -04:00
Paul Licameli c001fd97f7 fix comment 2020-03-14 13:47:49 -04:00
Paul Licameli dc39f22442 AudacityMessageBox takes TranslatableString message and caption 2019-12-20 21:32:50 -05:00
Paul Licameli 1d32824e02 Define and use ShuttleGui::Validator 2019-12-02 11:21:40 -05:00
Paul Licameli 4714d72b3f Can't remove remaining wx headers from other headers, comment that 2019-03-31 01:41:16 -04:00
Paul Licameli 8cf6874555 Remove wx/textctrl.h from headers 2019-03-28 01:43:53 -04:00
Paul Licameli f2e2d35ad7 Make numeric validators work with ComboBoxes too...
... as was the intention in the wxWidgets code from which these files were
adapted

More importantly this removes the mischievous #define (added at 08c94d5) from
valnum.h, which made it impossible to #include that header before
<wx/combobox.h>.

Note that (the real type) wxTextEntry is not a kind of wxWindow, but a class
from which wxTextCtrl and wxComboBox both inherit, while they inherit wxWindow
too along other paths.

So in some places, use the protected variable m_ValidatorWindow instead to
access the validator's window.
2019-03-23 20:52:37 -04:00
Paul Licameli a915a510bd include <wx/setup.h> in all files where wxUSE* macros are used...
... even if it's redundant; improving on what was done at b47e2f9
2019-03-23 14:56:02 -04:00
Paul Licameli 7ab97c969c Use std::numeric_limits<...>::lowest...
... not the negation of max(), which is wrong for unsigned types, and not
min(), which gives least normalized positive value for floating point types.

lowest() wasn't available before C++11.
2018-09-29 12:57:53 -04:00
Paul Licameli 6e7d7447c1 Use an enum class for numeric validator styles 2018-02-21 19:21:08 -05:00
Paul Licameli cad632b9b0 Allow specification of range in the constructor arguments for brevity 2018-02-21 19:21:08 -05:00
Paul Licameli 5d5edecca5 Remove unnecessary semicolons 2016-09-18 10:36:53 -04:00
Paul Licameli a3084fa557 linux build 2016-04-06 17:00:02 -04:00
Paul Licameli 83e9e7de97 Clone functions required by wxWidgets base classes can use safenew 2016-04-06 14:08:43 -04: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 6a3d99a8e6 travis 2016-02-24 21:14:19 -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 09b4dfc5a2 travis 2016-02-24 13:52:21 -05:00
Paul Licameli 2efa24bc10 Sweep unnecessary wxString copies: widgets 2016-02-22 21:30:04 -05:00
Leland Lucius 8fbfa460c4 Migrating the remaining effects
This brings the builtin, LV2, and VAMP effects inline with the
Audio Units, LADSPA, and VST effects.  All effects now share
a common UI.

This gives all effects (though not implemented for all):

User and factory preset capability
Preset import/export capability
Shared or private configuration options

Builtin effects can now be migrated to RTP, depending on algorithm.
LV2 effects now support graphical interfaces if the plugin supplies one.
Nyquist prompt enhanced to provide some features of the Nyquist Workbench.

It may not look like it, but this was a LOT of work, so trust me, there
WILL be problems and everything effect related should be suspect.  Keep
a sharp eye (or two) open.
2015-04-16 23:36:28 -05:00
lllucius 4e8b794452 Fix a conflict between the backported number validator and formatter
When building for wx3 on Linux, the backported number validators
and formatter conflicts with the wx3 version because I never
renamed them.  Crashes during termination would occur because
the wx3 version and our version had different vtables.

I was thinking that we would just be able to delete the
backported version when upgrading to wx3, but since
we've made Audacity specific changes to them we can't
simply start using the real wx3 versions anymore.

Therefore, I needed to rename then to prevent the crashes.
2015-01-04 21:17:16 +00:00
lllucius ad92e8c4bf One more round of effects changes.
The big thing is the common efffects UI.  Right now Ladspa and VST
have been converted to use it and Audiounits will be next.  It makes
everything nice and consistent while reducing the clutter in the
dialog.

Other goodies are:

Ladspa effects now show output controls when supplied by the effect
Ladspa effects now work fine as Analyze type effects
Ladspa now has user presets
VST effects dialog is now less cluttered...leaving more room for the effect
Ladspa and VST effects now share a common UI
Ladspa and VST effects are now usable in chains
Ladspa and VST effects now handle user presets the same way
Currently active effects settings automatically saved and reloaded
Can now do numeric range checking on input fields.

And, as always, plenty of critter squashing.
2014-11-14 03:03:17 +00:00
martynshaw99 afe1f36522 Steve's patch for bug 681 "New number input validation breaks several Nyquist plug-ins". It looks sensible and has only a limited scope. 2013-12-31 00:19:52 +00:00
lllucius@gmail.com 08c94d5372 Backported wxWidgets-3.0rc1 number validators
The are pretty darn slick.  There's an integer one and a floating point 
one.  They support automatic range limiting (ex., you can't even type a 
number outside of the range), proper number formats (ex., you can't 
enter a decimal point in an integer field), you can't enter bogus 
numbers like "0.3-.2", thousands separators are supported, decimal 
precision may be specified and proper number formatting for string 
values (or automatic conversion to int, double, float, etc.).
2013-10-23 20:33:17 +00:00