Audacity 3.2.0
Public Member Functions | List of all members
StatefulEffectUIServices Class Reference

#include <StatefulEffectUIServices.h>

Inheritance diagram for StatefulEffectUIServices:
[legend]
Collaboration diagram for StatefulEffectUIServices:
[legend]

Public Member Functions

 ~StatefulEffectUIServices () override
 
std::unique_ptr< EffectEditorPopulateUI (const EffectPlugin &plugin, ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) const override
 Allows PopulateOrExchange to return null. More...
 
virtual std::unique_ptr< EffectEditorPopulateOrExchange (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs)
 Add controls to effect panel; always succeeds. More...
 
virtual bool TransferDataToWindow (const EffectSettings &settings)
 
virtual bool TransferDataFromWindow (EffectSettings &settings)
 
- Public Member Functions inherited from BasicEffectUIServices
int ShowClientInterface (const EffectPlugin &plugin, wxWindow &parent, wxDialog &dialog, EffectEditor *pEditor, bool forceModal) const override
 
void ExportPresets (const EffectPlugin &plugin, const EffectSettings &settings) const override
 
OptionalMessage ImportPresets (const EffectPlugin &plugin, EffectSettings &settings) const override
 
void ShowOptions (const EffectPlugin &plugin) const override
 
bool ValidateUI (const EffectPlugin &context, EffectSettings &) const override
 
bool CloseUI () const override
 
- Public Member Functions inherited from EffectUIServices
virtual ~EffectUIServices ()
 
virtual int ShowHostInterface (EffectBase &plugin, wxWindow &parent, const EffectDialogFactory &factory, std::shared_ptr< EffectInstance > &pInstance, EffectSettingsAccess &access, bool forceModal=false)
 
virtual int ShowClientInterface (const EffectPlugin &plugin, wxWindow &parent, wxDialog &dialog, EffectEditor *pEditor, bool forceModal=false) const =0
 
virtual std::unique_ptr< EffectEditorPopulateUI (const EffectPlugin &plugin, ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) const =0
 Adds controls to a panel that is given as the parent window of S More...
 
virtual void ExportPresets (const EffectPlugin &plugin, const EffectSettings &settings) const =0
 
virtual OptionalMessage ImportPresets (const EffectPlugin &plugin, EffectSettings &settings) const =0
 
virtual void ShowOptions (const EffectPlugin &plugin) const =0
 
virtual bool ValidateUI (const EffectPlugin &context, EffectSettings &settings) const =0
 
virtual bool CloseUI () const =0
 

Additional Inherited Members

- Public Types inherited from EffectUIServices
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 
- Static Public Member Functions inherited from EffectUIServices
static int DoMessageBox (const EffectPlugin &plugin, const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
 

Detailed Description

Definition at line 19 of file StatefulEffectUIServices.h.

Constructor & Destructor Documentation

◆ ~StatefulEffectUIServices()

StatefulEffectUIServices::~StatefulEffectUIServices ( )
overridedefault

Member Function Documentation

◆ PopulateOrExchange()

std::unique_ptr< EffectEditor > StatefulEffectUIServices::PopulateOrExchange ( ShuttleGui S,
EffectInstance instance,
EffectSettingsAccess access,
const EffectOutputs pOutputs 
)
virtual

Add controls to effect panel; always succeeds.

Returns
if not null, then return it from PopulateUI instead of a DefaultEffectEditor; default implementation returns null

Reimplemented in EffectAmplify, EffectAutoDuck, EffectChangeSpeed, EffectClickRemoval, EffectEqualization, EffectFindClipping, EffectLegacyCompressor, EffectLoudness, EffectNoise, EffectNormalize, NyquistEffect, EffectPaulstretch, EffectRepeat, EffectScienFilter, EffectSilence, EffectTimeScale, EffectToneGen, EffectTruncSilence, and VampEffect.

Definition at line 111 of file StatefulEffectUIServices.cpp.

114{
115 return nullptr;
116}

Referenced by PopulateUI().

Here is the caller graph for this function:

◆ PopulateUI()

std::unique_ptr< EffectEditor > StatefulEffectUIServices::PopulateUI ( const EffectPlugin plugin,
ShuttleGui S,
EffectInstance instance,
EffectSettingsAccess access,
const EffectOutputs pOutputs 
) const
overridevirtual

Allows PopulateOrExchange to return null.

Implements EffectUIServices.

Definition at line 88 of file StatefulEffectUIServices.cpp.

91{
92 auto parent = S.GetParent();
93
94 // As in MakeInstance, we still cheat const for stateful effects!
95 auto pThis = const_cast<StatefulEffectUIServices*>(this);
96
97 // Let the effect subclass provide its own editor if it wants
98 auto result = pThis->PopulateOrExchange(S, instance, access, pOutputs);
99
100 parent->SetMinSize(parent->GetSizer()->GetMinSize());
101
102 if (!result) {
103 // No custom editor object? Then use the default
104 result = std::make_unique<DefaultEffectEditor>(plugin,
105 *pThis, access, S.GetParent());
106 parent->PushEventHandler(pThis);
107 }
108 return result;
109}
#define S(N)
Definition: ToChars.cpp:64
virtual std::unique_ptr< EffectEditor > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs)
Add controls to effect panel; always succeeds.

References PopulateOrExchange(), and S.

Here is the call graph for this function:

◆ TransferDataFromWindow()

bool StatefulEffectUIServices::TransferDataFromWindow ( EffectSettings settings)
virtual

Update the given settings from controls; default does nothing, returns true

Reimplemented in EffectAmplify, EffectAutoDuck, EffectChangeSpeed, EffectClickRemoval, EffectFindClipping, EffectLegacyCompressor, EffectLoudness, EffectNoise, EffectNormalize, NyquistEffect, EffectPaulstretch, EffectRepeat, EffectScienFilter, EffectSilence, EffectTimeScale, EffectToneGen, EffectTruncSilence, and VampEffect.

Definition at line 123 of file StatefulEffectUIServices.cpp.

124{
125 return true;
126}

Referenced by EffectNoiseReduction::Dialog::OnGetProfile(), EffectNoiseReduction::Dialog::OnPreview(), and EffectNoiseReduction::Dialog::OnReduceNoise().

Here is the caller graph for this function:

◆ TransferDataToWindow()

bool StatefulEffectUIServices::TransferDataToWindow ( const EffectSettings settings)
virtual

The documentation for this class was generated from the following files: