#pragma once #include "State/EditorContext.h" #include "Features/Console/ConsolePanel.h" #include "Rendering/Assets/BuiltInIcons.h" #include "Features/Hierarchy/HierarchyPanel.h" #include "Features/Inspector/InspectorPanel.h" #include "Features/Project/ProjectPanel.h" #include "Rendering/Viewport/ViewportHostService.h" #include "Composition/WorkspaceEventSync.h" #include #include #include #include #include #include #include #include namespace XCEngine::UI::Editor::App { class EditorShellRuntime { public: void Initialize( const std::filesystem::path& repoRoot, Host::NativeRenderer& renderer); void Shutdown(); void ResetInteractionState(); void AttachViewportWindowRenderer(Host::D3D12WindowRenderer& renderer); void DetachViewportWindowRenderer(); void SetViewportSurfacePresentationEnabled(bool enabled); void Update( EditorContext& context, UIEditorWorkspaceController& workspaceController, const ::XCEngine::UI::UIRect& bounds, const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents, std::string_view captureText, EditorShellVariant shellVariant = EditorShellVariant::Primary, bool useDetachedTitleBarTabStrip = false, float detachedTitleBarTabHeight = 0.0f); void RenderRequestedViewports( const ::XCEngine::Rendering::RenderContext& renderContext); void Append(::XCEngine::UI::UIDrawList& drawList) const; const UIEditorShellInteractionFrame& GetShellFrame() const; const UIEditorShellInteractionState& GetShellInteractionState() const; const std::vector& GetTraceEntries() const; const std::vector& GetHierarchyPanelEvents() const; const std::vector& GetProjectPanelEvents() const; const std::string& GetBuiltInIconError() const; ProjectPanel::CursorKind GetHostedContentCursorKind() const; Widgets::UIEditorDockHostCursorKind GetDockCursorKind() const; bool WantsHostPointerCapture() const; bool WantsHostPointerRelease() const; bool HasHostedContentCapture() const; bool HasShellInteractiveCapture() const; bool HasInteractiveCapture() const; private: ViewportHostService m_viewportHostService = {}; BuiltInIcons m_builtInIcons = {}; ConsolePanel m_consolePanel = {}; HierarchyPanel m_hierarchyPanel = {}; InspectorPanel m_inspectorPanel = {}; ProjectPanel m_projectPanel = {}; UIEditorShellInteractionState m_shellInteractionState = {}; UIEditorShellInteractionFrame m_shellFrame = {}; std::vector m_traceEntries = {}; }; } // namespace XCEngine::UI::Editor::App