Audacity 3.2.0
Public Member Functions | Protected Attributes | List of all members
anonymous_namespace{StatefulEffectUIServices.cpp}::DefaultEffectEditor Class Reference
Inheritance diagram for anonymous_namespace{StatefulEffectUIServices.cpp}::DefaultEffectEditor:
[legend]
Collaboration diagram for anonymous_namespace{StatefulEffectUIServices.cpp}::DefaultEffectEditor:
[legend]

Public Member Functions

 DefaultEffectEditor (const EffectPlugin &plugin, EffectUIServices &services, EffectSettingsAccess &access, wxWindow *pParent=nullptr)
 
 ~DefaultEffectEditor () override
 Calls Disconnect. More...
 
bool ValidateUI () override
 Calls mServices.ValidateUI() More...
 
void Disconnect () override
 On the first call only, may disconnect from further event handling. More...
 
- Public Member Functions inherited from EffectEditor
 EffectEditor (const EffectUIServices &services, EffectSettingsAccess &access)
 
virtual ~EffectEditor ()
 
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 ()
 
- Public Member Functions inherited from Observer::Publisher< EffectSettingChanged >
 Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={})
 Constructor supporting type-erased custom allocation/deletion. More...
 
 Publisher (Publisher &&)=default
 
Publisheroperator= (Publisher &&)=default
 
Subscription Subscribe (Callback callback)
 Connect a callback to the Publisher; later-connected are called earlier. More...
 
Subscription Subscribe (Object &obj, Return(Object::*callback)(Args...))
 Overload of Subscribe takes an object and pointer-to-member-function. More...
 

Protected Attributes

const EffectPluginmPlugin
 
wxWindow * mpParent {}
 
- Protected Attributes inherited from EffectEditor
const EffectUIServicesmUIServices
 
EffectSettingsAccessmAccess
 
bool mUIClosed { false }
 

Additional Inherited Members

- Public Types inherited from Observer::Publisher< EffectSettingChanged >
using message_type = EffectSettingChanged
 
using CallbackReturn = std::conditional_t< true, void, bool >
 
using Callback = std::function< CallbackReturn(const EffectSettingChanged &) >
 Type of functions that can be connected to the Publisher. More...
 
- Static Public Member Functions inherited from EffectEditor
static bool EnableApply (wxWindow *parent, bool enable=true)
 Enable or disable the Apply button of the dialog that contains parent. More...
 
static bool EnablePreview (wxWindow *parent, bool enable=true)
 
- Static Public Attributes inherited from EffectEditor
static constexpr int kPlayID = 20102
 
- Static Public Attributes inherited from Observer::Publisher< EffectSettingChanged >
static constexpr bool notifies_all
 
- Protected Member Functions inherited from EffectEditor
template<typename EventTag , typename Class , typename Event >
void BindTo (wxEvtHandler &src, const EventTag &eventType, void(Class::*pmf)(Event &))
 
- Protected Member Functions inherited from Observer::Publisher< EffectSettingChanged >
CallbackReturn Publish (const EffectSettingChanged &message)
 Send a message to connected callbacks. More...
 

Detailed Description

Default implementation of EffectEditor invokes ValidateUI method of an EffectUIServices

Definition at line 29 of file StatefulEffectUIServices.cpp.

Constructor & Destructor Documentation

◆ DefaultEffectEditor()

anonymous_namespace{StatefulEffectUIServices.cpp}::DefaultEffectEditor::DefaultEffectEditor ( const EffectPlugin plugin,
EffectUIServices services,
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 52 of file StatefulEffectUIServices.cpp.

◆ ~DefaultEffectEditor()

anonymous_namespace{StatefulEffectUIServices.cpp}::DefaultEffectEditor::~DefaultEffectEditor ( )
override

Calls Disconnect.

Definition at line 61 of file StatefulEffectUIServices.cpp.

62{
63 Disconnect();
64}
void Disconnect() override
On the first call only, may disconnect from further event handling.

References Disconnect().

Here is the call graph for this function:

Member Function Documentation

◆ Disconnect()

void anonymous_namespace{StatefulEffectUIServices.cpp}::DefaultEffectEditor::Disconnect ( )
overridevirtual

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

Default implemantation does nothing

Reimplemented from EffectEditor.

Definition at line 76 of file StatefulEffectUIServices.cpp.

77{
78 if (mpParent) {
79 mpParent->PopEventHandler();
80 mpParent = nullptr;
81 }
82}

References mpParent.

Referenced by ~DefaultEffectEditor().

Here is the caller graph for this function:

◆ ValidateUI()

bool anonymous_namespace{StatefulEffectUIServices.cpp}::DefaultEffectEditor::ValidateUI ( )
overridevirtual

Calls mServices.ValidateUI()

Implements EffectEditor.

Definition at line 66 of file StatefulEffectUIServices.cpp.

67{
68 bool result {};
71 return nullptr;
72 });
73 return result;
74}
static Settings & settings()
Definition: TrackInfo.cpp:51
const EffectUIServices & mUIServices
Definition: EffectEditor.h:91
EffectSettingsAccess & mAccess
Definition: EffectEditor.h:92
void ModifySettings(Function &&function)
Do a correct read-modify-write of settings.
virtual bool ValidateUI(const EffectPlugin &context, EffectSettings &settings) const =0
Externalized state of a plug-in.

References EffectEditor::mAccess, EffectSettingsAccess::ModifySettings(), mPlugin, EffectEditor::mUIServices, settings(), and EffectUIServices::ValidateUI().

Here is the call graph for this function:

Member Data Documentation

◆ mPlugin

const EffectPlugin& anonymous_namespace{StatefulEffectUIServices.cpp}::DefaultEffectEditor::mPlugin
protected

Definition at line 48 of file StatefulEffectUIServices.cpp.

Referenced by ValidateUI().

◆ mpParent

wxWindow* anonymous_namespace{StatefulEffectUIServices.cpp}::DefaultEffectEditor::mpParent {}
protected

Definition at line 49 of file StatefulEffectUIServices.cpp.

Referenced by Disconnect().


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