| 1562 | using namespace MenuRegistry; |
| 1563 | |
| 1564 | AttachedToolBarMenuItem::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 | |
| 1584 | void AttachedToolBarMenuItem::OnShowToolBar( const CommandContext &context ) |
| 1585 | { |
nothing calls this directly
no test coverage detected