MCPcopy Create free account
hub / github.com/audacity/audacity / BuildFancy

Method BuildFancy

src/effects/VST/VSTEditor.cpp:242–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242void VSTEditor::BuildFancy(EffectInstance& instance)
243{
244 auto& vstEffInstance = dynamic_cast<VSTInstance&>(instance);
245
246 // Turn the power on...some effects need this when the editor is open
247 vstEffInstance.PowerOn();
248
249 auto control = Destroy_ptr<VSTControl>{ safenew VSTControl };
250 if (!control)
251 {
252 return;
253 }
254
255 if (!control->Create(mParent, &vstEffInstance))
256 {
257 return;
258 }
259
260 {
261 auto mainSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
262
263 mainSizer->Add((mControl = control.release()), 0, wxALIGN_CENTER);
264
265 mParent->SetMinSize(wxDefaultSize);
266 mParent->SetSizer(mainSizer.release());
267 }
268
269 NeedEditIdle(true);
270
271 mDialog->Bind(wxEVT_SIZE, OnSize);
272
273
274 BindTo(*mDialog, EVT_SIZEWINDOW, &VSTEditor::OnSizeWindow);
275
276#ifdef __WXMAC__
277#ifdef __WX_EVTLOOP_BUSY_WAITING__
278 wxEventLoop::SetBusyWaiting(true);
279#endif
280#endif
281
282 return;
283}
284
285void VSTEditor::BuildPlain(EffectSettingsAccess &access, EffectType effectType, double projectRate)
286{

Callers 2

PopulateUIMethod · 0.80
PopulateUIMethod · 0.80

Calls 6

BindToFunction · 0.85
PowerOnMethod · 0.80
BindMethod · 0.80
CreateMethod · 0.45
AddMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected