42 std::unique_ptr<EffectPlugin> uEffect)
44 auto pEffect = uEffect.get();
67 return effect->GetDefinition().GetFamily().Msgid();
78 return effect->GetDefinition().GetVendor().Msgid();
86 return effect->GetDefinition().IsHiddenFromMenus();
117 std::sort( presets.begin(), presets.end() );
131 effect->GetDefinition().GetFactoryPresets().size() > 0 ||
144 return wxEmptyString;
155 if (
const auto answer = dialog(*effect,
preset))
181 return wxEmptyString;
215std::pair<EffectPlugin*, EffectSettings*>
220 return {results.effect, &results.settings};
222 return {
nullptr,
nullptr};
233 constexpr auto InitializedKey = L
"Initialized";
234 if (
bool haveDefaults{};
236 InitializedKey, haveDefaults,
false),
241 if (
bool haveCurrent{};
243 InitializedKey, haveCurrent,
false),
249 InitializedKey,
true);
255std::pair<ComponentInterface *, EffectSettings>
260 auto settings = result->MakeSettings();
262 return { result, std::move(
settings) };
264 return {
nullptr, {} };
284 if (
auto effect =
dynamic_cast<EffectPlugin*
>(component))
EffectDistortionSettings params
RegistryPath UserPresetsGroup(const RegistryPath &name)
Compute part of a registry path, given a name which may be empty.
const RegistryPath & FactoryDefaultsGroup()
Component of a configuration key path, for default state of MakeSettings()
const RegistryPath & CurrentSettingsGroup()
Component of a configuration key path, for last-used destructive settings.
bool HasCurrentSettings(EffectPlugin &host)
bool HasFactoryDefaults(EffectPlugin &host)
RegistryPaths GetUserPresets(EffectPlugin &host)
std::vector< RegistryPath > RegistryPaths
static const AttachedProjectObjects::RegisteredFactory manager
static Settings & settings()
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the SettingsVis...
virtual bool HasEntry(const wxString &strName) const override
bool GetParameters(wxString &parms)
EffectManager is the class that handles effects and effect categories.
bool HasPresets(const PluginID &ID)
std::function< std::optional< wxString >(EffectPlugin &, const wxString &preset)> EffectPresetDialog
void SetSkipStateFlag(bool flag)
wxString GetPreset(const PluginID &ID, const wxString ¶ms, EffectPresetDialog)
EffectPlugin * GetEffect(const PluginID &ID)
static const EffectInstanceFactory * GetInstanceFactory(const PluginID &ID)
std::pair< EffectPlugin *, EffectSettings * > GetEffectAndDefaultSettings(const PluginID &ID)
static EffectManager & Get()
EffectSettings * GetDefaultSettings(const PluginID &ID)
TranslatableString GetVendorName(const PluginID &ID)
wxString GetDefaultPreset(const PluginID &ID)
const PluginID & RegisterEffect(std::unique_ptr< EffectPlugin > uEffect)
Here solely for the purpose of Nyquist Workbench until a better solution is devised.
TranslatableString GetEffectFamilyName(const PluginID &ID)
void UnregisterEffect(const PluginID &ID)
Used only by Nyquist Workbench module.
EffectAndDefaultSettings & DoGetEffect(const PluginID &ID)
bool IsHidden(const PluginID &ID)
Factory of instances of an effect.
virtual const EffectSettingsManager & GetDefinition() const =0
static const wxString kCurrentSettingsIdent
static const wxString kFactoryDefaultsIdent
EffectSettingsManager is an EffectDefinitionInterface that adds a factory function for EffectSettings...
void UnregisterPlugin(const PluginID &ID)
void RegisterPlugin(PluginDescriptor &&desc)
static PluginManager & Get()
Holds a msgid for the translation catalog; may also bind format arguments.
bool GetConfigSubgroups(const EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group, RegistryPaths &subgroups)
bool SetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, const Value &value)
bool HasConfigGroup(const EffectDefinitionInterface &ident, PluginSettings::ConfigurationType type, const RegistryPath &group)
bool GetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var, const Value &defval)
THEME_RESOURCES_API void Load()
std::pair< ComponentInterface *, EffectSettings > LoadComponent(const PluginID &ID)
void InitializePreset(EffectSettingsManager &manager, EffectSettings &settings)
const PluginDescriptor * GetPlugin(const PluginID &ID)
Externalized state of a plug-in.