Paul Licameli
fe4db0dd8e
Nix Ruler member vars used only for grid drawing; more const methods
2020-01-23 12:56:11 -05:00
Paul Licameli
ef44143cbf
Fix a comment
2020-01-23 12:56:10 -05:00
SteveDaulton
9a0ee24c5c
bug 2290: Add error message
...
See https://bugzilla.audacityteam.org/show_bug.cgi?id=2290#c9
2020-01-23 12:59:53 +00:00
Paul Licameli
10eb5864ac
Don't quit update of vertical ruler of short spectrogram views...
...
... This caused visible anomalies, for instance when dragging the stereo track
separator between channels. Numbers from one channel used to be drawn over
the ruler of the opposite channel.
2020-01-22 20:21:45 -05:00
Paul Licameli
537ace493e
Don't draw 0 at top of spectrogram scale (bug in 8cf7d0b)
2020-01-22 19:58:53 -05:00
Paul Licameli
4a9c14bb38
Some transformation of Ruler update code into something less confusing...
...
... about where the dependencies of the calculations on Ruler state lie.
This doesn't yet fix the bugs in vertical ruler scales.
2020-01-22 13:42:19 -05:00
Paul Licameli
ec723466ba
Invalidate Ruler, whenever anything the Updater uses is reassigned
2020-01-22 13:38:37 -05:00
Paul Licameli
edba1b5b28
Avoid unnecessary update before drawing ruler grid...
...
... which matters for some displays such as in Equalization, though not for
track vertical rulers
2020-01-22 13:38:36 -05:00
Paul Licameli
b0154f89e0
Move Tick and TickCustom methods to temporary worker structure...
...
... which forces us to be more explicit about just what parts of the Ruler
state are used in it (when we construct it) and be sure they don't modify it
2020-01-22 13:38:34 -05:00
Paul Licameli
8cf7d0b8e9
Make Ruler::Tick and TickCustom const member functions...
...
... on the way to making them not (direct) member functions of Ruler.
Hoist the choice of font and destination label array out of them, and
group other outputs into an argument.
2020-01-22 12:51:08 -05:00
Paul Licameli
2c0afdd77a
TickSizes::LabelString takes one less argument...
...
... so that Ruler::Tick uses major in one less place
2020-01-22 12:09:52 -05:00
Paul Licameli
80dd2fbec9
Further factoring of font size setting...
...
... and fix uninitialized lead size in case of user-supplied fonts (though
this capability isn't yet used anywhere)
2020-01-22 12:09:52 -05:00
Paul Licameli
e08543650b
Factor function to choose ruler fonts
2020-01-22 12:09:52 -05:00
Paul Licameli
3876031669
Group ruler fonts and lead into a structure
2020-01-22 12:09:52 -05:00
Paul Licameli
80f884b0b7
Don't need extra indirection handling wxFont, see documentation of it
2020-01-22 12:09:52 -05:00
Paul Licameli
05c80cfb4f
narrow scopes of loop indices
2020-01-22 12:09:52 -05:00
Paul Licameli
605a4056c9
Fix bug in 3a64b17...
...
... which make, for instance, excessive tick marks when in Mel spectrogram
scale
2020-01-22 12:08:37 -05:00
Paul Licameli
a14d5c348a
Eliminate Ruler::mDC
2020-01-21 19:58:05 -05:00
Paul Licameli
3a64b172c8
Demote duplicated code in Ruler into a static function
2020-01-21 19:36:02 -05:00
Paul Licameli
8729f3fb8e
Simplify Ruler with std::vector members
2020-01-21 16:07:27 -05:00
Paul Licameli
7682961f53
Remove unused members of Ruler
2020-01-21 15:17:51 -05:00
Paul Licameli
a84391b4a2
Eliminate some members from Ruler...
...
... Move some fields used only during formatting into a temporary structure.
(And fixing a minor problem with uninitialized variables in case of logarithmic
scale, which made it unpredictable how Plot Spectrum with logarithmic
frequencely axis formatted numbers.)
2020-01-21 12:53:33 -05:00
SteveDaulton
32a60103b4
bug 2290: Bail if no DTMF sequence
2020-01-20 21:29:50 +00:00
Paul Licameli
9cd7a5eaf3
Bug2277 partial: in dB ruler, always draw midline value if in range...
...
... and also draw the zeroes if in range, taking precedence over the extreme
values (which might be positive dB values when zoomed out or scrolled).
See comments 10 and 11 in the bug report.
2020-01-20 12:29:28 -05:00
Paul Licameli
72d8a927e7
Fix Linux build
2020-01-20 07:17:50 -05:00
Paul Licameli
76041f0b8e
Preference dialog pages are registered, not exhaustively listed
2020-01-20 00:47:27 -05:00
Paul Licameli
e110f66ff8
PrefsPanel classes registered; PrefsDialog.cpp independent of headers
2020-01-20 00:19:13 -05:00
Paul Licameli
1555fd84a4
define PrefsPanel::Registration
2020-01-20 00:16:13 -05:00
Paul Licameli
1367220650
Commands are registered, not exhaustively listed
2020-01-19 19:21:39 -05:00
Paul Licameli
b5c59b29a7
LoadCommands.cpp doesn't depend on individual command classes...
...
... Remove many #includes and macros. Use instead a hash generated from the
registry.
2020-01-19 19:21:12 -05:00
Paul Licameli
2522459637
Each command class registers itself
2020-01-19 19:21:12 -05:00
Paul Licameli
0ca5775234
Eliminate one of the ## macro hacks in LoadCommands
2020-01-19 19:21:12 -05:00
Paul Licameli
8832621b0a
Effects are registered, not exhaustively listed
2020-01-19 19:18:16 -05:00
Paul Licameli
bbdc27b462
LoadEffects.cpp doesn't depend on individual effect classes...
2020-01-19 19:16:51 -05:00
Paul Licameli
69dab8b552
Each built-in effect class registers itself with BuiltinEffectsModule
2020-01-19 19:16:51 -05:00
Paul Licameli
4579835911
Eliminate one of the ## macro hacks in LoadEffects
2020-01-19 19:16:51 -05:00
Paul Licameli
83be5b3045
All loaded built-in effects have nullary constructors
2020-01-19 19:16:50 -05:00
Paul Licameli
1f283a8981
Fewer includes of WaveformSettings.h, SpectrogramSettings.h...
...
... See ultimate origin of some of the deleted lines at 4724c6a
Whatever change it is that needs loading by LoadPrefs -- do it instead right
after any possibility of changes to the relevant preferences, in the Commit()
functions of SpectrumPrefs and WaveforPrefs
2020-01-19 19:11:14 -05:00
Paul Licameli
2ec2ad378d
Break dependency cycle introduced at a69fba9
2020-01-19 14:36:28 -05:00
Paul Licameli
f2ed21f9e5
Fix some comments
2020-01-19 13:23:30 -05:00
Paul Licameli
2570b56176
Rename Maybe and its members more like std::optional of C++17
2020-01-19 11:38:12 -05:00
Paul Licameli
30999ab134
Dynamic registry of sub-views replaces exhaustive switches on type...
...
... Such switches were in the TCP context menu for wave tracks,
SetTrackVisualsCommand, Nyquist (choosing the string for 'view property of
*tracks*), and the Tracks preferences panel.
This will allow easier, non-intrusive addition of other kinds of track
visualizations.
2020-01-18 20:33:19 -05:00
Paul Licameli
a69fba9990
TracksPrefs does not use hardcoded list of all view types...
...
... It does have some duplication of string values, but only for purposes of
upgrading old config files.
2020-01-18 20:28:54 -05:00
Paul Licameli
d2ccde77e7
Remove another exhaustive switch on view sub-types, in Nyquist.cpp
2020-01-18 20:28:53 -05:00
Paul Licameli
7cff170cf7
Sub-view objects report their complete type, not just an enum value
2020-01-18 20:28:53 -05:00
Paul Licameli
36aad4d1c6
Don't hard-code the exhaustive list of sub-view types...
...
... in Wave track context menu and SetTrackVisualsCommand
Instead, discover them through a registry.
This eliminates some duplication of string constants and prepares for
non-intrusive generalization to more kinds of sub-views.
This makes the command agnostic about which subview types are known, but the
context menu still has special case treatment for Spectrogram Settings and
Wave Colors.
2020-01-18 20:26:12 -05:00
Paul Licameli
fb8ba0ce43
Some briefer type aliases for wave track display type
2020-01-18 19:35:17 -05:00
Paul Licameli
d9ddb41410
Un-fix smart single quotes in Nyquist prompt too; see commit 45a0ce1
2020-01-18 19:34:40 -05:00
Paul Licameli
833bbb5455
Supply missing changes in win/ for 6eb0f3a
2020-01-18 16:32:15 -05:00
Paul Licameli
0537bdb89a
Fix link on windows
2020-01-18 15:50:38 -05:00