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

Method VisitEntry

src/MenuCreator.cpp:332–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332void MenuItemVisitor::VisitEntry(CommandManager::CommandListEntry &entry,
333 const MenuRegistry::Options *pOptions)
334{
335 if (!pOptions)
336 // command list item
337 CurrentMenu()->Append(entry.id, entry.FormatLabelForMenu());
338 else if (pOptions->global)
339 ;
340 else {
341 auto ID = entry.id;
342 auto label = FormatLabelWithDisabledAccel(entry);
343 auto &checker = pOptions->checker;
344 if (checker) {
345 CurrentMenu()->AppendCheckItem(ID, label);
346 CurrentMenu()->Check(ID, checker(mProject));
347 }
348 else
349 CurrentMenu()->Append(ID, label);
350 }
351}
352
353MenuItemVisitor::~MenuItemVisitor() = default;
354

Callers

nothing calls this directly

Calls 4

FormatLabelForMenuMethod · 0.80
AppendMethod · 0.45
CheckMethod · 0.45

Tested by

no test coverage detected