Audacity  3.0.3
Public Member Functions | Public Attributes | List of all members
MenuTable::CommandItem Struct Referencefinal

#include <CommandManager.h>

Inheritance diagram for MenuTable::CommandItem:
[legend]
Collaboration diagram for MenuTable::CommandItem:
[legend]

Public Member Functions

 CommandItem (const CommandID &name_, const TranslatableString &label_in_, CommandFunctorPointer callback_, CommandFlag flags_, const CommandManager::Options &options_, CommandHandlerFinder finder_)
 
template<typename Handler >
 CommandItem (const CommandID &name_, const TranslatableString &label_in_, void(Handler::*pmf)(const CommandContext &), CommandFlag flags_, const CommandManager::Options &options_, CommandHandlerFinder finder=FinderScope::DefaultFinder())
 
 ~CommandItem () override
 
- Public Member Functions inherited from Registry::SingleItem
 ~SingleItem () override=0
 
 BaseItem (const Identifier &internalName)
 
- Public Member Functions inherited from Registry::BaseItem
 BaseItem (const Identifier &internalName)
 
virtual ~BaseItem ()
 

Public Attributes

const TranslatableString label_in
 
CommandHandlerFinder finder
 
CommandFunctorPointer callback
 
CommandFlag flags
 
CommandManager::Options options
 
- Public Attributes inherited from Registry::BaseItem
const Identifier name
 
OrderingHint orderingHint
 

Detailed Description

Definition at line 498 of file CommandManager.h.

Constructor & Destructor Documentation

◆ CommandItem() [1/2]

MenuTable::CommandItem::CommandItem ( const CommandID name_,
const TranslatableString label_in_,
CommandFunctorPointer  callback_,
CommandFlag  flags_,
const CommandManager::Options options_,
CommandHandlerFinder  finder_ 
)

Definition at line 208 of file Menus.cpp.

214 : SingleItem{ name_ }, label_in{ label_in_ }
215 , finder{ finder_ }, callback{ callback_ }
216 , flags{ flags_ }, options{ options_ }
217 {}

◆ CommandItem() [2/2]

template<typename Handler >
MenuTable::CommandItem::CommandItem ( 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 509 of file CommandManager.h.

515  : CommandItem(name_, label_in_,
516  static_cast<CommandFunctorPointer>(pmf),
517  flags_, options_, finder)
518  {}

◆ ~CommandItem()

MenuTable::CommandItem::~CommandItem ( )
override

Definition at line 218 of file Menus.cpp.

218 {}

Member Data Documentation

◆ callback

CommandFunctorPointer MenuTable::CommandItem::callback

Definition at line 524 of file CommandManager.h.

◆ finder

CommandHandlerFinder MenuTable::CommandItem::finder

Definition at line 523 of file CommandManager.h.

◆ flags

CommandFlag MenuTable::CommandItem::flags

Definition at line 525 of file CommandManager.h.

◆ label_in

const TranslatableString MenuTable::CommandItem::label_in

Definition at line 522 of file CommandManager.h.

◆ options

CommandManager::Options MenuTable::CommandItem::options

Definition at line 526 of file CommandManager.h.


The documentation for this struct was generated from the following files:
Registry::SingleItem
Definition: Registry.h:120
MenuTable::CommandItem::flags
CommandFlag flags
Definition: CommandManager.h:525
MenuTable::CommandItem::CommandItem
CommandItem(const CommandID &name_, const TranslatableString &label_in_, CommandFunctorPointer callback_, CommandFlag flags_, const CommandManager::Options &options_, CommandHandlerFinder finder_)
Definition: Menus.cpp:208
MenuTable::CommandItem::options
CommandManager::Options options
Definition: CommandManager.h:526
MenuTable::CommandItem::callback
CommandFunctorPointer callback
Definition: CommandManager.h:524
MenuTable::CommandItem::finder
CommandHandlerFinder finder
Definition: CommandManager.h:523
MenuTable::CommandItem::label_in
const TranslatableString label_in
Definition: CommandManager.h:522
CommandFunctorPointer
void(CommandHandlerObject::*)(const CommandContext &context) CommandFunctorPointer
Definition: CommandFunctors.h:38