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

@@ -1,10 +1,10 @@
#include "Workspace/UIEditorWorkspaceModelInternal.h"
#include "Workspace/WorkspaceModelInternal.h"
#include <algorithm>
#include <cmath>
#include <utility>
namespace XCEngine::UI::Editor::Detail {
namespace XCEngine::UI::Editor::Internal {
UIEditorWorkspaceValidationResult MakeValidationError(
UIEditorWorkspaceValidationCode code,
@@ -554,7 +554,7 @@ UIEditorWorkspaceValidationResult ValidateNodeRecursive(
return {};
}
} // namespace XCEngine::UI::Editor::Detail
} // namespace XCEngine::UI::Editor::Internal
namespace XCEngine::UI::Editor {
@@ -594,7 +594,7 @@ bool AreUIEditorWorkspaceModelsEquivalent(
UIEditorWorkspaceModel BuildDefaultEditorShellWorkspaceModel() {
const UIEditorPanelRegistry registry = BuildDefaultEditorShellPanelRegistry();
const UIEditorPanelDescriptor& rootPanel =
Detail::RequirePanelDescriptor(registry, "editor-foundation-root");
Internal::RequirePanelDescriptor(registry, "editor-foundation-root");
UIEditorWorkspaceModel workspace = {};
workspace.root = BuildUIEditorWorkspaceSingleTabStack(
@@ -626,7 +626,7 @@ UIEditorWorkspaceNode BuildUIEditorWorkspaceSingleTabStack(
std::string title,
bool placeholder) {
UIEditorWorkspaceNode panel = BuildUIEditorWorkspacePanel(
Detail::BuildSingleTabPanelNodeId(nodeId),
Internal::BuildSingleTabPanelNodeId(nodeId),
std::move(panelId),
std::move(title),
placeholder);
@@ -666,7 +666,7 @@ UIEditorWorkspaceNode BuildUIEditorWorkspaceSplit(
UIEditorWorkspaceModel CanonicalizeUIEditorWorkspaceModel(
UIEditorWorkspaceModel workspace) {
Detail::CanonicalizeNodeRecursive(workspace.root, false);
Internal::CanonicalizeNodeRecursive(workspace.root, false);
return workspace;
}