Definition at line 48 of file PopupMenuTable.cpp.
◆ PopupMenuBuilder()
anonymous_namespace{PopupMenuTable.cpp}::PopupMenuBuilder::PopupMenuBuilder |
( |
PopupMenuTable & |
table, |
|
|
PopupMenuImpl & |
menu, |
|
|
void * |
pUserData |
|
) |
| |
|
inlineexplicit |
◆ DoBeginGroup()
void anonymous_namespace{PopupMenuTable.cpp}::PopupMenuBuilder::DoBeginGroup |
( |
Registry::GroupItem & |
item, |
|
|
const Path & |
path |
|
) |
| |
|
overridevirtual |
Reimplemented from MenuVisitor.
Definition at line 68 of file PopupMenuTable.cpp.
69{
71 if ( !pItem->caption.empty() ) {
72 auto newMenu =
74 mMenu = newMenu.get();
75 mMenus.push_back( std::move( newMenu ) );
76 }
77 }
78}
◆ DoEndGroup()
void anonymous_namespace{PopupMenuTable.cpp}::PopupMenuBuilder::DoEndGroup |
( |
Registry::GroupItem & |
item, |
|
|
const Path & |
path |
|
) |
| |
|
overridevirtual |
Reimplemented from MenuVisitor.
Definition at line 80 of file PopupMenuTable.cpp.
81{
83 if ( !pItem->caption.empty() ) {
84 auto subMenu = std::move(
mMenus.back() );
87 mMenu->AppendSubMenu( subMenu.release(), pItem->caption.Translation());
88 }
89 }
90}
◆ DoSeparator()
void anonymous_namespace{PopupMenuTable.cpp}::PopupMenuBuilder::DoSeparator |
( |
| ) |
|
|
overridevirtual |
◆ DoVisit()
void anonymous_namespace{PopupMenuTable.cpp}::PopupMenuBuilder::DoVisit |
( |
Registry::SingleItem & |
item, |
|
|
const Path & |
path |
|
) |
| |
|
overridevirtual |
Reimplemented from MenuVisitor.
Definition at line 92 of file PopupMenuTable.cpp.
93{
95 switch (pEntry->type) {
97 {
98 mMenu->Append(pEntry->id, pEntry->caption.Translation());
99 break;
100 }
102 {
103 mMenu->AppendRadioItem(pEntry->id, pEntry->caption.Translation());
104 break;
105 }
107 {
108 mMenu->AppendCheckItem(pEntry->id, pEntry->caption.Translation());
109 break;
110 }
111 default:
112 wxASSERT( false );
113 break;
114 }
115
116
117
119
120 if ( pEntry->init )
121 pEntry->init( pEntry->handler, *
mMenu, pEntry->id );
122
124 wxEVT_COMMAND_MENU_SELECTED, pEntry->func, &pEntry->handler, pEntry->id);
125}
References PopupMenuTableEntry::CheckItem, PopupMenuTableEntry::Item, and PopupMenuTableEntry::RadioItem.
◆ mMenu
PopupMenuImpl* anonymous_namespace{PopupMenuTable.cpp}::PopupMenuBuilder::mMenu |
◆ mMenus
std::vector< std::unique_ptr<PopupMenuImpl> > anonymous_namespace{PopupMenuTable.cpp}::PopupMenuBuilder::mMenus |
◆ mpUserData
void* const anonymous_namespace{PopupMenuTable.cpp}::PopupMenuBuilder::mpUserData |
◆ mRoot
PopupMenuImpl * anonymous_namespace{PopupMenuTable.cpp}::PopupMenuBuilder::mRoot |
The documentation for this class was generated from the following file: