#include "app/editor/core/content_registry.h"
Go to the source code of this file.
Namespaces | |
| namespace | yaze |
| namespace | yaze::editor |
| Editors are the view controllers for the application. | |
Macros | |
| #define | REGISTER_PANEL(PanelClass) |
| Auto-registration macro for panels with default constructors. | |
| #define | REGISTER_PANEL_FACTORY(PanelClass, FactoryFunc) |
| Registration macro for panels requiring custom factory logic. | |
| #define REGISTER_PANEL | ( | PanelClass | ) |
Auto-registration macro for panels with default constructors.
Use this macro at file scope (after the class definition) to automatically register a panel type with ContentRegistry. The panel will be instantiated when ContentRegistry::Panels::CreateAll() is called.
Requirements:
Usage:
The panel can then access shared resources via ContentRegistry::Context:
Definition at line 39 of file panel_registration.h.
| #define REGISTER_PANEL_FACTORY | ( | PanelClass, | |
| FactoryFunc ) |
Registration macro for panels requiring custom factory logic.
Use this when a panel needs constructor arguments or conditional creation. The factory function receives no arguments and should return a unique_ptr to the panel, or nullptr to skip creation.
Usage:
Definition at line 66 of file panel_registration.h.