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
 
- Public Member Functions inherited from Registry::detail::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::detail::BaseItem
const Identifier name
 
OrderingHint orderingHint
 

Detailed Description

Definition at line 43 of file PopupMenuTable.h.

Member Typedef Documentation

◆ InitFunction

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

Definition at line 46 of file PopupMenuTable.h.

Member Enumeration Documentation

◆ Type

Enumerator
Item 
RadioItem 
CheckItem 

Definition at line 45 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 57 of file PopupMenuTable.h.

60 {} )
61 : SingleItem{ stringId }
62 , type(type_)
63 , id(id_)
64 , caption(caption_)
65 , func(func_)
66 , handler( handler_ )
67 , init( init_ )
68 {
69 wxASSERT(func);
70 }
PopupMenuHandler & handler
Type type
InitFunction init
wxCommandEventFunction func
int id
TranslatableString caption

◆ ~PopupMenuTableEntry()

PopupMenuTableEntry::~PopupMenuTableEntry ( )
override

Definition at line 16 of file PopupMenuTable.cpp.

17{}

Member Data Documentation

◆ caption

TranslatableString PopupMenuTableEntry::caption

Definition at line 51 of file PopupMenuTable.h.

◆ func

wxCommandEventFunction PopupMenuTableEntry::func

Definition at line 52 of file PopupMenuTable.h.

◆ handler

PopupMenuHandler& PopupMenuTableEntry::handler

Definition at line 53 of file PopupMenuTable.h.

◆ id

int PopupMenuTableEntry::id

Definition at line 50 of file PopupMenuTable.h.

◆ init

InitFunction PopupMenuTableEntry::init

Definition at line 54 of file PopupMenuTable.h.

◆ type

Type PopupMenuTableEntry::type

Definition at line 49 of file PopupMenuTable.h.


The documentation for this struct was generated from the following files: