Definition at line 109 of file MenuCreator.cpp.
◆ MenuItemVisitor()
anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::MenuItemVisitor |
( |
AudacityProject & |
proj | ) |
|
|
inlineexplicit |
Definition at line 110 of file MenuCreator.cpp.
112
113 [this](const auto &item, const auto&) {
115 if (!pCurrentMenu) {
116
117
118 assert(false);
119 }
120 else TypeSwitch::VDispatch<void, LeafTypes>(item,
122 if (auto pSpecial =
124 pSpecial->fn(
mProject, *pCurrentMenu);
125 },
126 [
this](
auto &item){
DoVisit(item); }
127 );
128 },
129
130 [this]{
133 Populator::DoSeparator();
134 }
135 }
136 {
138 assert(menubar);
139
141
143 }
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
void DoVisit(const Registry::SingleItem &item)
AudacityProject & mProject
◆ ~MenuItemVisitor()
anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::~MenuItemVisitor |
( |
| ) |
|
|
overridedefault |
◆ AddMenuBar()
std::unique_ptr< wxMenuBar > MenuItemVisitor::AddMenuBar |
( |
const wxString & |
sMenu | ) |
|
|
private |
Makes a NEW menubar for placement on the top of a project Names it according to the passed-in string argument.
If the menubar already exists, that's unexpected.
Definition at line 967 of file MenuCreator.cpp.
968{
970 if (menuBar) {
971 wxASSERT(false);
972 return {};
973 }
974
975 auto result = std::make_unique<wxMenuBar>();
977
978 return result;
979}
◆ AllocateEntry()
auto anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::AllocateEntry |
( |
const MenuRegistry::Options & |
options | ) |
|
|
finalprivatevirtual |
Called by DoVisit Override to make entries that carry extra information. Not called for every visit, because existing items may be reused
- Postcondition
- result:
result != nullptr
Reimplemented from CommandManager::Populator.
Definition at line 252 of file MenuCreator.cpp.
254{
255 auto result = std::make_unique<CommandListEntryEx>();
258 return result;
259}
◆ BeginMainMenu()
void anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::BeginMainMenu |
( |
const TranslatableString & |
tName | ) |
|
|
private |
◆ BeginMenu()
void anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::BeginMenu |
( |
const TranslatableString & |
tName | ) |
|
|
finalprivatevirtual |
◆ BeginOccultCommands()
void anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::BeginOccultCommands |
( |
| ) |
|
|
finalprivatevirtual |
◆ BeginSubMenu()
void anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::BeginSubMenu |
( |
const TranslatableString & |
tName | ) |
|
|
private |
◆ CurrentMenu()
wxMenu * MenuItemVisitor::CurrentMenu |
( |
| ) |
const |
|
private |
This returns the current menu that we're appending to - note that it could be a submenu if BeginSubMenu was called and we haven't reached EndSubMenu yet.
Definition at line 1020 of file MenuCreator.cpp.
1021{
1023 return NULL;
1024
1026
1027 if(!tmpCurrentSubMenu)
1028 {
1030 }
1031
1032 return tmpCurrentSubMenu;
1033}
◆ CurrentMenuBar()
wxMenuBar * MenuItemVisitor::CurrentMenuBar |
( |
| ) |
const |
|
private |
Retrieve the 'current' menubar; either NULL or the last on in the mMenuBarList.
Definition at line 998 of file MenuCreator.cpp.
999{
1001 return NULL;
1002
1004}
◆ CurrentSubMenu()
wxMenu * MenuItemVisitor::CurrentSubMenu |
( |
| ) |
const |
|
private |
This returns the 'Current' Submenu, which is the one at the end of the mSubMenuList (or NULL, if it doesn't exist).
Definition at line 1008 of file MenuCreator.cpp.
1009{
1011 return NULL;
1012
1014}
◆ EndMainMenu()
void anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::EndMainMenu |
( |
| ) |
|
|
private |
◆ EndMenu()
void anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::EndMenu |
( |
| ) |
|
|
finalprivatevirtual |
◆ EndOccultCommands()
void anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::EndOccultCommands |
( |
| ) |
|
|
finalprivatevirtual |
◆ EndSubMenu()
void anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::EndSubMenu |
( |
| ) |
|
|
private |
◆ GetMenuBar()
wxMenuBar * MenuItemVisitor::GetMenuBar |
( |
const wxString & |
sMenu | ) |
const |
|
private |
Retrieves the menubar based on the name given in AddMenuBar(name)
Definition at line 984 of file MenuCreator.cpp.
985{
987 {
988 if(
entry.name == sMenu)
989 return entry.menubar;
990 }
991
992 return NULL;
993}
static ProjectFileIORegistry::AttributeWriterEntry entry
References entry.
◆ VisitEntry()
◆ mCurrentMenu
wxMenu* anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::mCurrentMenu {} |
|
private |
◆ mMenuBarList
std::vector<MenuBarListEntry> anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::mMenuBarList |
|
private |
◆ mSubMenuList
std::vector<SubMenuListEntry> anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::mSubMenuList |
|
private |
◆ mTempMenuBar
std::unique_ptr<wxMenuBar> anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::mTempMenuBar |
|
private |
◆ uCurrentMenu
std::unique_ptr<wxMenu> anonymous_namespace{MenuCreator.cpp}::MenuItemVisitor::uCurrentMenu |
|
private |
The documentation for this struct was generated from the following file: