refactor(new_editor): streamline internal layout and command routing

This commit is contained in:
2026-04-15 19:30:58 +08:00
parent 9654f4d91a
commit df8f433fbb
84 changed files with 3250 additions and 3008 deletions

View File

@@ -114,6 +114,12 @@ void EditorShellRuntime::Update(
detachedTitleBarTabHeight;
}
const UIEditorWorkspaceLayoutSnapshot preUpdateSnapshot =
workspaceController.CaptureLayoutSnapshot();
const Widgets::UIEditorDockHostLayout preUpdateDockLayout =
m_shellFrame.workspaceInteractionFrame.dockHostFrame.layout;
context.BindEditCommandRoutes(&m_hierarchyPanel, &m_projectPanel);
context.SyncSessionFromWorkspace(workspaceController);
UIEditorShellInteractionDefinition definition =
context.BuildShellDefinition(workspaceController, captureText, shellVariant);
@@ -131,6 +137,27 @@ void EditorShellRuntime::Update(
shellEvents,
context.GetShellServices(),
metrics);
if (TryApplyUIEditorWorkspaceSplitterDragCorrection(
m_splitterDragCorrectionState,
m_shellInteractionState.workspaceInteractionState.dockHostInteractionState,
preUpdateSnapshot,
preUpdateDockLayout,
workspaceController,
metrics.shellMetrics.dockHostMetrics)) {
context.SyncSessionFromWorkspace(workspaceController);
definition =
context.BuildShellDefinition(workspaceController, captureText, shellVariant);
m_shellFrame = UpdateUIEditorShellInteraction(
m_shellInteractionState,
workspaceController,
bounds,
definition,
{},
context.GetShellServices(),
metrics);
}
const bool shellOwnsHostedContentPointerStream =
ShouldHostedContentYieldPointerStream(m_shellFrame, HasShellInteractiveCapture());
const std::vector<::XCEngine::UI::UIInputEvent> hostedContentEvents =