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_CORE_PANEL_REGISTRATION_H_
2#define YAZE_APP_EDITOR_CORE_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( \
71 FactoryFunc); \
72 } \
73 }; \
74 [[maybe_unused]] static PanelRegistrar_##PanelClass \
75 s_panel_registrar_##PanelClass; \
76 } // namespace
77
78} // namespace yaze::editor
79
80#endif // YAZE_APP_EDITOR_CORE_PANEL_REGISTRATION_H_
Editors are the view controllers for the application.