Audacity 3.2.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
EffectUIValidator Class Referenceabstract

Interface for transferring values from a panel of effect controls. More...

#include <EffectInterface.h>

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

Public Member Functions

 EffectUIValidator (EffectUIClientInterface &effect, EffectSettingsAccess &access)
 
virtual ~EffectUIValidator ()
 
virtual bool ValidateUI ()=0
 Get settings data from the panel; may make error dialogs and return false. More...
 
virtual bool UpdateUI ()
 Update appearance of the panel for changes in settings. More...
 
virtual bool IsGraphicalUI ()
 
virtual void Disconnect ()
 On the first call only, may disconnect from further event handling. More...
 
virtual void OnClose ()
 

Protected Member Functions

template<typename EventTag , typename Class , typename Event >
void BindTo (wxEvtHandler &src, const EventTag &eventType, void(Class::*pmf)(Event &))
 

Protected Attributes

EffectUIClientInterfacemEffect
 
EffectSettingsAccessmAccess
 
bool mUIClosed { false }
 

Detailed Description

Interface for transferring values from a panel of effect controls.

Definition at line 564 of file EffectInterface.h.

Constructor & Destructor Documentation

◆ EffectUIValidator()

EffectUIValidator::EffectUIValidator ( EffectUIClientInterface effect,
EffectSettingsAccess access 
)

Definition at line 199 of file EffectInterface.cpp.

201 : mEffect{effect}
202 , mAccess{access}
203{}
EffectSettingsAccess & mAccess
EffectUIClientInterface & mEffect

◆ ~EffectUIValidator()

EffectUIValidator::~EffectUIValidator ( )
virtualdefault

Member Function Documentation

◆ BindTo()

template<typename EventTag , typename Class , typename Event >
void EffectUIValidator::BindTo ( wxEvtHandler &  src,
const EventTag &  eventType,
void(Class::*)(Event &)  pmf 
)
inlineprotected

Definition at line 606 of file EffectInterface.h.

608 {
609 src.Bind(eventType, pmf, static_cast<Class *>(this));
610 }

◆ Disconnect()

void EffectUIValidator::Disconnect ( )
virtual

On the first call only, may disconnect from further event handling.

Default implemantation does nothing

Reimplemented in DefaultEffectUIValidator, and LV2Validator.

Definition at line 217 of file EffectInterface.cpp.

218{
219}

◆ IsGraphicalUI()

bool EffectUIValidator::IsGraphicalUI ( )
virtual

Default implementation returns false

Returns
true if using a native plug-in UI, not widgets

Reimplemented in AudioUnitValidator, DefaultEffectUIValidator, LV2Validator, and VST3UIValidator.

Definition at line 212 of file EffectInterface.cpp.

213{
214 return false;
215}

◆ OnClose()

void EffectUIValidator::OnClose ( )
virtual

Handle the UI OnClose event. Default implementation calls mEffect.CloseUI()

Reimplemented in VST3UIValidator.

Definition at line 221 of file EffectInterface.cpp.

222{
223 if (!mUIClosed)
224 {
226 mUIClosed = true;
227 }
228}
virtual bool CloseUI()=0

References EffectUIClientInterface::CloseUI(), mEffect, and mUIClosed.

Referenced by VST3UIValidator::OnClose().

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

◆ UpdateUI()

bool EffectUIValidator::UpdateUI ( )
virtual

Update appearance of the panel for changes in settings.

Default implementation does nothing, returns true

Returns
true if successful

Reimplemented in AudioUnitValidator, EffectDtmf::Validator, EffectEcho::Validator, LadspaEffect::Validator, LV2Validator, EffectReverb::Validator, VST3UIValidator, and EffectWahwah::Validator.

Definition at line 207 of file EffectInterface.cpp.

208{
209 return true;
210}

◆ ValidateUI()

virtual bool EffectUIValidator::ValidateUI ( )
pure virtual

Get settings data from the panel; may make error dialogs and return false.

Returns
true only if panel settings are acceptable

Implemented in AudioUnitValidator, EffectDtmf::Validator, EffectEcho::Validator, DefaultEffectUIValidator, LadspaEffect::Validator, LV2Validator, EffectReverb::Validator, VST3UIValidator, and EffectWahwah::Validator.

Member Data Documentation

◆ mAccess

EffectSettingsAccess& EffectUIValidator::mAccess
protected

◆ mEffect

EffectUIClientInterface& EffectUIValidator::mEffect
protected

◆ mUIClosed

bool EffectUIValidator::mUIClosed { false }
protected

Definition at line 615 of file EffectInterface.h.

Referenced by OnClose().


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