refactor(editor): isolate windowing from composition runtime

This commit is contained in:
2026-04-27 23:45:24 +08:00
parent 603d003684
commit 6b488d5eac
34 changed files with 418 additions and 193 deletions

View File

@@ -20,24 +20,25 @@
namespace XCEngine::UI::Editor::App {
EditorWindowManager::EditorWindowManager(
EditorContext& editorContext,
EditorFrameServices& frameServices,
EditorWindowSystem& windowSystem,
Rendering::Host::EditorWindowRenderRuntimeFactory& renderRuntimeFactory,
Host::EditorHostResourceService& resourceService,
EditorWindowHostRuntimeServices& hostRuntime,
EditorWorkspacePanelRuntimeSetFactory workspacePanelFactory,
EditorWorkspaceShellRuntimeFactory workspaceShellRuntimeFactory,
EditorUtilityWindowPanelFactory utilityPanelFactory)
: m_editorContext(editorContext)
: m_frameServices(frameServices)
, m_renderRuntimeFactory(renderRuntimeFactory)
, m_resourceService(resourceService)
, m_hostRuntime(hostRuntime) {
m_contentFactory = CreateDefaultEditorWindowContentFactory(
windowSystem,
std::move(workspacePanelFactory),
std::move(workspaceShellRuntimeFactory),
std::move(utilityPanelFactory));
m_workspaceCoordinator =
std::make_unique<EditorWindowWorkspaceCoordinator>(
m_editorContext,
m_hostRuntime,
*this,
windowSystem,
@@ -45,7 +46,6 @@ EditorWindowManager::EditorWindowManager(
*m_contentFactory);
m_utilityCoordinator =
std::make_unique<EditorUtilityWindowCoordinator>(
m_editorContext,
m_hostRuntime,
*this,
m_renderRuntimeFactory,
@@ -80,7 +80,7 @@ EditorHostWindow* EditorWindowManager::CreateWorkspaceWindow(
params.chromePolicy,
params.primary,
std::make_unique<EditorWindowRuntimeController>(
m_editorContext,
m_frameServices,
m_resourceService,
m_contentFactory->CreateWorkspaceContentController(windowState),
m_renderRuntimeFactory.CreateWindowRenderRuntime()));
@@ -109,7 +109,7 @@ EditorHostWindow* EditorWindowManager::CreateUtilityWindow(
params.chromePolicy,
params.primary,
std::make_unique<EditorWindowRuntimeController>(
m_editorContext,
m_frameServices,
m_resourceService,
m_contentFactory->CreateUtilityContentController(descriptor),
m_renderRuntimeFactory.CreateWindowRenderRuntime()));