yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
panel_registration.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_REGISTRY_PANEL_REGISTRATION_H_
2#define YAZE_APP_EDITOR_REGISTRY_PANEL_REGISTRATION_H_
3
5
6namespace yaze::editor {
7
39#define REGISTER_PANEL(PanelClass) \
40 namespace { \
41 struct PanelRegistrar_##PanelClass { \
42 PanelRegistrar_##PanelClass() { \
43 ::yaze::editor::ContentRegistry::Panels::add<PanelClass>(); \
44 } \
45 }; \
46 [[maybe_unused]] static PanelRegistrar_##PanelClass \
47 s_panel_registrar_##PanelClass; \
48 } // namespace
49
66#define REGISTER_PANEL_FACTORY(PanelClass, FactoryFunc) \
67 namespace { \
68 struct PanelRegistrar_##PanelClass { \
69 PanelRegistrar_##PanelClass() { \
70 ::yaze::editor::ContentRegistry::Panels::RegisterFactory(FactoryFunc); \
71 } \
72 }; \
73 [[maybe_unused]] static PanelRegistrar_##PanelClass \
74 s_panel_registrar_##PanelClass; \
75 } // namespace
76
78#define REGISTER_WINDOW_CONTENT REGISTER_PANEL
80#define REGISTER_WINDOW_CONTENT_FACTORY REGISTER_PANEL_FACTORY
81
82} // namespace yaze::editor
83
84#endif // YAZE_APP_EDITOR_REGISTRY_PANEL_REGISTRATION_H_
Editors are the view controllers for the application.