Audacity  3.2.0
Public Types | Public Member Functions | Public Attributes | List of all members
PopupMenuTableEntry Struct Reference

#include <PopupMenuTable.h>

Inheritance diagram for PopupMenuTableEntry:
[legend]
Collaboration diagram for PopupMenuTableEntry:
[legend]

Public Types

enum  Type { Item, RadioItem, CheckItem }
 
using InitFunction = std::function< void(PopupMenuHandler &handler, wxMenu &menu, int id) >
 

Public Member Functions

 PopupMenuTableEntry (const Identifier &stringId, Type type_, int id_, const TranslatableString &caption_, wxCommandEventFunction func_, PopupMenuHandler &handler_, InitFunction init_={})
 
 ~PopupMenuTableEntry () 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

Type type
 
int id
 
TranslatableString caption
 
wxCommandEventFunction func
 
PopupMenuHandlerhandler
 
InitFunction init
 
- Public Attributes inherited from Registry::BaseItem
const Identifier name
 
OrderingHint orderingHint
 

Detailed Description

Definition at line 34 of file PopupMenuTable.h.

Member Typedef Documentation

◆ InitFunction

using PopupMenuTableEntry::InitFunction = std::function< void( PopupMenuHandler &handler, wxMenu &menu, int id ) >

Definition at line 37 of file PopupMenuTable.h.

Member Enumeration Documentation

◆ Type

Enumerator
Item 
RadioItem 
CheckItem 

Definition at line 36 of file PopupMenuTable.h.

Constructor & Destructor Documentation

◆ PopupMenuTableEntry()

PopupMenuTableEntry::PopupMenuTableEntry ( const Identifier stringId,
Type  type_,
int  id_,
const TranslatableString caption_,
wxCommandEventFunction  func_,
PopupMenuHandler handler_,
InitFunction  init_ = {} 
)
inline
Precondition
func is not null

Definition at line 48 of file PopupMenuTable.h.

51  {} )
52  : SingleItem{ stringId }
53  , type(type_)
54  , id(id_)
55  , caption(caption_)
56  , func(func_)
57  , handler( handler_ )
58  , init( init_ )
59  {
60  wxASSERT(func);
61  }

◆ ~PopupMenuTableEntry()

PopupMenuTableEntry::~PopupMenuTableEntry ( )
override

Definition at line 16 of file PopupMenuTable.cpp.

17 {}

Member Data Documentation

◆ caption

TranslatableString PopupMenuTableEntry::caption

Definition at line 42 of file PopupMenuTable.h.

◆ func

wxCommandEventFunction PopupMenuTableEntry::func

Definition at line 43 of file PopupMenuTable.h.

◆ handler

PopupMenuHandler& PopupMenuTableEntry::handler

Definition at line 44 of file PopupMenuTable.h.

◆ id

int PopupMenuTableEntry::id

Definition at line 41 of file PopupMenuTable.h.

◆ init

InitFunction PopupMenuTableEntry::init

Definition at line 45 of file PopupMenuTable.h.

◆ type

Type PopupMenuTableEntry::type

Definition at line 40 of file PopupMenuTable.h.


The documentation for this struct was generated from the following files:
Registry::SingleItem
Definition: Registry.h:120
PopupMenuTableEntry::init
InitFunction init
Definition: PopupMenuTable.h:45
PopupMenuTableEntry::caption
TranslatableString caption
Definition: PopupMenuTable.h:42
PopupMenuTableEntry::Item
@ Item
Definition: PopupMenuTable.h:36
PopupMenuTableEntry::RadioItem
@ RadioItem
Definition: PopupMenuTable.h:36
PopupMenuTableEntry::func
wxCommandEventFunction func
Definition: PopupMenuTable.h:43
PopupMenuTableEntry::CheckItem
@ CheckItem
Definition: PopupMenuTable.h:36
PopupMenuTableEntry::type
Type type
Definition: PopupMenuTable.h:40
PopupMenuTableEntry::handler
PopupMenuHandler & handler
Definition: PopupMenuTable.h:44
PopupMenuTableEntry::id
int id
Definition: PopupMenuTable.h:41