Audacity 3.2.0
Classes | Typedefs | Functions
MenuTable Namespace Reference

Classes

struct  AttachedItem
 
struct  CommandGroupItem
 
struct  CommandItem
 
struct  ConditionalGroupItem
 
class  FinderScope
 
struct  MenuItem
 
struct  MenuPart
 
struct  MenuSection
 
struct  SpecialItem
 
struct  WholeMenu
 

Typedefs

using MenuItems = ConcreteGroupItem< true, ToolbarMenuVisitor >
 

Functions

template<typename... Args>
std::unique_ptr< MenuItemsItems (const Identifier &internalName, Args &&... args)
 
template<typename... Args>
std::unique_ptr< MenuPartSection (const Identifier &internalName, Args &&... args)
 
template<typename... Args>
std::unique_ptr< MenuItemMenu (const Identifier &internalName, const TranslatableString &title, Args &&... args)
 
std::unique_ptr< MenuItemMenu (const Identifier &internalName, const TranslatableString &title, BaseItemPtrs &&items)
 
template<typename... Args>
std::unique_ptr< ConditionalGroupItemConditionalItems (const Identifier &internalName, ConditionalGroupItem::Condition condition, Args &&... args)
 
std::unique_ptr< ConditionalGroupItemConditionalItems (const Identifier &internalName, ConditionalGroupItem::Condition condition, BaseItemPtrs &&items)
 
template<typename... Args>
BaseItemPtr MenuOrItems (const Identifier &internalName, const TranslatableString &title, Args &&... args)
 
BaseItemPtr MenuOrItems (const Identifier &internalName, const TranslatableString &title, BaseItemPtrs &&items)
 
template<typename Handler >
std::unique_ptr< CommandItemCommand (const CommandID &name, const TranslatableString &label_in, void(Handler::*pmf)(const CommandContext &), CommandFlag flags, const CommandManager::Options &options={}, CommandHandlerFinder finder=FinderScope::DefaultFinder())
 
template<typename Handler >
std::unique_ptr< CommandGroupItemCommandGroup (const Identifier &name, std::vector< ComponentInterfaceSymbol > items, void(Handler::*pmf)(const CommandContext &), CommandFlag flags, bool isEffect=false, CommandHandlerFinder finder=FinderScope::DefaultFinder())
 
std::unique_ptr< SpecialItemSpecial (const Identifier &name, const SpecialItem::Appender &fn)
 
void DestroyRegistry ()
 

Typedef Documentation

◆ MenuItems

Definition at line 588 of file CommandManager.h.

Function Documentation

◆ Command()

template<typename Handler >
std::unique_ptr< CommandItem > MenuTable::Command ( const CommandID name,
const TranslatableString label_in,
void(Handler::*)(const CommandContext &)  pmf,
CommandFlag  flags,
const CommandManager::Options options = {},
CommandHandlerFinder  finder = FinderScope::DefaultFinder() 
)
inline

Definition at line 676 of file CommandManager.h.

680 {},
681 CommandHandlerFinder finder = FinderScope::DefaultFinder())
682 {
683 return std::make_unique<CommandItem>(
684 name, label_in, pmf, flags, options, finder
685 );
686 }
std::function< CommandHandlerObject &(AudacityProject &) > CommandHandlerFinder
const TranslatableString name
Definition: Distortion.cpp:82

Referenced by anonymous_namespace{PluginMenus.cpp}::AddEffectMenuItemGroup(), anonymous_namespace{PluginMenus.cpp}::AnalyzeMenu(), ScreenshotCommand::CapturePreferences(), anonymous_namespace{ClipMenus.cpp}::ClipCursorItems(), anonymous_namespace{ClipMenus.cpp}::ClipSelectMenu(), anonymous_namespace{SelectMenus.cpp}::CursorMenu(), BuiltinCommandsModule::DiscoverPluginsAtPath(), anonymous_namespace{EditMenus.cpp}::EditMenu(), anonymous_namespace{PluginMenus.cpp}::EffectMenu(), anonymous_namespace{SelectMenus.cpp}::ExtraCursorMenu(), anonymous_namespace{ExtraMenus.cpp}::ExtraDeviceMenu(), anonymous_namespace{EditMenus.cpp}::ExtraEditMenu(), anonymous_namespace{NavigationMenus.cpp}::ExtraFocusMenu(), anonymous_namespace{NavigationMenus.cpp}::ExtraGlobalCommands(), anonymous_namespace{ExtraMenus.cpp}::ExtraMiscItems(), anonymous_namespace{ExtraMenus.cpp}::ExtraMixerMenu(), anonymous_namespace{TransportMenus.cpp}::ExtraPlayAtSpeedMenu(), anonymous_namespace{PluginMenus.cpp}::ExtraScriptablesIIMenu(), anonymous_namespace{PluginMenus.cpp}::ExtraScriptablesIMenu(), anonymous_namespace{SelectMenus.cpp}::ExtraSeekMenu(), anonymous_namespace{TransportMenus.cpp}::ExtraSelectionItems(), anonymous_namespace{SelectMenus.cpp}::ExtraSelectionMenu(), anonymous_namespace{ClipMenus.cpp}::ExtraTimeShiftItems(), ToolActions::ExtraToolsMenu(), anonymous_namespace{TrackMenus.cpp}::ExtraTrackMenu(), anonymous_namespace{TransportMenus.cpp}::ExtraTransportMenu(), anonymous_namespace{WindowMenus.cpp}::ExtraWindowItems(), anonymous_namespace{FileMenus.cpp}::FileMenu(), anonymous_namespace{PluginMenus.cpp}::GenerateMenu(), anonymous_namespace{HelpMenus.cpp}::HelpMenu(), anonymous_namespace{FileMenus.cpp}::HiddenFileMenu(), anonymous_namespace{LabelMenus.cpp}::LabelEditMenus(), TrackMenuTable::OnSetName(), anonymous_namespace{PluginMenus.cpp}::PopulateMacrosMenu(), DEFINE_VERSION_CHECK::RegisterMenuItems(), anonymous_namespace{NyqBench.cpp}::RegisterMenuItems(), anonymous_namespace{SelectMenus.cpp}::SelectMenu(), MacroCommandDialog::SetCommandAndParams(), WaveTrackAffordanceControls::StartEditClipName(), anonymous_namespace{ToolbarMenus.cpp}::ToolbarsMenu(), anonymous_namespace{PluginMenus.cpp}::ToolsMenu(), anonymous_namespace{TrackMenus.cpp}::TracksMenu(), anonymous_namespace{TransportMenus.cpp}::TransportMenu(), anonymous_namespace{ViewMenus.cpp}::ViewMenu(), and anonymous_namespace{WindowMenus.cpp}::WindowMenu().

Here is the caller graph for this function:

◆ CommandGroup()

template<typename Handler >
std::unique_ptr< CommandGroupItem > MenuTable::CommandGroup ( const Identifier name,
std::vector< ComponentInterfaceSymbol items,
void(Handler::*)(const CommandContext &)  pmf,
CommandFlag  flags,
bool  isEffect = false,
CommandHandlerFinder  finder = FinderScope::DefaultFinder() 
)
inline

Definition at line 689 of file CommandManager.h.

695 {
696 return std::make_unique<CommandGroupItem>(
697 name, std::move(items), pmf, flags, isEffect, finder
698 );
699 }

References name.

Referenced by anonymous_namespace{TrackMenus.cpp}::TracksMenu().

Here is the caller graph for this function:

◆ ConditionalItems() [1/2]

template<typename... Args>
std::unique_ptr< ConditionalGroupItem > MenuTable::ConditionalItems ( const Identifier internalName,
ConditionalGroupItem::Condition  condition,
Args &&...  args 
)
inline

Definition at line 640 of file CommandManager.h.

643 { return std::make_unique<ConditionalGroupItem>(
644 internalName, condition, std::forward<Args>(args)... ); }

Referenced by anonymous_namespace{ExtraMenus.cpp}::ExtraMenu(), and anonymous_namespace{FileMenus.cpp}::HiddenFileMenu().

Here is the caller graph for this function:

◆ ConditionalItems() [2/2]

std::unique_ptr< ConditionalGroupItem > MenuTable::ConditionalItems ( const Identifier internalName,
ConditionalGroupItem::Condition  condition,
BaseItemPtrs &&  items 
)
inline

Definition at line 645 of file CommandManager.h.

648 { return std::make_unique<ConditionalGroupItem>(
649 internalName, condition, std::move( items ) ); }

◆ DestroyRegistry()

void MenuTable::DestroyRegistry ( )

Definition at line 267 of file Menus.cpp.

268{
269 sRegistry().items.clear();
270}
static Registry::GroupItem & sRegistry()
Definition: Menus.cpp:254
BaseItemPtrs items
Definition: Registry.h:141

References Registry::GroupItem::items, and anonymous_namespace{Menus.cpp}::sRegistry().

Referenced by AudacityApp::OnExit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Items()

template<typename... Args>
std::unique_ptr< MenuItems > MenuTable::Items ( const Identifier internalName,
Args &&...  args 
)
inline

◆ Menu() [1/2]

template<typename... Args>
std::unique_ptr< MenuItem > MenuTable::Menu ( const Identifier internalName,
const TranslatableString title,
Args &&...  args 
)
inline

Definition at line 624 of file CommandManager.h.

626 { return std::make_unique<MenuItem>(
627 internalName, title, std::forward<Args>(args)... ); }
static const auto title

References title.

Referenced by anonymous_namespace{PluginMenus.cpp}::AddEffectMenuItemGroup(), anonymous_namespace{PluginMenus.cpp}::AnalyzeMenu(), anonymous_namespace{ClipMenus.cpp}::ClipSelectMenu(), anonymous_namespace{SelectMenus.cpp}::CursorMenu(), anonymous_namespace{EditMenus.cpp}::EditMenu(), anonymous_namespace{PluginMenus.cpp}::EffectMenu(), anonymous_namespace{SelectMenus.cpp}::ExtraCursorMenu(), anonymous_namespace{ExtraMenus.cpp}::ExtraDeviceMenu(), anonymous_namespace{EditMenus.cpp}::ExtraEditMenu(), anonymous_namespace{NavigationMenus.cpp}::ExtraFocusMenu(), anonymous_namespace{ExtraMenus.cpp}::ExtraMenu(), anonymous_namespace{ExtraMenus.cpp}::ExtraMixerMenu(), anonymous_namespace{TransportMenus.cpp}::ExtraPlayAtSpeedMenu(), anonymous_namespace{PluginMenus.cpp}::ExtraScriptablesIIMenu(), anonymous_namespace{PluginMenus.cpp}::ExtraScriptablesIMenu(), anonymous_namespace{SelectMenus.cpp}::ExtraSeekMenu(), anonymous_namespace{SelectMenus.cpp}::ExtraSelectionMenu(), ToolActions::ExtraToolsMenu(), anonymous_namespace{TrackMenus.cpp}::ExtraTrackMenu(), anonymous_namespace{TransportMenus.cpp}::ExtraTransportMenu(), anonymous_namespace{FileMenus.cpp}::FileMenu(), anonymous_namespace{PluginMenus.cpp}::GenerateMenu(), anonymous_namespace{HelpMenus.cpp}::HelpMenu(), anonymous_namespace{FileMenus.cpp}::HiddenFileMenu(), anonymous_namespace{LabelMenus.cpp}::LabelEditMenus(), KeyConfigPrefs::OnDefaults(), anonymous_namespace{SelectMenus.cpp}::SelectMenu(), anonymous_namespace{ToolbarMenus.cpp}::ToolbarsMenu(), anonymous_namespace{PluginMenus.cpp}::ToolsMenu(), anonymous_namespace{TrackMenus.cpp}::TracksMenu(), anonymous_namespace{TransportMenus.cpp}::TransportMenu(), anonymous_namespace{ViewMenus.cpp}::ViewMenu(), and anonymous_namespace{WindowMenus.cpp}::WindowMenu().

Here is the caller graph for this function:

◆ Menu() [2/2]

std::unique_ptr< MenuItem > MenuTable::Menu ( const Identifier internalName,
const TranslatableString title,
BaseItemPtrs &&  items 
)
inline

Definition at line 628 of file CommandManager.h.

630 { return std::make_unique<MenuItem>(
631 internalName, title, std::move( items ) ); }

References title.

◆ MenuOrItems() [1/2]

template<typename... Args>
BaseItemPtr MenuTable::MenuOrItems ( const Identifier internalName,
const TranslatableString title,
Args &&...  args 
)
inline

Definition at line 659 of file CommandManager.h.

661 { if ( title.empty() )
662 return Items( internalName, std::forward<Args>(args)... );
663 else
664 return std::make_unique<MenuItem>(
665 internalName, title, std::forward<Args>(args)... ); }
std::unique_ptr< MenuItems > Items(const Identifier &internalName, Args &&... args)

References Items(), and title.

Referenced by anonymous_namespace{PluginMenus.cpp}::AddGroupedEffectMenuItems(), and anonymous_namespace{PluginMenus.cpp}::MakeAddGroupItems().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MenuOrItems() [2/2]

BaseItemPtr MenuTable::MenuOrItems ( const Identifier internalName,
const TranslatableString title,
BaseItemPtrs &&  items 
)
inline

Definition at line 666 of file CommandManager.h.

669 { if ( title.empty() )
670 return Items( internalName, std::move( items ) );
671 else
672 return std::make_unique<MenuItem>(
673 internalName, title, std::move( items ) ); }

References Items(), and title.

Here is the call graph for this function:

◆ Section()

template<typename... Args>
std::unique_ptr< MenuPart > MenuTable::Section ( const Identifier internalName,
Args &&...  args 
)
inline

◆ Special()

std::unique_ptr< SpecialItem > MenuTable::Special ( const Identifier name,
const SpecialItem::Appender fn 
)
inline

Definition at line 701 of file CommandManager.h.

703 { return std::make_unique<SpecialItem>( name, fn ); }
static const auto fn

References fn, and name.

Referenced by anonymous_namespace{EditMenus.cpp}::EditMenu(), anonymous_namespace{FileMenus.cpp}::FileMenu(), and anonymous_namespace{WindowMenus.cpp}::WindowMenu().

Here is the caller graph for this function: