86{
87 int res = wxID_APPLY;
89
91 parent,
factory, pInstance, access, forceModal);
92 }
93
94
95
97
98
99
100 if (!res || !mIsPrompt || mControls.size() == 0 || !pInstance)
101 return res;
102
103
104
105
107 effect.SetCommand(mInputCmd);
109
110
111
113 }};
114
115
116
117 auto newSettings = effect.MakeSettings();
118 auto pNewInstance = effect.MakeInstance();
119 auto newAccess = std::make_shared<SimpleEffectSettingsAccess>(newSettings);
120
121 if (IsBatchProcessing()) {
122 effect.SetBatchProcessing();
123
126 effect.LoadSettings(cp, newSettings);
127
128
129
130 res = effect.ShowHostInterface(effect,
131 parent,
factory, pNewInstance, *newAccess, forceModal);
132 if (res) {
134 effect.SaveSettings(newSettings, cp);
136 }
137 }
138 else {
140 return 0;
141
142 res = effect.ShowHostInterface(effect,
143 parent,
factory, pNewInstance, *newAccess,
false );
144 if (!res)
145 return 0;
146
147
150 nyquistSettings.proxySettings = std::move(newSettings);
151 nyquistSettings.proxyDebug = this->mDebug;
152 nyquistSettings.controls = move(effect.mControls);
153 return nullptr;
154 });
155 }
156 if (!pNewInstance)
157
158 pInstance.reset();
159 return res;
160}
#define NYQUIST_WORKER_ID
static Settings & settings()
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the SettingsVis...
bool GetParameters(wxString &parms)
bool SetParameters(const wxString &parms)
unsigned TestUIFlags(unsigned mask)
virtual int ShowHostInterface(EffectBase &plugin, wxWindow &parent, const EffectDialogFactory &factory, std::shared_ptr< EffectInstance > &pInstance, EffectSettingsAccess &access, bool forceModal=false)
void Yield()
Dispatch waiting events, including actions enqueued by CallAfter.
DynamicRangeProcessorSettings GetSettings(EffectSettingsAccess &access)
Externalized state of a plug-in.
"finally" as in The C++ Programming Language, 4th ed., p. 358 Useful for defining ad-hoc RAII actions...