1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-10 17:37:45 +02:00

Split out namespace Registry for non-menu-specific tree manipulation

This commit is contained in:
Paul Licameli 2019-01-11 19:43:00 -05:00
parent d28009c93e
commit 90a22b3982
2 changed files with 5 additions and 2 deletions

View File

@ -100,7 +100,7 @@ void MenuManager::UpdatePrefs()
}
/// Namespace for structures that go into building a menu
namespace MenuTable {
namespace Registry {
BaseItem::~BaseItem() {}

View File

@ -407,7 +407,7 @@ private:
// Define classes and functions that associate parts of the user interface
// with path names
namespace MenuTable {
namespace Registry {
// TODO C++17: maybe use std::variant (discriminated unions) to achieve
// polymorphism by other means, not needing unique_ptr and dynamic_cast
// and using less heap.
@ -524,8 +524,11 @@ namespace MenuTable {
using GroupItem::GroupItem;
~TransparentGroupItem() override;
};
}
// Define items that populate tables that specifically describe menu trees
namespace MenuTable {
using namespace Registry;
// Describes a main menu in the toolbar, or a sub-menu
struct MenuItem final : GroupItem {