Audacity  3.0.3
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 587 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 675 of file CommandManager.h.

679  {},
680  CommandHandlerFinder finder = FinderScope::DefaultFinder())
681  {
682  return std::make_unique<CommandItem>(
683  name, label_in, pmf, flags, options, finder
684  );
685  }

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{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(), and anonymous_namespace{ViewMenus.cpp}::ViewMenu().

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 688 of file CommandManager.h.

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

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 639 of file CommandManager.h.

642  { return std::make_unique<ConditionalGroupItem>(
643  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 644 of file CommandManager.h.

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

◆ DestroyRegistry()

void MenuTable::DestroyRegistry ( )

Definition at line 271 of file Menus.cpp.

272 {
273  sRegistry().items.clear();
274 }

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 623 of file CommandManager.h.

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

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(), and anonymous_namespace{ViewMenus.cpp}::ViewMenu().

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 627 of file CommandManager.h.

629  { return std::make_unique<MenuItem>(
630  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 658 of file CommandManager.h.

660  { if ( title.empty() )
661  return Items( internalName, std::forward<Args>(args)... );
662  else
663  return std::make_unique<MenuItem>(
664  internalName, title, std::forward<Args>(args)... ); }

References Items(), and title.

Referenced by anonymous_namespace{PluginMenus.cpp}::AddEffectMenuItems().

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 665 of file CommandManager.h.

668  { if ( title.empty() )
669  return Items( internalName, std::move( items ) );
670  else
671  return std::make_unique<MenuItem>(
672  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 700 of file CommandManager.h.

702  { return std::make_unique<SpecialItem>( name, fn ); }

References fn, and name.

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

Here is the caller graph for this function:
fn
static const auto fn
Definition: WaveformView.cpp:1108
CommandHandlerFinder
std::function< CommandHandlerObject &(AudacityProject &) > CommandHandlerFinder
Definition: CommandFunctors.h:33
name
const TranslatableString name
Definition: Distortion.cpp:98
MenuTable::Items
std::unique_ptr< MenuItems > Items(const Identifier &internalName, Args &&... args)
Definition: CommandManager.h:600
title
static const auto title
Definition: NoUpdatesAvailableDialog.cpp:22
anonymous_namespace{Menus.cpp}::sRegistry
static Registry::GroupItem & sRegistry()
Definition: Menus.cpp:258
Registry::GroupItem::items
BaseItemPtrs items
Definition: Registry.h:141