#pragma once #include "EditorShellDrawComposer.h" #include "EditorShellHostedPanelCoordinator.h" #include "EditorShellInteractionEngine.h" #include "EditorShellSessionCoordinator.h" #include "Windowing/EditorWorkspaceShellRuntime.h" #include "WorkspacePanels/EditorWorkspacePanelRuntime.h" #include "Assets/BuiltInIcons.h" #include "Viewport/ViewportHostService.h" #include #include #include #include #include #include #include #include #include #include namespace XCEngine::UI::Editor::Rendering::Host { class UiTextureHost; class ViewportRenderHost; } // namespace XCEngine::UI::Editor::Rendering::Host namespace XCEngine::UI::Editor::Host { class EditorHostResourceService; } // namespace XCEngine::UI::Editor::Host namespace XCEngine::Rendering { class RenderContext; } // namespace XCEngine::Rendering namespace XCEngine::UI::Editor::App { class EditorShellRuntime final : public EditorWorkspaceShellRuntime { public: EditorShellRuntime() = default; explicit EditorShellRuntime(EditorWorkspacePanelRuntimeSet workspacePanels); void Initialize( const std::filesystem::path& repoRoot, Rendering::Host::UiTextureHost& textureHost, Host::EditorHostResourceService& resourceService, UIEditorTextMeasurer& textMeasurer) override; void Shutdown() override; void ResetInteractionState() override; void AttachViewportWindowRenderer(Rendering::Host::ViewportRenderHost& renderer) override; void DetachViewportWindowRenderer() override; void SetViewportSurfacePresentationEnabled(bool enabled) override; void Update( EditorFrameServices& frameServices, 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, float detachedWindowChromeHeight = 0.0f) override; void RenderRequestedViewports( const ::XCEngine::Rendering::RenderContext& renderContext) override; void Append(::XCEngine::UI::UIDrawData& drawData) const override; const UIEditorShellInteractionFrame& GetShellFrame() const override; const UIEditorShellInteractionState& GetShellInteractionState() const override; const std::vector& GetTraceEntries() const override; const std::string& GetBuiltInIconError() const; void SetExternalDockHostDropPreview( const Widgets::UIEditorDockHostDropPreviewState& preview) override; void ClearExternalDockHostDropPreview() override; EditorWorkspaceShellCursorKind GetHostedContentCursorKind() const override; Widgets::UIEditorDockHostCursorKind GetDockCursorKind() const override; bool TryResolveDockTabDragHotspot( std::string_view nodeId, std::string_view panelId, const ::XCEngine::UI::UIPoint& point, ::XCEngine::UI::UIPoint& outHotspot) const override; UIEditorDockHostTabDropTarget ResolveDockTabDropTarget( const ::XCEngine::UI::UIPoint& point) const override; bool HasHostedContentCapture() const override; bool HasShellInteractiveCapture() const override; bool HasInteractiveCapture() const override; private: ViewportHostService m_viewportHostService = {}; BuiltInIcons m_builtInIcons = {}; Rendering::Host::UiTextureHost* m_textureHost = nullptr; EditorWorkspacePanelRuntimeSet m_workspacePanels = {}; UIEditorShellInteractionState m_shellInteractionState = {}; UIEditorShellInteractionFrame m_shellFrame = {}; std::vector m_traceEntries = {}; UIEditorWorkspaceSplitterDragCorrectionState m_splitterDragCorrectionState = {}; EditorShellDrawComposer m_drawComposer = {}; EditorShellHostedPanelCoordinator m_hostedPanelCoordinator = {}; EditorShellInteractionEngine m_interactionEngine = {}; EditorShellSessionCoordinator m_sessionCoordinator = {}; }; std::unique_ptr CreateEditorWorkspaceShellRuntime( EditorWorkspacePanelRuntimeSet workspacePanels); } // namespace XCEngine::UI::Editor::App