... All is set up so that plug-in providers can be modules that register
their instance-creating function pointers directly with RegisterProvider; no
special symbol name needs to be exported.
That is, they now just need to export ModuleDispatch and GetVersionString, just
like other modules for other purposes.
Duplication of logic from ModuleManager::InitializeBuiltins() is removed.
No examples yet in the previous commits, but it does work in my misc-modules
branch.
... Forcing other places that use RegisterBuiltinModule to be more explicit
about their link dependencies on ModuleManager, with a new #include directive.
Does this make scripts/graph.pl show a new dependency cycle? Happily no. But
now we know.
... Those for which the internal name and the user-visible English names differ,
or that needed disambiguating context for i18n, were always shown as English
in the menus.
Silence and Filter Curve were the only two examples. There are others.
... What they had in common was the use of the XC macro to specify a
disambiguating context string. Example: "Interface" page of preferences.
TranslatableString had not implemented this
correctly except in the less usual case of plurals.
... 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.
* 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
* Eliminate ModuleManagerInterface...
... It was there only to provide RegisterModule(), but that was not used
anywhere. So simplify.
* Remove nested #include of ModuleInterface.h
These are ancient and "configunix.h" was being pulled in
via Types.h. Nothing major, but they were generated for
a 32-bit system and "may" cause problems when used on
64-bit systems.
(That's unlikely though since they haven't all this time.)
... 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.
... by passing parent as reference, not pointer, and testing in the dialog
factory function.
This is important so that we know the lifetime of an effect dialog, even when
it is non-modal, is bounded by the lifetime of the associated project.
... in cases of "TranslatableString" that are not really translated.
This makes it easier to scan the code for such unusual constructions of
TranslatableString, distinct from mere mentions of the TranslatableString type.
... The fix at a3d8518 was not sufficient.
I think the Windows compiler has a bug, and gets confused by a name that has
static and non-static overloads. So use distinct names instead.
... Make sure it doesn't try to capture this (quite unnecessarily!) but calls
the static overload of DoFormat.
Make other qualified calls too for added measure.
... Format arguments are substituted into the translation of the msgid, which
may not be known at the time the format arguments are captured (because locale
may change). This allows TranslatableString with arguments to be constructed
at static initialization time.
There is also a special "verbatim" or null context which makes no translations
of msgids.
There is not yet any use of other contexts besides default or null.