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

Method DoBeginGroup

libraries/lib-menus/CommandManager.cpp:249–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249void CommandManager::Populator::DoBeginGroup(
250 const MenuRegistry::GroupItem<MenuRegistry::Traits> &item)
251{
252 using namespace MenuRegistry;
253 auto pItem = &item;
254 if (const auto pMenu = dynamic_cast<const MenuItem*>( pItem )) {
255 const auto &title = pMenu->GetTitle();
256 mMenuNames.emplace_back(title);
257 BeginMenu(title);
258 }
259 else if (const auto pConditionalGroup =
260 dynamic_cast<const ConditionalGroupItem*>( pItem )
261 ) {
262 const auto flag = (*pConditionalGroup)();
263 if (!flag) {
264 bMakingOccultCommands = true;
265 BeginOccultCommands();
266 }
267 // to avoid repeated call of condition predicate in EndGroup():
268 mFlags.push_back(flag);
269 }
270 else
271 assert(IsSection(item));
272}
273
274void CommandManager::Populator::DoVisit(const Registry::SingleItem &item)
275{

Callers

nothing calls this directly

Calls 3

IsSectionFunction · 0.85
GetTitleMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected