#pragma once #include #include #include #include namespace XCEngine::UI::Editor { enum class UIEditorPanelPresentationKind : std::uint8_t { Placeholder = 0, ViewportShell, HostedContent }; struct UIEditorPanelDescriptor { std::string panelId = {}; std::string defaultTitle = {}; UIEditorPanelPresentationKind presentationKind = UIEditorPanelPresentationKind::Placeholder; bool placeholder = true; bool canHide = true; bool canClose = true; }; struct UIEditorPanelRegistry { std::vector panels = {}; }; enum class UIEditorPanelRegistryValidationCode : std::uint8_t { None = 0, EmptyPanelId, EmptyDefaultTitle, DuplicatePanelId }; struct UIEditorPanelRegistryValidationResult { UIEditorPanelRegistryValidationCode code = UIEditorPanelRegistryValidationCode::None; std::string message = {}; [[nodiscard]] bool IsValid() const { return code == UIEditorPanelRegistryValidationCode::None; } }; UIEditorPanelRegistry BuildDefaultEditorShellPanelRegistry(); const UIEditorPanelDescriptor* FindUIEditorPanelDescriptor( const UIEditorPanelRegistry& registry, std::string_view panelId); UIEditorPanelRegistryValidationResult ValidateUIEditorPanelRegistry( const UIEditorPanelRegistry& registry); } // namespace XCEngine::UI::Editor