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

Method AttachedToolBarMenuItem

src/toolbars/ToolManager.cpp:1564–1582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1562using namespace MenuRegistry;
1563
1564AttachedToolBarMenuItem::AttachedToolBarMenuItem(
1565 Identifier id, const CommandID &name, const TranslatableString &label_in,
1566 const Registry::OrderingHint &hint,
1567 std::vector< Identifier > excludeIDs
1568) : mId{ id }
1569 , mAttachedItem{
1570 ( MenuRegistry::FinderScope(
1571 [this](AudacityProject &) -> CommandHandlerObject&
1572 { return *this; } ),
1573 MenuRegistry::Command( name, label_in,
1574 &AttachedToolBarMenuItem::OnShowToolBar,
1575 AlwaysEnabledFlag,
1576 Options{}.CheckTest( [id](AudacityProject &project){
1577 auto &toolManager = ToolManager::Get( project );
1578 return toolManager.IsVisible( id ); } ) ) ),
1579 Registry::Placement{ wxT("View/Other/Toolbars/Toolbars/Other"), hint }
1580 }
1581 , mExcludeIds{ std::move( excludeIDs ) }
1582{}
1583
1584void AttachedToolBarMenuItem::OnShowToolBar( const CommandContext &context )
1585{

Callers

nothing calls this directly

Calls 4

FinderScopeFunction · 0.85
GetFunction · 0.85
moveFunction · 0.85
IsVisibleMethod · 0.45

Tested by

no test coverage detected