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

Method PopulateUI

src/effects/VST/VSTEffect.cpp:97–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97std::unique_ptr<EffectEditor> VSTEffect::PopulateUI(const EffectPlugin &,
98 ShuttleGui &S, EffectInstance& instance, EffectSettingsAccess &access,
99 const EffectOutputs *) const
100{
101 auto parent = S.GetParent();
102
103 // Determine whether fancy UI is available
104 bool gui = mGui;
105
106 // Then use fancy UI only if preferences say so
107 if (gui)
108 GetConfig(*this, PluginSettings::Shared, wxT("Options"),
109 wxT("UseGUI"),
110 gui,
111 true);
112
113 auto pParent = S.GetParent();
114
115 auto& vst2Instance = dynamic_cast<VSTInstance&>(instance);
116
117 auto editor = std::make_unique<VSTEditor>(
118 vst2Instance, GetType(), gui, *this, access, pParent, mAEffect->numParams);
119
120 // Also let the instance know about the validator, so it can forward
121 // to it calls coming from the vst callback
122 vst2Instance.SetOwningValidator(editor.get());
123
124
125 // Build the appropriate dialog type
126 if (gui)
127 {
128 editor->BuildFancy(instance);
129 }
130 else
131 {
132 editor->BuildPlain(access, GetType(), mProjectRate);
133 }
134
135
136 return editor;
137}
138
139std::unique_ptr<EffectEditor> VSTEffect::MakeEditor(
140 ShuttleGui &, EffectInstance &, EffectSettingsAccess &,

Callers 2

EffectUI.cppFile · 0.45
ExportOptionsHandlerMethod · 0.45

Calls 6

GetConfigFunction · 0.85
SetOwningValidatorMethod · 0.80
BuildFancyMethod · 0.80
GetParentMethod · 0.45
getMethod · 0.45
BuildPlainMethod · 0.45

Tested by

no test coverage detected