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

Method UpdateEffectMenuItems

src/RealtimeEffectPanel.cpp:209–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207 }
208
209 void UpdateEffectMenuItems()
210 {
211 using namespace MenuRegistry;
212 auto root = std::shared_ptr{ Menu("", TranslatableString{}) };
213
214 static auto realtimeEffectPredicate = [](const PluginDescriptor& desc)
215 {
216 return desc.IsEffectRealtime();
217 };
218
219 const auto groupby = RealtimeEffectsGroupBy.Read();
220
221 auto analyzeSection = Section("", Menu("", XO("Analyze")));
222 auto submenu =
223 static_cast<MenuItem*>(analyzeSection->begin()->get());
224 MenuHelper::PopulateEffectsMenu(
225 *submenu,
226 EffectTypeAnalyze,
227 {}, groupby, nullptr,
228 realtimeEffectPredicate
229 );
230
231 if(!submenu->empty())
232 {
233 root->push_back(move(analyzeSection));
234 }
235
236 MenuHelper::PopulateEffectsMenu(
237 *root,
238 EffectTypeProcess,
239 {}, groupby, nullptr,
240 realtimeEffectPredicate
241 );
242
243 mCachedMenu.swap(root);
244 }
245 };
246
247 const PluginDescriptor *GetPlugin(const PluginID &ID) {

Callers

nothing calls this directly

Calls 9

SectionClass · 0.85
moveFunction · 0.85
IsEffectRealtimeMethod · 0.80
ReadMethod · 0.45
getMethod · 0.45
beginMethod · 0.45
emptyMethod · 0.45
push_backMethod · 0.45
swapMethod · 0.45

Tested by

no test coverage detected