Audacity 3.2.0
Public Types | Public Member Functions | Static Public Attributes | List of all members
EffectUIHostInterface Class Referenceabstract

UI-related services. More...

#include <EffectHostInterface.h>

Inheritance diagram for EffectUIHostInterface:

Public Types

using EffectSettingsAccessPtr = std::shared_ptr< EffectSettingsAccess >

Public Member Functions

EffectUIHostInterfaceoperator= (EffectUIHostInterface &)=delete
virtual ~EffectUIHostInterface ()
virtual const EffectDefinitionInterfaceGetDefinition () const =0
virtual int ShowHostInterface (wxWindow &parent, const EffectDialogFactory &factory, EffectSettingsAccess &access, bool forceModal=false)=0
 Usually applies factory to self and given access. More...
virtual void Preview (EffectSettingsAccess &access, bool dryOnly)=0
virtual bool SaveSettingsAsString (const EffectSettings &settings, wxString &parms) const =0
virtual bool LoadSettingsFromString (const wxString &parms, EffectSettings &settings) const =0
virtual bool IsBatchProcessing () const =0
virtual void SetBatchProcessing ()=0
virtual void UnsetBatchProcessing ()=0
virtual bool DoEffect (EffectSettings &settings, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, wxWindow *pParent=nullptr, const EffectDialogFactory &dialogFactory={}, const EffectSettingsAccessPtr &pAccess=nullptr)=0
 Unfortunately complicated dual-use function. More...
virtual bool TransferDataToWindow (const EffectSettings &settings)=0
 Update controls for the settings. More...
virtual bool TransferDataFromWindow (EffectSettings &settings)=0
 Update the given settings from controls. More...
virtual bool InitializeInstance (EffectSettings &settings)=0

Static Public Attributes

static const wxString kUserPresetIdent = wxT("User Preset:")
static const wxString kFactoryPresetIdent = wxT("Factory Preset:")
static const wxString kCurrentSettingsIdent = wxT("<Current Settings>")
static const wxString kFactoryDefaultsIdent = wxT("<Factory Defaults>")

Detailed Description

UI-related services.

Definition at line 45 of file EffectHostInterface.h.

Member Typedef Documentation

◆ EffectSettingsAccessPtr

Definition at line 48 of file EffectHostInterface.h.

Constructor & Destructor Documentation

◆ ~EffectUIHostInterface()

EffectUIHostInterface::~EffectUIHostInterface ( )

Member Function Documentation

◆ DoEffect()

virtual bool EffectUIHostInterface::DoEffect ( EffectSettings settings,
double  projectRate,
TrackList list,
WaveTrackFactory factory,
NotifyingSelectedRegion selectedRegion,
unsigned  flags,
wxWindow *  pParent = nullptr,
const EffectDialogFactory dialogFactory = {},
const EffectSettingsAccessPtr pAccess = nullptr 
pure virtual

Unfortunately complicated dual-use function.

Sometimes this is invoked only to do effect processing, as a delegate for another effect, but sometimes also to put up a dialog prompting the user for settings first.

Create a user interface only if the supplied factory is not null. Factory may be null because we "Repeat last effect" or apply a macro

Will only operate on tracks that have the "selected" flag set to true, which is consistent with Audacity's standard UI.

true on success
settingsAlways given; only for processing
pAccessSometimes given; only for UI

Implemented in Effect.

◆ GetDefinition()

virtual const EffectDefinitionInterface & EffectUIHostInterface::GetDefinition ( ) const
pure virtual

◆ InitializeInstance()

virtual bool EffectUIHostInterface::InitializeInstance ( EffectSettings settings)
pure virtual
true if successful

Implemented in AudioUnitEffect, Effect, LadspaEffect, LV2Effect, VSTEffect, and VST3Effect.

Referenced by EffectManager::DoGetEffect().

Here is the caller graph for this function:

◆ IsBatchProcessing()

virtual bool EffectUIHostInterface::IsBatchProcessing ( ) const
pure virtual

Implemented in Effect.

Referenced by EffectUIHost::BuildButtonBar().

Here is the caller graph for this function:

◆ LoadSettingsFromString()

virtual bool EffectUIHostInterface::LoadSettingsFromString ( const wxString &  parms,
EffectSettings settings 
) const
pure virtual

Implemented in Effect.

◆ operator=()

EffectUIHostInterface & EffectUIHostInterface::operator= ( EffectUIHostInterface )

◆ Preview()

virtual void EffectUIHostInterface::Preview ( EffectSettingsAccess access,
bool  dryOnly 
pure virtual

Implemented in EffectAmplify, Effect, and EffectTimeScale.

Referenced by EffectUIHost::OnPlay().

Here is the caller graph for this function:

◆ SaveSettingsAsString()

virtual bool EffectUIHostInterface::SaveSettingsAsString ( const EffectSettings settings,
wxString &  parms 
) const
pure virtual

Implemented in Effect.

◆ SetBatchProcessing()

virtual void EffectUIHostInterface::SetBatchProcessing ( )
pure virtual

Implemented in Effect.

◆ ShowHostInterface()

virtual int EffectUIHostInterface::ShowHostInterface ( wxWindow &  parent,
const EffectDialogFactory factory,
EffectSettingsAccess access,
bool  forceModal = false 
pure virtual

Usually applies factory to self and given access.

But there are a few unusual overrides for historical reasons

accessis only guaranteed to have lifetime suitable for a modal dialog, unless the dialog stores access.shared_from_this()
0 if destructive effect processing should not proceed (and there may be a non-modal dialog still opened); otherwise, modal dialog return code

Implemented in Effect, EffectNoiseReduction, EffectNoiseRemoval, and NyquistEffect.

◆ TransferDataFromWindow()

virtual bool EffectUIHostInterface::TransferDataFromWindow ( EffectSettings settings)
pure virtual

Update the given settings from controls.

Implemented in EffectAmplify, EffectChangeSpeed, EffectCompressor, EffectDistortion, Effect, EffectFindClipping, EffectNoise, EffectPhaser, EffectRepeat, EffectReverb, EffectScienFilter, EffectSilence, EffectToneGen, EffectTruncSilence, and NyquistEffect.

Referenced by EffectUIHost::TransferDataFromWindow().

Here is the caller graph for this function:

◆ TransferDataToWindow()

virtual bool EffectUIHostInterface::TransferDataToWindow ( const EffectSettings settings)
pure virtual

Update controls for the settings.

Implemented in EffectAmplify, EffectAutoDuck, EffectBassTreble, EffectChangeSpeed, EffectCompressor, EffectDistortion, Effect, EffectEqualization, EffectFindClipping, EffectLoudness, EffectNoise, EffectNormalize, NyquistEffect, EffectPhaser, EffectRepeat, EffectReverb, EffectScienFilter, EffectSilence, EffectTimeScale, EffectToneGen, VampEffect, and EffectWahwah.

Referenced by EffectUIHost::TransferDataToWindow().

Here is the caller graph for this function:

◆ UnsetBatchProcessing()

virtual void EffectUIHostInterface::UnsetBatchProcessing ( )
pure virtual

Implemented in Effect.

Member Data Documentation

◆ kCurrentSettingsIdent

const wxString EffectUIHostInterface::kCurrentSettingsIdent = wxT("<Current Settings>")

◆ kFactoryDefaultsIdent

const wxString EffectUIHostInterface::kFactoryDefaultsIdent = wxT("<Factory Defaults>")

◆ kFactoryPresetIdent

const wxString EffectUIHostInterface::kFactoryPresetIdent = wxT("Factory Preset:")

◆ kUserPresetIdent

const wxString EffectUIHostInterface::kUserPresetIdent = wxT("User Preset:")

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