Audacity 3.2.0
Silence.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 Silence.cpp
6
7 Dominic Mazzoni
8
9*******************************************************************//*******************************************************************/
15#include "Silence.h"
16#include "EffectEditor.h"
17#include "LoadEffects.h"
18
19#include "ShuttleGui.h"
20#include "../widgets/NumericTextCtrl.h"
21
23
24// Effect implementation
25
26std::unique_ptr<EffectEditor> EffectSilence::PopulateOrExchange(
28 const EffectOutputs *)
29{
30 S.StartVerticalLay();
31 {
32 S.StartHorizontalLay();
33 {
34 S.AddPrompt(XXO("&Duration:"));
35 auto &extra = access.Get().extra;
38 S.GetParent(), wxID_ANY,
40 extra.GetDurationFormat(),
41 extra.GetDuration(),
43 .AutoPos(true));
44 S.Name(XO("Duration"))
45 .Position(wxALIGN_CENTER | wxALL)
46 .AddWindow(mDurationT);
47 }
48 S.EndHorizontalLay();
49 }
50 S.EndVerticalLay();
51
52 return nullptr;
53}
54
56{
57 mDurationT->SetValue(settings.extra.GetDuration());
58
59 return true;
60}
61
63{
64 settings.extra.SetDuration(mDurationT->GetValue());
65
66 return true;
67}
XO("Cut/Copy/Paste")
XXO("&Cut/Copy/Paste Toolbar")
#define safenew
Definition: MemoryX.h:10
const NumericConverterType & NumericConverterType_TIME()
#define S(N)
Definition: ToChars.cpp:64
static Settings & settings()
Definition: TrackInfo.cpp:51
double mProjectRate
Definition: EffectBase.h:119
Performs effect computation.
Hold values to send to effect output meters.
virtual const EffectSettings & Get()=0
std::unique_ptr< EffectEditor > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) override
Add controls to effect panel; always succeeds.
Definition: Silence.cpp:26
bool TransferDataFromWindow(EffectSettings &settings) override
Definition: Silence.cpp:62
NumericTextCtrl * mDurationT
Definition: Silence.h:31
bool TransferDataToWindow(const EffectSettings &settings) override
Definition: Silence.cpp:55
static FormatterContext SampleRateContext(double sampleRate)
void SetValue(double newValue)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
BuiltinEffectsModule::Registration< EffectSilence > reg
Definition: Silence.cpp:22
Externalized state of a plug-in.
EffectSettingsExtra extra
Options & AutoPos(bool enable)