9.3 KiB
9.3 KiB
XCUI Phase Status 2026-04-05
Scope
Current execution stays inside the XCUI module and new_editor.
Old editor replacement is explicitly out of scope for this phase.
Latest Checkpoint
- Phase 1 sandbox batch committed and pushed as
67a28bd(Add XCUI new editor sandbox phase 1). - Phase 2 common/runtime batch committed and pushed as
ade5be3(Add XCUI runtime screen layer and demo textarea). - Phase 3 has now produced a stable mixed batch across common/runtime/editor:
- schema document definition data is now retained on
UIDocumentModeland round-trips through the UI artifact path - engine runtime coverage was tightened again around
UISystemand concrete document-host rendering LayoutLabcontinues as the editor widget proving ground for tree/list/property-section style controls
- schema document definition data is now retained on
- The current editor-host checkpoint additionally hardens the XCUI demo text-editing path and the temporary ImGui host bridge:
- multiline demo text areas now support pointer caret placement, line-number gutters, and tab indent/unindent behavior
- the ImGui bridge now accepts existing shader-resource views and the window renderer exposes an after-UI callback seam
- Old
editorreplacement remains deferred; all active execution still stays inside XCUI shared code andnew_editor.
Three-Layer Status
1. Common Core
UI::DrawData, input event types, focus routing, style/theme resolution are in active use.UIDocumentCompileris buildable again after repairing the duplicated schema helper regression introduced by overlapping schema work.UIDocumentModel/UIDocumentResourcenow retain schema definition metadata explicitly, including memory accounting andUISchemaaccessors..xcschemaround-trip coverage is now present through compile, loader, artifact write, and artifact read paths.- Build-system hardening for MSVC/PDB output paths has started in root CMake,
engine/CMakeLists.txt,new_editor/CMakeLists.txt, andtests/NewEditor/CMakeLists.txt. - Shared engine-side XCUI runtime scaffolding is now present under
engine/include/XCEngine/UI/Runtimeandengine/src/UI/Runtime. - Shared engine-side
UIDocumentScreenHostnow compiles.xcui/.xcthemescreen documents into a runtime-facing document host path instead of leaving all document ownership innew_editor. - The temporary ImGui bridge can now register an existing shader-resource view directly instead of forcing the caller to recreate a texture SRV from scratch.
- Core regression coverage now includes
UIContext, layout, style, runtime screen player/system, and real document-host tests throughcore_ui_tests.
Current gap:
- Minimal schema self-definition support is landed, but schema-driven validation for
.xcui/.xcthemeinstances is still not implemented. - Shared widget/runtime instantiation is still thin and mostly editor-side.
- Common widget primitives are still incomplete: multiline text editing, tree/list virtualization, property-grid composition, and native image/source-rect level APIs.
2. Runtime/Game Layer
- The main concrete progress here is that the retained-mode demo runtime now supports a real
TextFieldinput path with UTF-8 text entry and backspace handling. - The demo runtime has moved past single-line input: multiline
TextAreabehavior is now covered in the sandbox testbed. - Engine-side runtime ownership is no longer zero:
UIScreenPlayer,UIDocumentScreenHost, andUISystemnow define a shared runtime contract for loading a screen document, ticking it with input, and collectingUI::UIDrawData. UISystemnow supports layered screen composition semantics: stacked screen players, top-interactive input routing, and modal layers that block lower screens.- Runtime screen emission now also carries concrete button text in the shared document host path instead of silently dropping button labels.
Current gap:
- No production game-loop integration has been wired yet from scene/runtime systems into
UISystem. - The runtime widget library is still shallow and missing the editor-grade controls that will later be shared downward.
3. Editor Layer
new_editorremains the isolated XCUI sandbox.- Native hosted preview is working as
RHI offscreen surface -> ImGui shell texture embed. XCUI Demoremains the long-lived effect and behavior testbed.XCUI Demonow covers both single-line and multiline text authoring behavior, including pointer caret placement, line-number gutters, delete/backspace symmetry, and tab indent/unindent in text areas.LayoutLabnow includes aScrollViewprototype and a more editor-like three-column authored layout.LayoutLabnow also covers editor-facing widget prototypes:TreeView,TreeItem,ListView,ListItem,PropertySection, andFieldRow.- Panel diagnostics were expanded to clearly separate preview/runtime/input state and native vs legacy paths.
XCNewEditorbuilds successfully tobuild/new_editor/bin/Debug/XCNewEditor.exe.new_editorhost plumbing now has a narrower swapchain seam via a window-renderer post-ImGui callback, which is the first practical hook for a future window-level compositor split.
Current gap:
- The shell is still ImGui-hosted.
- Editor-specialized widgets are still incomplete at the shared-module level: the authored prototypes exist, but virtualization, selection models, command routing, property editing models, toolbar/menu chrome, and icon-atlas widgets are not yet extracted into reusable XCUI modules.
Validated This Phase
new_editor_xcui_demo_runtime_tests:7/7new_editor_xcui_layout_lab_runtime_tests:6/6new_editor_xcui_rhi_command_compiler_tests:6/6new_editor_xcui_rhi_render_backend_tests:5/5XCNewEditorDebug target builds successfullycore_ui_tests:14/14core_ui_style_tests:5/5ui_resource_tests:7/7editor_teststargeted XCUI/editor host API smoke cases:3/3
Landed This Phase
- Demo runtime
TextFieldwith UTF-8 text insertion, caret state, and backspace. - Demo runtime multiline
TextAreapath in the sandbox and test coverage for caret movement / multiline input. - Demo runtime text editing extended with:
- pointer-based caret placement for text inputs
- multiline text-area line-number gutters
- tab indent / shift-tab unindent
- delete handling symmetry with backspace
- Demo authored resources updated to exercise the input field.
- LayoutLab
ScrollViewprototype with clipping and hover rejection outside clipped content. - LayoutLab editor-widget prototypes for tree/list/property-style sections with dedicated runtime coverage.
- Schema document support extended with:
- retained
UISchemaDefinitiondata onUIDocumentModel - artifact schema version bump for UI documents
- loader/resource accessors and memory accounting
- schema compile/load/artifact regression coverage
- retained
- Engine runtime layer added:
UIScreenPlayerUIDocumentScreenHostUISystem- layered screen composition and modal blocking semantics
- Runtime document-host draw emission now preserves button labels for shared screen rendering.
- RHI image path improvements:
- clipped image UV adjustment
- mirrored image UV preservation
- external texture binding reuse
- per-batch scissor application
new_editorpanel/shell diagnostics improvements for hosted preview state.- ImGui host bridge improvements:
- existing shader-resource view registration overload
- swapchain render callback seam after ImGui submission
- editor-side API smoke coverage for bridge and window renderer accessors
- XCUI asset document loading changed to prefer direct source compilation before
ResourceManagerfallback for the sandbox path, fixing the LayoutLab crash. UIDocumentCompiler.cpprepaired enough to restore full local builds after the duplicated schema-helper regression.- MSVC debug build hardening was tightened again so large parallel
enginerebuilds stop tripping over compile-PDB contention.
Phase Risks Still Open
- Schema instance validation is still open beyond
.xcschemaself-definition and artifact round-trip coverage. ScrollViewis still authored/static; no wheel-driven scrolling or virtualization yet.Imagewidgets still do not have source-rect/atlas-subregion level API in the high-level draw command model.- Editor shell still depends on ImGui as host chrome.
- Editor widget coverage is still prototype-driven inside
LayoutLab; it has not yet been promoted into a reusable shared widget/runtime layer.
Next Phase
- Expand schema rules just one level further inside
UIDocumentCompiler.cpp:allowedValuesonly forEnumdocumentKind/restrictDocumentKindonly forDocumentrestrictDocumentKind=truerequires explicitdocumentKind
- Expand runtime/game-layer ownership from the current document host + layered
UISysteminto reusable menu/HUD stack patterns and engine runtime integration. - Promote the current editor-facing widget prototypes out of authored
LayoutLabcontent and into reusable XCUI widget/runtime modules, then continue with toolbar/menu and more native shell-owned chrome. - Start the window-level compositor split in
new_editorso the editor shell can run throughImGuiHostCompositorfirst and then grow a native XCUI compositor path on the same seam. - Continue phased validation, commit, push, and plan refresh after each stable batch.