Audacity 3.2.0
Public Member Functions | Protected Attributes | List of all members
DefaultEffectUIValidator Class Reference

#include <Effect.h>

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

Public Member Functions

 DefaultEffectUIValidator (EffectUIClientInterface &effect, EffectSettingsAccess &access, wxWindow *pParent=nullptr)
 
 ~DefaultEffectUIValidator () override
 Calls Disconnect. More...
 
bool ValidateUI () override
 Calls mEffect.ValidateUI() More...
 
bool IsGraphicalUI () override
 
void Disconnect () override
 On the first call only, may disconnect from further event handling. More...
 
- Public Member Functions inherited from EffectUIValidator
 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 Attributes

wxWindow * mpParent {}
 
- Protected Attributes inherited from EffectUIValidator
EffectUIClientInterfacemEffect
 
EffectSettingsAccessmAccess
 
bool mUIClosed { false }
 

Additional Inherited Members

- Protected Member Functions inherited from EffectUIValidator
template<typename EventTag , typename Class , typename Event >
void BindTo (wxEvtHandler &src, const EventTag &eventType, void(Class::*pmf)(Event &))
 

Detailed Description

Default implementation of EffectUIValidator invokes ValidateUI and IsGraphicalUI methods of an EffectUIClientInterface

Definition at line 36 of file Effect.h.

Constructor & Destructor Documentation

◆ DefaultEffectUIValidator()

DefaultEffectUIValidator::DefaultEffectUIValidator ( EffectUIClientInterface effect,
EffectSettingsAccess access,
wxWindow *  pParent = nullptr 
)
Parameters
pParentif not null, caller will push an event handler onto this window; then this object is responsible to pop it

Definition at line 867 of file Effect.cpp.

870 : EffectUIValidator{ effect, access }, mpParent{ pParent }
871{
872}
wxWindow * mpParent
Definition: Effect.h:57
Interface for transferring values from a panel of effect controls.

◆ ~DefaultEffectUIValidator()

DefaultEffectUIValidator::~DefaultEffectUIValidator ( )
override

Calls Disconnect.

Definition at line 874 of file Effect.cpp.

875{
876 Disconnect();
877}
void Disconnect() override
On the first call only, may disconnect from further event handling.
Definition: Effect.cpp:893

References Disconnect().

Here is the call graph for this function:

Member Function Documentation

◆ Disconnect()

void DefaultEffectUIValidator::Disconnect ( )
overridevirtual

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

Default implemantation does nothing

Reimplemented from EffectUIValidator.

Definition at line 893 of file Effect.cpp.

894{
895 if (mpParent) {
896 mpParent->PopEventHandler();
897 mpParent = nullptr;
898 }
899}

References mpParent.

Referenced by ~DefaultEffectUIValidator().

Here is the caller graph for this function:

◆ IsGraphicalUI()

bool DefaultEffectUIValidator::IsGraphicalUI ( )
overridevirtual
Returns
mEffect.IsGraphicalUI()

Reimplemented from EffectUIValidator.

Definition at line 888 of file Effect.cpp.

889{
890 return mEffect.IsGraphicalUI();
891}
virtual bool IsGraphicalUI()=0
EffectUIClientInterface & mEffect

References EffectUIClientInterface::IsGraphicalUI(), and EffectUIValidator::mEffect.

Here is the call graph for this function:

◆ ValidateUI()

bool DefaultEffectUIValidator::ValidateUI ( )
overridevirtual

Calls mEffect.ValidateUI()

Implements EffectUIValidator.

Definition at line 879 of file Effect.cpp.

880{
881 bool result {};
883 result = mEffect.ValidateUI(settings);
884 });
885 return result;
886}
static Settings & settings()
Definition: TrackInfo.cpp:87
void ModifySettings(Function &&function)
Do a correct read-modify-write of settings.
virtual bool ValidateUI(EffectSettings &settings)=0
EffectSettingsAccess & mAccess
Externalized state of a plug-in.

References EffectUIValidator::mAccess, EffectUIValidator::mEffect, EffectSettingsAccess::ModifySettings(), settings(), and EffectUIClientInterface::ValidateUI().

Here is the call graph for this function:

Member Data Documentation

◆ mpParent

wxWindow* DefaultEffectUIValidator::mpParent {}
protected

Definition at line 57 of file Effect.h.

Referenced by Disconnect().


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