Audacity 3.2.0
|
Public Member Functions | |
Editor (const EffectUIServices &services, DistortionBase::Instance &instance, EffectSettingsAccess &access, const EffectDistortionSettings &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) |
void | OnTypeChoice (wxCommandEvent &evt) |
void | OnDCBlockCheckbox (wxCommandEvent &evt) |
void | OnThresholdText (wxCommandEvent &evt) |
void | OnThresholdSlider (wxCommandEvent &evt) |
void | OnNoiseFloorText (wxCommandEvent &evt) |
void | OnNoiseFloorSlider (wxCommandEvent &evt) |
void | OnParam1Text (wxCommandEvent &evt) |
void | OnParam1Slider (wxCommandEvent &evt) |
void | OnParam2Text (wxCommandEvent &evt) |
void | OnParam2Slider (wxCommandEvent &evt) |
void | OnRepeatsText (wxCommandEvent &evt) |
void | OnRepeatsSlider (wxCommandEvent &evt) |
EffectDistortionState & | GetState () |
void | UpdateControl (control id, bool enable, TranslatableString name) |
void | UpdateUIControls () |
void | UpdateControlText (wxTextCtrl *textCtrl, wxString &string, bool enabled) |
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 | |
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 | |
wxChoice * | mTypeChoiceCtrl |
wxTextCtrl * | mThresholdT |
wxTextCtrl * | mNoiseFloorT |
wxTextCtrl * | mParam1T |
wxTextCtrl * | mParam2T |
wxTextCtrl * | mRepeatsT |
wxSlider * | mThresholdS |
wxSlider * | mNoiseFloorS |
wxSlider * | mParam1S |
wxSlider * | mParam2S |
wxSlider * | mRepeatsS |
wxCheckBox * | mDCBlockCheckBox |
wxStaticText * | mThresholdTxt |
wxStaticText * | mNoiseFloorTxt |
wxStaticText * | mParam1Txt |
wxStaticText * | mParam2Txt |
wxStaticText * | mRepeatsTxt |
wxString | mOldThresholdTxt |
wxString | mOldmNoiseFloorTxt |
wxString | mOldParam1Txt |
wxString | mOldParam2Txt |
wxString | mOldRepeatsTxt |
EffectDistortionSettings | mSettings |
wxWeakRef< wxWindow > | mUIParent {} |
DistortionBase::Instance & | mInstance |
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 EffectUIServices & | mUIServices |
EffectSettingsAccess & | mAccess |
bool | mUIClosed { false } |
Definition at line 60 of file Distortion.cpp.
|
inline |
Definition at line 63 of file Distortion.cpp.
|
virtualdefault |
EffectDistortionState & EffectDistortion::Editor::GetState | ( | ) |
Definition at line 162 of file Distortion.cpp.
void EffectDistortion::Editor::OnDCBlockCheckbox | ( | wxCommandEvent & | evt | ) |
Definition at line 381 of file Distortion.cpp.
References BasicEffectUIServices::ValidateUI().
Referenced by PopulateOrExchange().
void EffectDistortion::Editor::OnNoiseFloorSlider | ( | wxCommandEvent & | evt | ) |
Definition at line 432 of file Distortion.cpp.
References BasicEffectUIServices::ValidateUI().
Referenced by PopulateOrExchange().
void EffectDistortion::Editor::OnNoiseFloorText | ( | wxCommandEvent & | evt | ) |
Definition at line 421 of file Distortion.cpp.
References BasicEffectUIServices::ValidateUI().
Referenced by PopulateOrExchange().
void EffectDistortion::Editor::OnParam1Slider | ( | wxCommandEvent & | evt | ) |
Definition at line 455 of file Distortion.cpp.
References BasicEffectUIServices::ValidateUI().
Referenced by PopulateOrExchange().
void EffectDistortion::Editor::OnParam1Text | ( | wxCommandEvent & | evt | ) |
Definition at line 444 of file Distortion.cpp.
References BasicEffectUIServices::ValidateUI().
Referenced by PopulateOrExchange().
void EffectDistortion::Editor::OnParam2Slider | ( | wxCommandEvent & | evt | ) |
Definition at line 477 of file Distortion.cpp.
References BasicEffectUIServices::ValidateUI().
Referenced by PopulateOrExchange().
void EffectDistortion::Editor::OnParam2Text | ( | wxCommandEvent & | evt | ) |
Definition at line 466 of file Distortion.cpp.
References BasicEffectUIServices::ValidateUI().
Referenced by PopulateOrExchange().
void EffectDistortion::Editor::OnRepeatsSlider | ( | wxCommandEvent & | evt | ) |
Definition at line 499 of file Distortion.cpp.
References BasicEffectUIServices::ValidateUI().
Referenced by PopulateOrExchange().
void EffectDistortion::Editor::OnRepeatsText | ( | wxCommandEvent & | evt | ) |
Definition at line 488 of file Distortion.cpp.
References BasicEffectUIServices::ValidateUI().
Referenced by PopulateOrExchange().
void EffectDistortion::Editor::OnThresholdSlider | ( | wxCommandEvent & | evt | ) |
Definition at line 406 of file Distortion.cpp.
References DB_TO_LINEAR, LINEAR_TO_DB, EffectParameter< Structure, Member, Type, Value >::min, EffectParameter< Structure, Member, Type, Value >::scale, DistortionBase::Threshold_dB, and BasicEffectUIServices::ValidateUI().
Referenced by PopulateOrExchange().
void EffectDistortion::Editor::OnThresholdText | ( | wxCommandEvent & | evt | ) |
Definition at line 394 of file Distortion.cpp.
References DB_TO_LINEAR, EffectParameter< Structure, Member, Type, Value >::scale, DistortionBase::Threshold_dB, and BasicEffectUIServices::ValidateUI().
Referenced by PopulateOrExchange().
void EffectDistortion::Editor::OnTypeChoice | ( | wxCommandEvent & | evt | ) |
Definition at line 371 of file Distortion.cpp.
References BasicEffectUIServices::ValidateUI().
Referenced by PopulateOrExchange().
void EffectDistortion::Editor::PopulateOrExchange | ( | ShuttleGui & | S | ) |
Definition at line 182 of file Distortion.cpp.
References DB_TO_LINEAR, DistortionBase::DCBlock, EffectParameter< Structure, Member, Type, Value >::def, defaultLabel(), DistortionBase::kTableTypeStrings, EffectParameter< Structure, Member, Type, Value >::max, EffectParameter< Structure, Member, Type, Value >::min, Msgids(), DistortionBase::NoiseFloor, DistortionBase::nTableTypes, OnDCBlockCheckbox(), OnNoiseFloorSlider(), OnNoiseFloorText(), OnParam1Slider(), OnParam1Text(), OnParam2Slider(), OnParam2Text(), OnRepeatsSlider(), OnRepeatsText(), OnThresholdSlider(), OnThresholdText(), OnTypeChoice(), DistortionBase::Param1, DistortionBase::Param2, DistortionBase::Repeats, S, EffectParameter< Structure, Member, Type, Value >::scale, DistortionBase::Threshold_dB, wxT(), XO(), and XXO().
void EffectDistortion::Editor::UpdateControl | ( | control | id, |
bool | enable, | ||
TranslatableString | name | ||
) |
Definition at line 682 of file Distortion.cpp.
References DB_TO_LINEAR, EffectDistortion::ID_DCBlock, EffectDistortion::ID_NoiseFloor, EffectDistortion::ID_Param1, EffectDistortion::ID_Param2, EffectDistortion::ID_Repeats, EffectDistortion::ID_Threshold, name, EffectParameter< Structure, Member, Type, Value >::scale, DistortionBase::Threshold_dB, wxT(), and XO().
void EffectDistortion::Editor::UpdateControlText | ( | wxTextCtrl * | textCtrl, |
wxString & | string, | ||
bool | enabled | ||
) |
Definition at line 777 of file Distortion.cpp.
References wxT().
|
overridevirtual |
Update appearance of the panel for changes in settings.
Default implementation does nothing, returns true
Reimplemented from EffectEditor.
Definition at line 346 of file Distortion.cpp.
References DB_TO_LINEAR, EffectParameter< Structure, Member, Type, Value >::scale, and DistortionBase::Threshold_dB.
void EffectDistortion::Editor::UpdateUIControls | ( | ) |
Definition at line 510 of file Distortion.cpp.
References defaultLabel(), EffectDistortion::ID_DCBlock, EffectDistortion::ID_NoiseFloor, EffectDistortion::ID_Param1, EffectDistortion::ID_Param2, EffectDistortion::ID_Repeats, EffectDistortion::ID_Threshold, DistortionBase::kCubic, DistortionBase::kEvenHarmonics, DistortionBase::kExpCurve, DistortionBase::kHalfSinCurve, DistortionBase::kHardClip, DistortionBase::kHardLimiter, DistortionBase::kLeveller, DistortionBase::kLogCurve, DistortionBase::kRectifier, DistortionBase::kSinCurve, DistortionBase::kSoftClip, and XO().
|
overridevirtual |
Get settings data from the panel; may make error dialogs and return false.
mUIParent()->Validate() ||
Implements EffectEditor.
Definition at line 131 of file Distortion.cpp.
References EffectWithSettings< EffectDistortionSettings, PerTrackEffect >::GetSettings(), EffectEditor::mAccess, EffectSettingsAccess::ModifySettings(), mSettings, mUIParent, and settings().
wxCheckBox* EffectDistortion::Editor::mDCBlockCheckBox |
Definition at line 104 of file Distortion.cpp.
DistortionBase::Instance& EffectDistortion::Editor::mInstance |
Definition at line 127 of file Distortion.cpp.
wxSlider* EffectDistortion::Editor::mNoiseFloorS |
Definition at line 99 of file Distortion.cpp.
wxTextCtrl* EffectDistortion::Editor::mNoiseFloorT |
Definition at line 93 of file Distortion.cpp.
wxStaticText* EffectDistortion::Editor::mNoiseFloorTxt |
Definition at line 107 of file Distortion.cpp.
wxString EffectDistortion::Editor::mOldmNoiseFloorTxt |
Definition at line 113 of file Distortion.cpp.
wxString EffectDistortion::Editor::mOldParam1Txt |
Definition at line 114 of file Distortion.cpp.
wxString EffectDistortion::Editor::mOldParam2Txt |
Definition at line 115 of file Distortion.cpp.
wxString EffectDistortion::Editor::mOldRepeatsTxt |
Definition at line 116 of file Distortion.cpp.
wxString EffectDistortion::Editor::mOldThresholdTxt |
Definition at line 112 of file Distortion.cpp.
wxSlider* EffectDistortion::Editor::mParam1S |
Definition at line 100 of file Distortion.cpp.
wxTextCtrl* EffectDistortion::Editor::mParam1T |
Definition at line 94 of file Distortion.cpp.
wxStaticText* EffectDistortion::Editor::mParam1Txt |
Definition at line 108 of file Distortion.cpp.
wxSlider* EffectDistortion::Editor::mParam2S |
Definition at line 101 of file Distortion.cpp.
wxTextCtrl* EffectDistortion::Editor::mParam2T |
Definition at line 95 of file Distortion.cpp.
wxStaticText* EffectDistortion::Editor::mParam2Txt |
Definition at line 109 of file Distortion.cpp.
wxSlider* EffectDistortion::Editor::mRepeatsS |
Definition at line 102 of file Distortion.cpp.
wxTextCtrl* EffectDistortion::Editor::mRepeatsT |
Definition at line 96 of file Distortion.cpp.
wxStaticText* EffectDistortion::Editor::mRepeatsTxt |
Definition at line 110 of file Distortion.cpp.
EffectDistortionSettings EffectDistortion::Editor::mSettings |
Definition at line 118 of file Distortion.cpp.
Referenced by ValidateUI().
wxSlider* EffectDistortion::Editor::mThresholdS |
Definition at line 98 of file Distortion.cpp.
wxTextCtrl* EffectDistortion::Editor::mThresholdT |
Definition at line 92 of file Distortion.cpp.
wxStaticText* EffectDistortion::Editor::mThresholdTxt |
Definition at line 106 of file Distortion.cpp.
wxChoice* EffectDistortion::Editor::mTypeChoiceCtrl |
Definition at line 91 of file Distortion.cpp.
wxWeakRef<wxWindow> EffectDistortion::Editor::mUIParent {} |
Definition at line 126 of file Distortion.cpp.
Referenced by ValidateUI().