mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-21 16:37:12 +01:00
Split out namespace Registry for non-menu-specific tree manipulation
This commit is contained in:
@@ -100,7 +100,7 @@ void MenuManager::UpdatePrefs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Namespace for structures that go into building a menu
|
/// Namespace for structures that go into building a menu
|
||||||
namespace MenuTable {
|
namespace Registry {
|
||||||
|
|
||||||
BaseItem::~BaseItem() {}
|
BaseItem::~BaseItem() {}
|
||||||
|
|
||||||
|
|||||||
@@ -407,7 +407,7 @@ private:
|
|||||||
|
|
||||||
// Define classes and functions that associate parts of the user interface
|
// Define classes and functions that associate parts of the user interface
|
||||||
// with path names
|
// with path names
|
||||||
namespace MenuTable {
|
namespace Registry {
|
||||||
// TODO C++17: maybe use std::variant (discriminated unions) to achieve
|
// TODO C++17: maybe use std::variant (discriminated unions) to achieve
|
||||||
// polymorphism by other means, not needing unique_ptr and dynamic_cast
|
// polymorphism by other means, not needing unique_ptr and dynamic_cast
|
||||||
// and using less heap.
|
// and using less heap.
|
||||||
@@ -524,8 +524,11 @@ namespace MenuTable {
|
|||||||
using GroupItem::GroupItem;
|
using GroupItem::GroupItem;
|
||||||
~TransparentGroupItem() override;
|
~TransparentGroupItem() override;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Define items that populate tables that specifically describe menu trees
|
// 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
|
// Describes a main menu in the toolbar, or a sub-menu
|
||||||
struct MenuItem final : GroupItem {
|
struct MenuItem final : GroupItem {
|
||||||
|
|||||||
Reference in New Issue
Block a user