11#ifndef __AUDACITY_EFFECT_NYQUIST__
12#define __AUDACITY_EFFECT_NYQUIST__
14#include "../StatefulEffect.h"
28#define NYQUISTEFFECTS_VERSION wxT("1.0.0.0")
92 wxString GetVersion()
const override;
101 EffectType GetClassification()
const override;
103 bool IsInteractive()
const override;
104 bool IsDefault()
const override;
105 bool EnablesDebug()
const override;
123 bool Init()
override;
125 int ShowHostInterface(
EffectBase &plugin, wxWindow &parent,
128 bool forceModal =
false)
override;
129 std::unique_ptr<EffectEditor> PopulateOrExchange(
137 void RedirectOutput();
138 void SetCommand(
const wxString &cmd);
144 wxWeakRef<wxWindow> mUIParent{};
155 bool TransferDataToPromptWindow();
156 bool TransferDataToEffectWindow();
158 bool TransferDataFromPromptWindow();
159 bool TransferDataFromEffectWindow();
166 static wxString NyquistToWxString(
const char *nyqString);
167 wxString EscapeString(
const wxString & inStr);
168 static std::vector<EnumValueSymbol> ParseChoice(
const wxString & text);
174 static void StaticOutputCallback(
int c,
void *userdata);
175 static void StaticOSCallback(
void *userdata);
177 void OutputCallback(
int c);
181 bool ParseCommand(
const wxString & cmd);
182 bool ParseProgram(wxInputStream & stream);
191 const wxString &line,
bool eof,
192 size_t trimStart,
size_t trimEnd);
194 bool Parse(
Tokenizer &tokenizer,
const wxString &line,
bool eof,
bool first);
197 wxString *pExtraString =
nullptr);
198 static wxString UnQuote(
const wxString &s,
bool allowParens =
true,
199 wxString *pExtraString =
nullptr);
200 static double GetCtrlValue(
const wxString &s);
202 void OnLoad(wxCommandEvent & evt);
203 void OnSave(wxCommandEvent & evt);
206 void OnText(wxCommandEvent & evt);
207 void OnSlider(wxCommandEvent & evt);
208 void OnChoice(wxCommandEvent & evt);
209 void OnTime(wxCommandEvent & evt);
210 void OnFileButton(wxCommandEvent & evt);
213 bool validatePath(wxString path);
214 wxString ToTimeFormat(
double t);
216 std::pair<bool, FilePath> CheckHelpPage()
const;
292 DECLARE_EVENT_TABLE()
306 void OnOk(wxCommandEvent & event);
309 DECLARE_EVENT_TABLE()
std::function< DialogFactoryResults(wxWindow &parent, EffectBase &, EffectUIServices &, EffectSettingsAccess &) > EffectDialogFactory
Type of function that creates a dialog for an effect.
wxString FileExtension
File extension, not including any leading dot.
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
@ Continue
Save was not handled by the extension.
static Settings & settings()
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the SettingsVis...
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Base class for many of the effects in Audacity.
Performs effect computation.
Use this object to copy the input tracks to tentative outputTracks.
Hold values to send to effect output meters.
std::vector< FileType > FileTypes
A control on a NyquistDialog.
NyqControl & operator=(const NyqControl &)=default
NyqControl(const NyqControl &)=default
std::vector< EnumValueSymbol > choices
FileNames::FileTypes fileTypes
An Effect that calls up a Nyquist (XLISP) plug-in, i.e. many possible effects from this one class.
wxTextCtrl * mCommandText
TranslatableString mDebugOutput
TranslatableString mCopyright
TranslatableString mPromptName
const TranslatableString & InitializationError() const
wxDateTime mFileModified
When the script was last modified on disk.
TranslatableString mAuthor
unsigned mNumSelectedChannels
wxFileName mFileName
Name of the Nyquist script file this effect is loaded from.
TranslatableString mName
Name of the Effect (untranslated)
NyquistEffect(const wxString &fName)
TranslatableString mAction
std::vector< NyqControl > mControls
wxArrayString mCategories
TranslatableString mReleaseVersion
void OnDebug(wxCommandEvent &evt)
TranslatableString mInitError
Dialog used with NyquistEffect.
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.
Holds a msgid for the translation catalog; may also bind format arguments.
Positions or offsets within audio files need a wide type.
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
ProjectFileIOExtensionRegistry::Extension extension
Externalized state of a plug-in.
std::vector< NyqControl > controls
EffectSettings proxySettings