Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
EffectEcho::Editor Struct Reference
Inheritance diagram for EffectEcho::Editor:
[legend]
Collaboration diagram for EffectEcho::Editor:
[legend]

Public Member Functions

 Editor (const EffectUIServices &services, EffectSettingsAccess &access, const EchoSettings &settings)
 
virtual ~Editor ()=default
 
bool ValidateUI () override
 Get settings data from the panel; may make error dialogs and return false. More...
 
bool UpdateUI () override
 Update appearance of the panel for changes in settings. More...
 
void PopulateOrExchange (ShuttleGui &S)
 
- 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...
 

Public Attributes

EchoSettings mSettings
 

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...
 
- Protected Attributes inherited from EffectEditor
const EffectUIServicesmUIServices
 
EffectSettingsAccessmAccess
 
bool mUIClosed { false }
 

Detailed Description

Definition at line 36 of file Echo.cpp.

Constructor & Destructor Documentation

◆ Editor()

EffectEcho::Editor::Editor ( const EffectUIServices services,
EffectSettingsAccess access,
const EchoSettings settings 
)
inline

Definition at line 39 of file Echo.cpp.

41 : EffectEditor{ services, access }
43 {}
static Settings & settings()
Definition: TrackInfo.cpp:51
EchoSettings mSettings
Definition: Echo.cpp:51

◆ ~Editor()

virtual EffectEcho::Editor::~Editor ( )
virtualdefault

Member Function Documentation

◆ PopulateOrExchange()

void EffectEcho::Editor::PopulateOrExchange ( ShuttleGui S)

Definition at line 68 of file Echo.cpp.

69{
70 auto& echoSettings = mSettings;
71
72 S.AddSpace(0, 5);
73
74 S.StartMultiColumn(2, wxALIGN_CENTER);
75 {
76 S.Validator<FloatingPointValidator<double>>(
77 3, &echoSettings.delay, NumValidatorStyle::NO_TRAILING_ZEROES,
79 .AddTextBox(XXO("&Delay time (seconds):"), L"", 10);
80
81 S.Validator<FloatingPointValidator<double>>(
82 3, &echoSettings.decay, NumValidatorStyle::NO_TRAILING_ZEROES,
84 .AddTextBox(XXO("D&ecay factor:"), L"", 10);
85 }
86 S.EndMultiColumn();
87}
XXO("&Cut/Copy/Paste Toolbar")
#define S(N)
Definition: ToChars.cpp:64
static constexpr EffectParameter Decay
Definition: EchoBase.h:102
static constexpr EffectParameter Delay
Definition: EchoBase.h:96
const Type min
Minimum value.
const Type max
Maximum value.

References EchoBase::Decay, EchoBase::Delay, EffectParameter< Structure, Member, Type, Value >::max, EffectParameter< Structure, Member, Type, Value >::min, mSettings, S, and XXO().

Here is the call graph for this function:

◆ UpdateUI()

bool EffectEcho::Editor::UpdateUI ( )
overridevirtual

Update appearance of the panel for changes in settings.

Default implementation does nothing, returns true

Returns
true if successful

Reimplemented from EffectEditor.

Definition at line 107 of file Echo.cpp.

108{
109 // get the settings from the MessageBuffer and write them to our local copy
110 const auto& settings = mAccess.Get();
111
113
114 return true;
115}
EffectSettingsAccess & mAccess
Definition: EffectEditor.h:92
virtual const EffectSettings & Get()=0
static EchoSettings & GetSettings(EffectSettings &settings)
Assume settings originated from MakeSettings() and copies thereof.
Definition: Effect.h:166

References EffectWithSettings< EchoSettings, PerTrackEffect >::GetSettings(), and settings().

Here is the call graph for this function:

◆ ValidateUI()

bool EffectEcho::Editor::ValidateUI ( )
overridevirtual

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

Returns
true only if panel settings are acceptable

Implements EffectEditor.

Definition at line 90 of file Echo.cpp.

91{
93 (
95 {
96 // pass back the modified settings to the MessageBuffer
97
99 return nullptr;
100 }
101 );
102
103 return true;
104}
void ModifySettings(Function &&function)
Do a correct read-modify-write of settings.
Externalized state of a plug-in.

References EffectWithSettings< EchoSettings, PerTrackEffect >::GetSettings(), and settings().

Here is the call graph for this function:

Member Data Documentation

◆ mSettings

EchoSettings EffectEcho::Editor::mSettings

Definition at line 51 of file Echo.cpp.

Referenced by PopulateOrExchange().


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