Registry for editor panels. More...
Typedefs | |
| using | PanelFactory = std::function<std::unique_ptr<EditorPanel>()> |
Functions | |
| void | RegisterFactory (PanelFactory factory) |
| Register a panel factory. | |
| std::vector< std::unique_ptr< EditorPanel > > | CreateAll () |
| Create new instances of all registered panels. | |
| void | Register (std::unique_ptr< EditorPanel > panel) |
| Register a panel instance (Legacy/Global). | |
| std::vector< EditorPanel * > | GetAll () |
| Get all registered panels. | |
| EditorPanel * | Get (const std::string &id) |
| Get a specific panel by its ID. | |
| void | Clear () |
| Clear all registered panels. | |
| template<typename T > | |
| void | add () |
| Register a panel type for auto-creation. | |
Registry for editor panels.
Panels can register themselves here for centralized management. This enables features like:
| using yaze::editor::ContentRegistry::Panels::PanelFactory = std::function<std::unique_ptr<EditorPanel>()> |
Definition at line 148 of file content_registry.h.
| void yaze::editor::ContentRegistry::Panels::RegisterFactory | ( | PanelFactory | factory | ) |
Register a panel factory.
| factory | Function that creates a new instance of the panel. |
Definition at line 163 of file content_registry.cc.
Referenced by add().
| std::vector< std::unique_ptr< EditorPanel > > yaze::editor::ContentRegistry::Panels::CreateAll | ( | ) |
Create new instances of all registered panels.
Definition at line 168 of file content_registry.cc.
Referenced by yaze::editor::EditorManager::RegisterEditors().
| void yaze::editor::ContentRegistry::Panels::Register | ( | std::unique_ptr< EditorPanel > | panel | ) |
Register a panel instance (Legacy/Global).
| panel | Unique pointer to the panel to register. |
Definition at line 186 of file content_registry.cc.
| std::vector< EditorPanel * > yaze::editor::ContentRegistry::Panels::GetAll | ( | ) |
Get all registered panels.
Definition at line 193 of file content_registry.cc.
Referenced by yaze::test::CoreSystemsTestSuite::RunContentRegistryPanelRegistrationTest().
| EditorPanel * yaze::editor::ContentRegistry::Panels::Get | ( | const std::string & | id | ) |
Get a specific panel by its ID.
| id | The unique identifier of the panel. |
Definition at line 206 of file content_registry.cc.
| void yaze::editor::ContentRegistry::Panels::Clear | ( | ) |
Clear all registered panels.
Called during shutdown for cleanup.
Definition at line 218 of file content_registry.cc.
| void yaze::editor::ContentRegistry::Panels::add | ( | ) |
Register a panel type for auto-creation.
| T | The panel class to register (must have default constructor). |
Definition at line 161 of file content_registry.h.
References RegisterFactory().
