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

Function FindDescendants

src/widgets/BasicMenu.cpp:37–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35bool sHandledEvent = false;
36
37Menus FindDescendants( wxMenu &menu )
38{
39 Menus result{ &menu };
40 // We can discover them breadth-first
41 for ( size_t ii = 0; ii < result.size(); ++ii ) {
42 if ( auto pMenu = result[ii] ) {
43 for ( const auto &pItem : pMenu->GetMenuItems() ) {
44 if ( const auto pSubMenu = pItem->GetSubMenu() )
45 result.push_back( pSubMenu );
46 }
47 }
48 }
49 return result;
50}
51
52inline bool ContainsMenu( const Menus &menus, void *pObj )
53{

Callers 1

PopupMethod · 0.85

Calls 3

sizeMethod · 0.45
GetMenuItemsMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected