![]() |
Audacity 3.2.0
|
Interface for transferring values from a panel of effect controls. More...
#include <EffectPlugin.h>
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 () |
![]() | |
Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
Constructor supporting type-erased custom allocation/deletion. More... | |
Publisher (Publisher &&)=default | |
Publisher & | operator= (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... | |
Static Public Member Functions | |
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 | |
static constexpr int | kPlayID = 20102 |
![]() | |
static constexpr bool | notifies_all |
Protected Member Functions | |
template<typename EventTag , typename Class , typename Event > | |
void | BindTo (wxEvtHandler &src, const EventTag &eventType, void(Class::*pmf)(Event &)) |
![]() | |
CallbackReturn | Publish (const EffectSettingChanged &message) |
Send a message to connected callbacks. More... | |
Protected Attributes | |
EffectUIClientInterface & | mEffect |
EffectSettingsAccess & | mAccess |
bool | mUIClosed { false } |
Additional Inherited Members | |
![]() | |
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... | |
Interface for transferring values from a panel of effect controls.
Definition at line 237 of file EffectPlugin.h.
EffectUIValidator::EffectUIValidator | ( | EffectUIClientInterface & | effect, |
EffectSettingsAccess & | access | ||
) |
Definition at line 27 of file EffectPlugin.cpp.
|
virtualdefault |
|
inlineprotected |
Definition at line 290 of file EffectPlugin.h.
Referenced by VSTEffectValidator::BuildFancy(), and VSTEffectValidator::BuildPlain().
|
virtual |
On the first call only, may disconnect from further event handling.
Default implemantation does nothing
Reimplemented in DefaultEffectUIValidator, LadspaEffect::Validator, and LV2Validator.
Definition at line 45 of file EffectPlugin.cpp.
|
static |
Enable or disable the Apply button of the dialog that contains parent.
Definition at line 58 of file EffectPlugin.cpp.
References EnablePreview().
Referenced by EffectAmplify::CheckClip(), EffectRepeat::DisplayNewTime(), EffectBassTreble::Validator::EnableApplyFromTransferDataFromWindow(), EffectPhaser::Validator::EnableApplyFromTransferDataFromWindow(), EffectWahwah::Validator::EnableApplyFromTransferDataToWindow(), EffectBassTreble::Validator::EnableApplyFromValidate(), EffectPhaser::Validator::EnableApplyFromValidate(), EffectWahwah::Validator::EnableApplyFromValidate(), EffectAmplify::OnAmpText(), EffectTruncSilence::OnControlChange(), EffectToneGen::OnControlUpdate(), EffectScienFilter::OnCutoff(), EffectAmplify::OnPeakText(), EffectScienFilter::OnRipple(), EffectScienFilter::OnStopbandRipple(), EffectPaulstretch::OnText(), EffectTimeScale::OnText_PitchHalfStepsEnd(), EffectTimeScale::OnText_PitchHalfStepsStart(), EffectTimeScale::OnText_PitchPercentChangeEnd(), EffectTimeScale::OnText_PitchPercentChangeStart(), EffectTimeScale::OnText_RatePercentChangeEnd(), EffectTimeScale::OnText_RatePercentChangeStart(), EffectChangeSpeed::UpdateUI(), EffectLoudness::UpdateUI(), and EffectNormalize::UpdateUI().
|
static |
Enable or disable the preview play button of the dialog that contains parent
Definition at line 83 of file EffectPlugin.cpp.
References kPlayID.
Referenced by EnableApply(), and NyquistEffect::TransferDataToWindow().
|
virtual |
Default implementation returns false
Reimplemented in AudioUnitValidator, DefaultEffectUIValidator, LV2Validator, VSTEffectValidator, and VST3UIValidator.
Definition at line 40 of file EffectPlugin.cpp.
Referenced by VST3Effect::ShowClientInterface().
|
virtual |
Handle the UI OnClose event. Default implementation calls mEffect.CloseUI()
Reimplemented in VSTEffectValidator, and VST3UIValidator.
Definition at line 49 of file EffectPlugin.cpp.
References EffectUIClientInterface::CloseUI(), mEffect, and mUIClosed.
Referenced by VST3UIValidator::OnClose().
|
virtual |
Update appearance of the panel for changes in settings.
Default implementation does nothing, returns true
Reimplemented in AudioUnitValidator, EffectBassTreble::Validator, EffectDistortion::Validator, EffectDtmf::Validator, EffectEcho::Validator, LadspaEffect::Validator, LV2Validator, EffectPhaser::Validator, EffectReverb::Validator, VSTEffectValidator, VST3UIValidator, and EffectWahwah::Validator.
Definition at line 35 of file EffectPlugin.cpp.
|
pure virtual |
Get settings data from the panel; may make error dialogs and return false.
Implemented in AudioUnitValidator, EffectBassTreble::Validator, EffectDistortion::Validator, EffectDtmf::Validator, EffectEcho::Validator, DefaultEffectUIValidator, LadspaEffect::Validator, LV2Validator, EffectPhaser::Validator, EffectReverb::Validator, VSTEffectValidator, VST3UIValidator, and EffectWahwah::Validator.
|
staticconstexpr |
Definition at line 281 of file EffectPlugin.h.
Referenced by EnablePreview().
|
protected |
Definition at line 297 of file EffectPlugin.h.
Referenced by AudioUnitValidator::AudioUnitValidator(), VSTEffectValidator::Automate(), AudioUnitValidator::EventListener(), VSTEffectValidator::Flush(), VSTEffectValidator::NotifyParameterChanged(), LV2Validator::OnChoice(), VSTEffectValidator::OnClose(), VST3UIValidator::OnClose(), VST3UIValidator::OnIdle(), AudioUnitValidator::OnIdle(), LV2Validator::OnIdle(), VSTEffectValidator::OnIdle(), LV2Validator::OnSlider(), VSTEffectValidator::OnSlider(), LV2Validator::OnText(), LV2Validator::OnToggle(), LV2Validator::OnTrigger(), LV2Validator::suil_port_write(), AudioUnitValidator::UpdateUI(), LV2Validator::UpdateUI(), VST3UIValidator::UpdateUI(), AudioUnitValidator::ValidateUI(), EffectDistortion::Validator::ValidateUI(), DefaultEffectUIValidator::ValidateUI(), LV2Validator::ValidateUI(), EffectReverb::Validator::ValidateUI(), VSTEffectValidator::ValidateUI(), VST3UIValidator::ValidateUI(), EffectWahwah::Validator::ValidateUI(), VST3UIValidator::VST3UIValidator(), and VSTEffectValidator::VSTEffectValidator().
|
protected |
Definition at line 296 of file EffectPlugin.h.
Referenced by VSTEffectValidator::FetchSettingsFromInstance(), LadspaEffect::Validator::GetEffect(), EffectBassTreble::Validator::GetEffect(), EffectDistortion::Validator::GetEffect(), EffectDtmf::Validator::GetEffect(), EffectEcho::Validator::GetEffect(), EffectPhaser::Validator::GetEffect(), EffectReverb::Validator::GetEffect(), EffectWahwah::Validator::GetEffect(), DefaultEffectUIValidator::IsGraphicalUI(), VSTEffectValidator::IsGraphicalUI(), OnClose(), VSTEffectValidator::StoreSettingsToInstance(), DefaultEffectUIValidator::ValidateUI(), and VSTEffectValidator::ValidateUI().
|
protected |
Definition at line 299 of file EffectPlugin.h.
Referenced by OnClose().