1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Only one public CommandManager fn to begin a menu and one to end...

... It knows the nesting, so it decides for itself whether to manage the menu
as main or sub-.
This commit is contained in:
Paul Licameli
2018-10-18 08:52:37 -04:00
parent 32efcd43c4
commit 7f5e6d12b1
4 changed files with 144 additions and 117 deletions

View File

@@ -140,12 +140,9 @@ class AUDACITY_DLL_API CommandManager final : public XMLTagHandler
// You may either called SetCurrentMenu later followed by ClearCurrentMenu,
// or else BeginMenu followed by EndMenu. Don't mix them.
void BeginMenu(const wxString & tName);
wxMenu *BeginMenu(const wxString & tName);
void EndMenu();
wxMenu* BeginSubMenu(const wxString & tName);
void EndSubMenu();
// For specifying unusual arguments in AddItem
struct Options
{
@@ -349,6 +346,10 @@ protected:
//
void Enable(CommandListEntry *entry, bool enabled);
wxMenu *BeginMainMenu(const wxString & tName);
void EndMainMenu();
wxMenu* BeginSubMenu(const wxString & tName);
void EndSubMenu();
//
// Accessing