Audacity 3.2.0
Repeat.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 Repeat.h
6
7 Dominic Mazzoni
8
9**********************************************************************/
10
11#ifndef __AUDACITY_EFFECT_REPEAT__
12#define __AUDACITY_EFFECT_REPEAT__
13
14#include "StatefulEffect.h"
15#include "ShuttleAutomation.h"
16#include <wx/weakref.h>
17
18class wxTextCtrl;
19class ShuttleGui;
20
21class wxStaticText;
22
23class EffectRepeat final : public StatefulEffect
24{
25public:
26 static inline EffectRepeat *
29
31 virtual ~EffectRepeat();
32
33 // ComponentInterface implementation
34
35 ComponentInterfaceSymbol GetSymbol() const override;
36 TranslatableString GetDescription() const override;
37 ManualPageID ManualPage() const override;
38
39 // EffectDefinitionInterface implementation
40
41 EffectType GetType() const override;
42
43 // Effect implementation
44
45 bool Process(EffectInstance &instance, EffectSettings &settings) override;
46 std::unique_ptr<EffectEditor> PopulateOrExchange(
47 ShuttleGui & S, EffectInstance &instance,
48 EffectSettingsAccess &access, const EffectOutputs *pOutputs) override;
49 bool TransferDataToWindow(const EffectSettings &settings) override;
51
52 bool NeedsDither() const override;
53
54private:
55 // EffectRepeat implementation
56
57 void OnRepeatTextChange(wxCommandEvent & evt);
58 void DisplayNewTime();
59
60 wxWeakRef<wxWindow> mUIParent{};
61
63
64 wxTextCtrl *mRepeatCount;
65 wxStaticText *mCurrentTime;
66 wxStaticText *mTotalTime;
67
68 const EffectParameterMethods& Parameters() const override;
69 DECLARE_EVENT_TABLE()
70
72 L"Count",1, 1, INT_MAX, 1 };
73};
74
75#endif
EffectType
#define S(N)
Definition: ToChars.cpp:64
static Settings & settings()
Definition: TrackInfo.cpp:69
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Performs effect computation.
Hold values to send to effect output meters.
Interface for manipulations of an Effect's settings.
An Effect that repeats audio several times over.
Definition: Repeat.h:24
ComponentInterfaceSymbol GetSymbol() const override
Definition: Repeat.cpp:67
wxStaticText * mTotalTime
Definition: Repeat.h:66
wxWeakRef< wxWindow > mUIParent
Definition: Repeat.h:60
int repeatCount
Definition: Repeat.h:62
bool NeedsDither() const override
Definition: Repeat.cpp:278
bool Process(EffectInstance &instance, EffectSettings &settings) override
Definition: Repeat.cpp:91
static const ComponentInterfaceSymbol Symbol
Definition: Repeat.h:28
const EffectParameterMethods & Parameters() const override
Definition: Repeat.cpp:38
wxTextCtrl * mRepeatCount
Definition: Repeat.h:64
std::unique_ptr< EffectEditor > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) override
Add controls to effect panel; always succeeds.
Definition: Repeat.cpp:193
virtual ~EffectRepeat()
Definition: Repeat.cpp:61
static EffectRepeat * FetchParameters(EffectRepeat &e, EffectSettings &)
Definition: Repeat.h:27
bool TransferDataToWindow(const EffectSettings &settings) override
Definition: Repeat.cpp:217
TranslatableString GetDescription() const override
Definition: Repeat.cpp:72
ManualPageID ManualPage() const override
Name of a page in the Audacity alpha manual, default is empty.
Definition: Repeat.cpp:77
EffectRepeat()
Definition: Repeat.cpp:55
void DisplayNewTime()
Definition: Repeat.cpp:242
void OnRepeatTextChange(wxCommandEvent &evt)
Definition: Repeat.cpp:273
static constexpr EffectParameter Count
Definition: Repeat.h:71
bool TransferDataFromWindow(EffectSettings &settings) override
Definition: Repeat.cpp:226
EffectType GetType() const override
Type determines how it behaves.
Definition: Repeat.cpp:84
wxStaticText * mCurrentTime
Definition: Repeat.h:65
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:630
Holds a msgid for the translation catalog; may also bind format arguments.
Externalized state of a plug-in.