![]() |
Audacity 3.2.0
|
Public Member Functions | |
Editor (const EffectUIServices &effect, EffectSettingsAccess &access, double sampleRate, EffectType type, const LadspaEffectOutputs *pOutputs) | |
bool | UpdateUI () override |
Update appearance of the panel for changes in settings. More... | |
bool | ValidateUI () override |
Get settings data from the panel; may make error dialogs and return false. More... | |
void | Disconnect () override |
On the first call only, may disconnect from further event handling. More... | |
void | PopulateUI (ShuttleGui &S) |
void | OnCheckBox (wxCommandEvent &evt) |
void | OnSlider (wxCommandEvent &evt) |
void | OnTextCtrl (wxCommandEvent &evt) |
void | RefreshControls () |
void | UpdateControl (int index, float value, float epsilon) |
void | UpdateControls (const LadspaEffectSettings &src) |
const LadspaEffect & | GetEffect () |
![]() | |
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 () |
![]() | |
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... | |
Public Attributes | |
const double | mSampleRate |
const EffectType | mType |
LadspaEffectSettings | mSettings |
const LadspaEffectOutputs *const | mpOutputs |
NumericTextCtrl * | mDuration {} |
wxWeakRef< wxDialog > | mDialog |
wxWindow * | mParent {} |
ArrayOf< wxSlider * > | mSliders |
ArrayOf< wxTextCtrl * > | mFields |
ArrayOf< wxStaticText * > | mLabels |
ArrayOf< wxCheckBox * > | mToggles |
std::vector< LadspaEffectMeter * > | mMeters |
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... | |
![]() | |
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 constexpr int | kPlayID = 20102 |
![]() | |
static constexpr bool | notifies_all |
![]() | |
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... | |
![]() | |
const EffectUIServices & | mUIServices |
EffectSettingsAccess & | mAccess |
bool | mUIClosed { false } |
Definition at line 1189 of file LadspaEffect.cpp.
|
inline |
Definition at line 1190 of file LadspaEffect.cpp.
|
overridevirtual |
On the first call only, may disconnect from further event handling.
Default implemantation does nothing
Reimplemented from EffectEditor.
Definition at line 1534 of file LadspaEffect.cpp.
|
inline |
Definition at line 1215 of file LadspaEffect.cpp.
References EffectEditor::mUIServices.
void LadspaEffect::Editor::OnCheckBox | ( | wxCommandEvent & | evt | ) |
Definition at line 1698 of file LadspaEffect.cpp.
References ID_Toggles, and BasicEffectUIServices::ValidateUI().
Referenced by PopulateUI().
void LadspaEffect::Editor::OnSlider | ( | wxCommandEvent & | evt | ) |
Definition at line 1706 of file LadspaEffect.cpp.
References ControlValueTolerance, _LADSPA_PortRangeHint::HintDescriptor, ID_Sliders, LADSPA_IS_HINT_BOUNDED_ABOVE, LADSPA_IS_HINT_BOUNDED_BELOW, LADSPA_IS_HINT_INTEGER, LADSPA_IS_HINT_SAMPLE_RATE, _LADSPA_PortRangeHint::LowerBound, str, Internat::ToDisplayString(), _LADSPA_PortRangeHint::UpperBound, BasicEffectUIServices::ValidateUI(), and wxT().
Referenced by PopulateUI().
void LadspaEffect::Editor::OnTextCtrl | ( | wxCommandEvent & | evt | ) |
Definition at line 1741 of file LadspaEffect.cpp.
References Internat::CompatibleToDouble(), ControlValueTolerance, _LADSPA_PortRangeHint::HintDescriptor, ID_Texts, LADSPA_IS_HINT_BOUNDED_ABOVE, LADSPA_IS_HINT_BOUNDED_BELOW, LADSPA_IS_HINT_SAMPLE_RATE, _LADSPA_PortRangeHint::LowerBound, _LADSPA_PortRangeHint::UpperBound, and BasicEffectUIServices::ValidateUI().
Referenced by PopulateUI().
void LadspaEffect::Editor::PopulateUI | ( | ShuttleGui & | S | ) |
Definition at line 1239 of file LadspaEffect.cpp.
References _, NumericTextCtrl::Options::AutoPos(), EffectTypeGenerate, _LADSPA_PortRangeHint::HintDescriptor, ID_Duration, ID_Sliders, ID_Texts, ID_Toggles, LADSPA_IS_HINT_BOUNDED_ABOVE, LADSPA_IS_HINT_BOUNDED_BELOW, LADSPA_IS_HINT_INTEGER, LADSPA_IS_HINT_SAMPLE_RATE, LADSPA_IS_HINT_TOGGLED, LADSPA_IS_PORT_AUDIO, LADSPA_IS_PORT_INPUT, LADSPA_IS_PORT_OUTPUT, LAT1CTOWX, _LADSPA_PortRangeHint::LowerBound, min(), NumericConverterType_TIME, OnCheckBox(), OnSlider(), OnTextCtrl(), S, safenew, FormatterContext::SampleRateContext(), str, Internat::ToDisplayString(), _LADSPA_PortRangeHint::UpperBound, wxEVT_COMMAND_TEXT_UPDATED, wxT(), and XO().
void LadspaEffect::Editor::RefreshControls | ( | ) |
Definition at line 1773 of file LadspaEffect.cpp.
References EffectWithSettings< LadspaEffectSettings, StatelessPerTrackEffect >::GetSettings(), _LADSPA_PortRangeHint::HintDescriptor, LADSPA_IS_HINT_INTEGER, LADSPA_IS_HINT_SAMPLE_RATE, LADSPA_IS_HINT_TOGGLED, LADSPA_IS_PORT_CONTROL, LADSPA_IS_PORT_OUTPUT, Internat::ToDisplayString(), and wxT().
void LadspaEffect::Editor::UpdateControl | ( | int | index, |
float | value, | ||
float | epsilon | ||
) |
Definition at line 1815 of file LadspaEffect.cpp.
void LadspaEffect::Editor::UpdateControls | ( | const LadspaEffectSettings & | src | ) |
Definition at line 1828 of file LadspaEffect.cpp.
References LadspaEffectSettings::controls, ControlValueTolerance, _LADSPA_PortRangeHint::HintDescriptor, LADSPA_IS_HINT_INTEGER, LADSPA_IS_HINT_SAMPLE_RATE, LADSPA_IS_HINT_TOGGLED, LADSPA_IS_PORT_CONTROL, and LADSPA_IS_PORT_OUTPUT.
|
overridevirtual |
Update appearance of the panel for changes in settings.
Default implementation does nothing, returns true
Reimplemented from EffectEditor.
Definition at line 1233 of file LadspaEffect.cpp.
|
overridevirtual |
Get settings data from the panel; may make error dialogs and return false.
Implements EffectEditor.
Definition at line 1523 of file LadspaEffect.cpp.
References EffectTypeGenerate, EffectWithSettings< LadspaEffectSettings, StatelessPerTrackEffect >::GetSettings(), and settings().
wxWeakRef<wxDialog> LadspaEffect::Editor::mDialog |
Definition at line 1224 of file LadspaEffect.cpp.
NumericTextCtrl* LadspaEffect::Editor::mDuration {} |
Definition at line 1223 of file LadspaEffect.cpp.
ArrayOf<wxTextCtrl*> LadspaEffect::Editor::mFields |
Definition at line 1227 of file LadspaEffect.cpp.
ArrayOf<wxStaticText*> LadspaEffect::Editor::mLabels |
Definition at line 1228 of file LadspaEffect.cpp.
std::vector<LadspaEffectMeter *> LadspaEffect::Editor::mMeters |
Definition at line 1230 of file LadspaEffect.cpp.
wxWindow* LadspaEffect::Editor::mParent {} |
Definition at line 1225 of file LadspaEffect.cpp.
const LadspaEffectOutputs* const LadspaEffect::Editor::mpOutputs |
Definition at line 1221 of file LadspaEffect.cpp.
const double LadspaEffect::Editor::mSampleRate |
Definition at line 1218 of file LadspaEffect.cpp.
LadspaEffectSettings LadspaEffect::Editor::mSettings |
Definition at line 1220 of file LadspaEffect.cpp.
ArrayOf<wxSlider*> LadspaEffect::Editor::mSliders |
Definition at line 1226 of file LadspaEffect.cpp.
ArrayOf<wxCheckBox*> LadspaEffect::Editor::mToggles |
Definition at line 1229 of file LadspaEffect.cpp.
const EffectType LadspaEffect::Editor::mType |
Definition at line 1219 of file LadspaEffect.cpp.