Audacity 3.2.0
|
#include <DynamicRangeProcessorEditor.h>
Classes | |
struct | HistoryPanels |
Public Member Functions | |
DynamicRangeProcessorEditor (wxWindow *parent, CompressorInstance &instance, bool isRealtime, const EffectUIServices &services, EffectSettingsAccess &access) | |
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 | |
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... | |
Protected Member Functions | |
void | Initialize (std::vector< ExtendedCompressorParameter > parameters) |
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... | |
Static Protected Attributes | |
static constexpr auto | dbStep = 0.1 |
Private Member Functions | |
void | AddCompressionCurvePanel (ShuttleGui &S, const CompressorSettings &) |
void | AddSliderPanel (ShuttleGui &S) |
void | AddCheckboxPanel (ShuttleGui &S, const DynamicRangeProcessorSettings &settings) |
void | AddClipIndicator (ShuttleGui &S) |
virtual const CompressorSettings * | GetCompressorSettings () const |
virtual const LimiterSettings * | GetLimiterSettings () const |
CompressorSettings * | GetCompressorSettings () |
LimiterSettings * | GetLimiterSettings () |
void | AddTextboxAndSlider (ShuttleGui &S, ExtendedCompressorParameter ¶m) |
bool | ValidateUI () final override |
Get settings data from the panel; may make error dialogs and return false. More... | |
bool | UpdateUI () final override |
Update appearance of the panel for changes in settings. More... | |
void | OnCheckbox (bool newVal, double &setting, void(DynamicRangeProcessorHistoryPanel::*)(bool)) |
Private Attributes | |
wxWeakRef< wxWindow > | mUIParent |
std::vector< ExtendedCompressorParameter > | mParameters |
wxDialog & | mTopLevelParent |
CompressorInstance & | mCompressorInstance |
const bool | mIsRealtime |
int | mFullHeight { 0 } |
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 Attributes inherited from EffectEditor | |
const EffectUIServices & | mUIServices |
EffectSettingsAccess & | mAccess |
bool | mUIClosed { false } |
Definition at line 86 of file DynamicRangeProcessorEditor.h.
DynamicRangeProcessorEditor::DynamicRangeProcessorEditor | ( | wxWindow * | parent, |
CompressorInstance & | instance, | ||
bool | isRealtime, | ||
const EffectUIServices & | services, | ||
EffectSettingsAccess & | access | ||
) |
Definition at line 131 of file DynamicRangeProcessorEditor.cpp.
|
private |
Definition at line 265 of file DynamicRangeProcessorEditor.cpp.
References _, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::borderSize, GET_REF, OnCheckbox(), S, safenew, settings(), and XO().
Referenced by PopulateOrExchange().
|
private |
Definition at line 327 of file DynamicRangeProcessorEditor.cpp.
References anonymous_namespace{DynamicRangeProcessorEditor.cpp}::clipIndicatorId, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::compressionMeterPanelId, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::compressionMeterPanelWidth, mUIParent, S, and safenew.
Referenced by PopulateOrExchange().
|
private |
Definition at line 347 of file DynamicRangeProcessorEditor.cpp.
References anonymous_namespace{DynamicRangeProcessorEditor.cpp}::borderSize, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::MakeRulerPanel(), mUIParent, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::rulerWidth, S, safenew, and anonymous_namespace{DynamicRangeProcessorEditor.cpp}::transferFunctionPanelId.
Referenced by PopulateOrExchange().
|
private |
Definition at line 374 of file DynamicRangeProcessorEditor.cpp.
References AddTextboxAndSlider(), details::begin(), details::end(), mParameters, S, and XO().
Referenced by PopulateOrExchange().
|
private |
Definition at line 408 of file DynamicRangeProcessorEditor.cpp.
References ExtendedCompressorParameter::attributes, DynamicRangeProcessorParameterAttributes::caption, EffectEditor::EnableApply(), DynamicRangeProcessorParameterAttributes::exponentialSlider, mUIParent, ExtendedCompressorParameter::param, Observer::Publisher< EffectSettingChanged >::Publish(), fast_float::round(), S, ExtendedCompressorParameter::slider, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::SliderToTextValue(), ExtendedCompressorParameter::text, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::TextToSliderValue(), UpdateUI(), ValidateUI(), and ExtendedCompressorParameter::value.
Referenced by AddSliderPanel().
|
inlineprivate |
Definition at line 121 of file DynamicRangeProcessorEditor.h.
References GetCompressorSettings().
|
inlineprivatevirtual |
Reimplemented in CompressorEditor.
Definition at line 111 of file DynamicRangeProcessorEditor.h.
Referenced by GetCompressorSettings(), PopulateOrExchange(), UpdateUI(), and ValidateUI().
|
inlineprivate |
Definition at line 128 of file DynamicRangeProcessorEditor.h.
References GetLimiterSettings().
|
inlineprivatevirtual |
Reimplemented in LimiterEditor.
Definition at line 116 of file DynamicRangeProcessorEditor.h.
Referenced by GetLimiterSettings(), UpdateUI(), and ValidateUI().
|
protected |
Definition at line 142 of file DynamicRangeProcessorEditor.cpp.
References mParameters.
Referenced by CompressorEditor::CompressorEditor(), and LimiterEditor::LimiterEditor().
|
private |
Definition at line 496 of file DynamicRangeProcessorEditor.cpp.
References anonymous_namespace{DynamicRangeProcessorEditor.cpp}::historyPanelId, mUIParent, Observer::Publisher< EffectSettingChanged >::Publish(), and ValidateUI().
Referenced by AddCheckboxPanel().
void DynamicRangeProcessorEditor::PopulateOrExchange | ( | ShuttleGui & | S | ) |
Definition at line 151 of file DynamicRangeProcessorEditor.cpp.
References AddCheckboxPanel(), AddClipIndicator(), AddCompressionCurvePanel(), AddSliderPanel(), anonymous_namespace{DynamicRangeProcessorEditor.cpp}::borderSize, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::clipIndicatorId, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::compressionMeterPanelId, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::compressionMeterPanelWidth, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::compressionMeterRulerPanelId, GetCompressorSettings(), anonymous_namespace{DynamicRangeProcessorEditor.cpp}::GetDbRange(), CompressorProcessor::GetMaxCompressionDb(), anonymous_namespace{DynamicRangeProcessorEditor.cpp}::GetSettings(), DynamicRangeProcessorPanel::graphMinHeight, DynamicRangeProcessorPanel::graphMinRangeDb, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::historyPanelId, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::historyRulerPanelId, EffectEditor::mAccess, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::MakeRulerPanel(), mCompressorInstance, mIsRealtime, mUIParent, anonymous_namespace{DynamicRangeProcessorEditor.cpp}::rulerWidth, S, safenew, and settings().
|
finaloverrideprivatevirtual |
Update appearance of the panel for changes in settings.
Default implementation does nothing, returns true
Reimplemented from EffectEditor.
Definition at line 478 of file DynamicRangeProcessorEditor.cpp.
References audacity::TypedAny< Tag >::cast(), EffectSettingsAccess::Get(), GetCompressorSettings(), GetLimiterSettings(), EffectEditor::mAccess, mParameters, mUIParent, fast_float::round(), anonymous_namespace{DynamicRangeProcessorEditor.cpp}::TextToSliderValue(), and anonymous_namespace{DynamicRangeProcessorEditor.cpp}::transferFunctionPanelId.
Referenced by AddTextboxAndSlider().
|
finaloverrideprivatevirtual |
Get settings data from the panel; may make error dialogs and return false.
Implements EffectEditor.
Definition at line 465 of file DynamicRangeProcessorEditor.cpp.
References GetCompressorSettings(), GetLimiterSettings(), EffectEditor::mAccess, EffectSettingsAccess::ModifySettings(), and settings().
Referenced by AddTextboxAndSlider(), and OnCheckbox().
|
staticconstexprprotected |
Definition at line 99 of file DynamicRangeProcessorEditor.h.
|
private |
Definition at line 152 of file DynamicRangeProcessorEditor.h.
Referenced by PopulateOrExchange().
|
private |
Definition at line 154 of file DynamicRangeProcessorEditor.h.
|
private |
Definition at line 153 of file DynamicRangeProcessorEditor.h.
Referenced by PopulateOrExchange().
|
private |
Definition at line 150 of file DynamicRangeProcessorEditor.h.
Referenced by AddSliderPanel(), Initialize(), and UpdateUI().
|
private |
Definition at line 151 of file DynamicRangeProcessorEditor.h.
|
private |
Definition at line 149 of file DynamicRangeProcessorEditor.h.
Referenced by AddClipIndicator(), AddCompressionCurvePanel(), AddTextboxAndSlider(), OnCheckbox(), PopulateOrExchange(), and UpdateUI().