Audacity 3.2.0
FindClipping.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 FindClipping.cpp
6
7 Leland Lucius
8
9*//****************************************************************//*******************************************************************/
15#include "FindClipping.h"
16#include "EffectEditor.h"
17#include "LoadEffects.h"
18
19#include "ShuttleGui.h"
20#include "../widgets/valnum.h"
21#include "AudacityMessageBox.h"
22
24
25std::unique_ptr<EffectEditor> EffectFindClipping::PopulateOrExchange(
27 const EffectOutputs *)
28{
29 mUIParent = S.GetParent();
30 DoPopulateOrExchange(S, access);
31 return nullptr;
32}
33
36{
37 mpAccess = access.shared_from_this();
38 S.StartMultiColumn(2, wxALIGN_CENTER);
39 {
40 S
41 .Validator<IntegerValidator<int>>(
42 &mStart, NumValidatorStyle::DEFAULT, Start.min)
43 .TieTextBox(XXO("&Start threshold (samples):"), mStart, 10);
44
45 S
46 .Validator<IntegerValidator<int>>(
47 &mStop, NumValidatorStyle::DEFAULT, Stop.min)
48 .TieTextBox(XXO("St&op threshold (samples):"), mStop, 10);
49 }
50 S.EndMultiColumn();
51}
52
54{
56 // To do: eliminate this and just use validators for controls
58
59 return true;
60}
61
63{
64 if (!mUIParent->Validate())
65 {
66 return false;
67 }
68
70 // To do: eliminate this and just use validators for controls
72
73 return true;
74}
XXO("&Cut/Copy/Paste Toolbar")
@ eIsSettingToDialog
Definition: ShuttleGui.h:39
@ eIsGettingFromDialog
Definition: ShuttleGui.h:38
#define S(N)
Definition: ToChars.cpp:64
bool TransferDataToWindow(const EffectSettings &settings) override
void DoPopulateOrExchange(ShuttleGui &S, EffectSettingsAccess &access)
EffectSettingsAccessPtr mpAccess
Definition: FindClipping.h:36
wxWeakRef< wxWindow > mUIParent
Definition: FindClipping.h:35
std::unique_ptr< EffectEditor > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) override
Add controls to effect panel; always succeeds.
bool TransferDataFromWindow(EffectSettings &settings) override
Performs effect computation.
Hold values to send to effect output meters.
static constexpr EffectParameter Start
static constexpr EffectParameter Stop
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
BuiltinEffectsModule::Registration< EffectFindClipping > reg
const Type min
Minimum value.
Externalized state of a plug-in.