Audacity 3.2.0
Classes | Functions | Variables
anonymous_namespace{EffectsPrefs.cpp} Namespace Reference

Classes

struct  Entry
 

Functions

static const std::vector< Entry > & GetModuleData ()
 

Variables

const std::map< wxString, TranslatableStringSuggestedPrompts
 
PrefsPanel::Registration sAttachment
 

Function Documentation

◆ GetModuleData()

static const std::vector< Entry > & anonymous_namespace{EffectsPrefs.cpp}::GetModuleData ( )
static

Definition at line 136 of file EffectsPrefs.cpp.

137{
138 struct ModuleData : public std::vector< Entry > {
139 ModuleData() {
140 auto &pm = PluginManager::Get();
141 for (auto &plug : pm.PluginsOfType(PluginTypeModule)) {
142 auto internal = plug.GetEffectFamily();
143 if ( internal.empty() )
144 continue;
145
146 TranslatableString prompt;
147 auto iter = SuggestedPrompts.find( internal );
148 if ( iter == SuggestedPrompts.end() )
149 // For the built-in modules this Msgid includes " Effects",
150 // but those strings were never shown to the user,
151 // and the prompts in the table above do not include it.
152 // If there should be new modules, it is not important for them
153 // to follow the " Effects" convention, but instead they can
154 // have shorter msgids.
155 prompt = plug.GetSymbol().Msgid();
156 else
157 prompt = iter->second;
158
159 auto setting = pm.GetPluginEnabledSetting( plug );
160
161 push_back( { prompt, setting } );
162 }
163 // Guarantee some determinate ordering
164 std::sort( begin(), end(),
165 []( const Entry &a, const Entry &b ){
166 return a.setting < b.setting;
167 }
168 );
169 }
170 };
171 static ModuleData theData;
172 return theData;
173}
@ PluginTypeModule
static PluginManager & Get()
Holds a msgid for the translation catalog; may also bind format arguments.
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:159
auto begin(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:150
const std::map< wxString, TranslatableString > SuggestedPrompts

References PackedArray::begin(), PackedArray::end(), PluginManager::Get(), PluginTypeModule, anonymous_namespace{EffectsPrefs.cpp}::Entry::setting, and SuggestedPrompts.

Referenced by EffectsPrefs::PopulateOrExchange().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ sAttachment

PrefsPanel::Registration anonymous_namespace{EffectsPrefs.cpp}::sAttachment
Initial value:
{ "Effects",
[](wxWindow *parent, wxWindowID winid, AudacityProject *)
{
wxASSERT(parent);
return safenew EffectsPrefs(parent, winid);
}
}
#define safenew
Definition: MemoryX.h:10
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
A PrefsPanel for general GUI preferences.
Definition: EffectsPrefs.h:26

Definition at line 238 of file EffectsPrefs.cpp.

◆ SuggestedPrompts

const std::map< wxString, TranslatableString > anonymous_namespace{EffectsPrefs.cpp}::SuggestedPrompts
Initial value:
{
{ wxT("AudioUnit"), XXO("Audio Unit") },
{ wxT("LADSPA"), XXO("&LADSPA") },
{ wxT("LV2"), XXO("LV&2") },
{ wxT("Nyquist"), XXO("N&yquist") },
{ wxT("Vamp"), XXO("&Vamp") },
{ wxT("VST"), XXO("V&ST") },
}
wxT("CloseDown"))
XXO("&Cut/Copy/Paste Toolbar")

Definition at line 101 of file EffectsPrefs.cpp.

Referenced by GetModuleData().