11#ifndef __AUDACITY_EFFECT_NYQUIST__
12#define __AUDACITY_EFFECT_NYQUIST__
15#include "../StatefulEffectUIServices.h"
29#define NYQUISTEFFECTS_VERSION wxT("1.0.0.0")
94 wxString GetVersion()
const override;
103 EffectType GetClassification()
const override;
105 bool IsInteractive()
const override;
106 bool IsDefault()
const override;
107 bool EnablesDebug()
const override;
125 bool Init()
override;
130 bool forceModal =
false)
override;
139 void RedirectOutput();
140 void SetCommand(
const wxString &cmd);
146 wxWeakRef<wxWindow> mUIParent{};
157 bool TransferDataToPromptWindow();
158 bool TransferDataToEffectWindow();
160 bool TransferDataFromPromptWindow();
161 bool TransferDataFromEffectWindow();
168 static wxString NyquistToWxString(
const char *nyqString);
169 wxString EscapeString(
const wxString & inStr);
170 static std::vector<EnumValueSymbol> ParseChoice(
const wxString & text);
176 static void StaticOutputCallback(
int c,
void *userdata);
177 static void StaticOSCallback(
void *userdata);
179 void OutputCallback(
int c);
183 bool ParseCommand(
const wxString & cmd);
184 bool ParseProgram(wxInputStream & stream);
193 const wxString &line,
bool eof,
194 size_t trimStart,
size_t trimEnd);
196 bool Parse(
Tokenizer &tokenizer,
const wxString &line,
bool eof,
bool first);
199 wxString *pExtraString =
nullptr);
200 static wxString UnQuote(
const wxString &s,
bool allowParens =
true,
201 wxString *pExtraString =
nullptr);
202 static double GetCtrlValue(
const wxString &s);
204 void OnLoad(wxCommandEvent & evt);
205 void OnSave(wxCommandEvent & evt);
208 void OnText(wxCommandEvent & evt);
209 void OnSlider(wxCommandEvent & evt);
210 void OnChoice(wxCommandEvent & evt);
211 void OnTime(wxCommandEvent & evt);
212 void OnFileButton(wxCommandEvent & evt);
215 bool validatePath(wxString path);
216 wxString ToTimeFormat(
double t);
218 std::pair<bool, FilePath> CheckHelpPage()
const;
294 DECLARE_EVENT_TABLE()
308 void OnOk(wxCommandEvent & event);
311 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.
virtual int ShowHostInterface(EffectBase &plugin, wxWindow &parent, const EffectDialogFactory &factory, std::shared_ptr< EffectInstance > &pInstance, EffectSettingsAccess &access, bool forceModal=false)
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.
virtual bool TransferDataToWindow(const EffectSettings &settings)
virtual std::unique_ptr< EffectEditor > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs)
Add controls to effect panel; always succeeds.
virtual bool TransferDataFromWindow(EffectSettings &settings)
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