25#include "../CommonCommandFlags.h"
36{
XO(
"Set Envelope") };
47 S.OptionalY(
bHasT ).Define(
mT,
wxT(
"Time"), 0.0, 0.0, 100000.0);
48 S.OptionalY(
bHasV ).Define(
mV,
wxT(
"Value"), 1.0, 0.0, 2.0);
54 {
return VisitSettings<false>(
S); }
57 {
return VisitSettings<true>(
S); }
63 S.StartMultiColumn(3, wxALIGN_CENTER);
65 S.Optional(
bHasT ).TieNumericTextBox(
XXO(
"Time:"),
mT );
66 S.Optional(
bHasV ).TieNumericTextBox(
XXO(
"Value:"),
mV );
81 (pClip->GetPlayStartTime() <= mT) &&
82 (pClip->GetPlayEndTime() >= mT)
86 auto &env = pClip->GetEnvelope();
87 bool didSomething = false;
88 if (bHasDelete && mbDelete)
89 env.Clear(), didSomething = true;
91 env.InsertOrReplace(mT, env.ClampValue(mV)),
97 ProjectHistory::Get(context.project).PushState(
98 XO(
"Edited Envelope"), XO(
"Envelope"),
99 UndoPush::CONSOLIDATE);
120 wxT(
"Optional/Extra/Part2/Scriptables1")
AttachedItem sAttachment1
const ReservedCommandFlag & AudioIONotBusyFlag()
XXO("&Cut/Copy/Paste Toolbar")
Declarations of SetEnvelopeCommand class.
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Generates classes whose instances register items at construction.
bool ApplyInner(const CommandContext &context, Track &t) override
static const ComponentInterfaceSymbol Symbol
void PopulateOrExchange(ShuttleGui &S) override
bool VisitSettings(SettingsVisitorBase< Const > &S)
Visitor of effect or command parameters. This is a base class with lots of virtual functions that do ...
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Abstract base class for an object holding data associated with points on a time axis.
R TypeSwitch(const Functions &...functions)
A Track that contains audio waveform data.
IntervalHolders SortedIntervalArray()
Return all WaveClips sorted by clip play start time.
AUDACITY_DLL_API void OnAudacityCommand(const CommandContext &ctx)
BuiltinCommandsModule::Registration< SetEnvelopeCommand > reg