# Editor **命名空间**: `XCEngine::Editor` **类型**: `app-module` **描述**: 编辑器应用层 API 文档入口,镜像 `editor/src` 的目录结构,覆盖编辑器启动、上下文、面板工作区、项目浏览、场景编辑与 UI 基础设施。 ## 概述 这一组文档对应的不是 `engine/include/XCEngine` 的 public engine headers,而是独立编辑器应用 `editor/src/**`。 因此这里需要先建立一个正确心智模型: - `XCEngine` 引擎模块负责运行时系统。 - `Editor` 模块负责围绕这些运行时系统搭建编辑器应用。 - 它更接近“应用层/工具层 API”,而不是给游戏代码直接依赖的稳定引擎 ABI。 当前编辑器的主链路大致是: 1. [Application](Application/Application.md) 启动 Win32 窗口、D3D12 窗口渲染器和 ImGui 会话。 2. [Core::EditorContext](Core/EditorContext/EditorContext.md) 组装事件总线、场景管理、项目管理、选择管理和撤销系统。 3. [Layers::EditorLayer](Layers/EditorLayer/EditorLayer.md) 承载编辑器工作区生命周期。 4. [Core::EditorWorkspace](Core/EditorWorkspace/EditorWorkspace.md) 组织菜单、层级、场景视图、GameView、Inspector、Console 和 Project 等面板。 ## 当前实现边界 - 当前编辑器主要是 Windows + D3D12 + ImGui 路径。 - 这组代码整体是应用层源码,不像 engine public headers 那样已经完全按稳定 SDK 方式整理。 - 当前文档页会优先标注 `源文件`,而不是 `头文件`,以反映它们来自 `editor/src/**`。 - 当前自动审计脚本仍以 `engine/include/XCEngine` 为主,因此 `Editor` 这组页主要靠链接完整性和人工结构约束维护。 ## 目录 - [Application](Application/Application.md) - 顶层编辑器应用入口。 - [Theme](Theme/Theme.md) - 顶层主题入口。 - [Core](Core/Core.md) - 上下文、事件、撤销、选择与基础数据结构。 - [Managers](Managers/Managers.md) - 项目与场景管理实现。 - [panels](panels/panels.md) - 编辑器面板基础设施。 - [Layers](Layers/Layers.md) - 编辑器 layer 封装。 - [Platform](Platform/Platform.md) - Win32 窗口宿主与 D3D12 窗口渲染器。 - [UI](UI/UI.md) - ImGui 会话与编辑器 UI 基础设施。 - [Actions](Actions/Actions.md) - 菜单/按钮/快捷键动作绑定与路由层。 - [Commands](Commands/Commands.md) - 面向场景与项目操作的高层命令封装。 - [ComponentEditors](ComponentEditors/ComponentEditors.md) - 组件属性编辑器注册与实现层。 - [Layout](Layout/Layout.md) - Dock 布局控制。 - [Utils](Utils/Utils.md) - 场景编辑与撤销相关辅助函数。 ## 相关文档 - [XCEngine 根目录](../XCEngine.md) - [Scene](../Scene/Scene.md) - [Components](../Components/Components.md) - [Rendering](../Rendering/Rendering.md) - [Editor Architecture And Workflow](../../_guides/Editor/Editor-Architecture-And-Workflow.md) - [API 总索引](../../main.md)