Rename XCUI compatibility host surface away from ImGui

This commit is contained in:
2026-04-05 16:53:40 +08:00
parent 54a699aa26
commit 94482ab98c
4 changed files with 11 additions and 10 deletions

View File

@@ -46,6 +46,7 @@ Old `editor` replacement is explicitly out of scope for this phase.
- `XCUIShellChromeState` no longer carries the legacy host demo-window toggle or command id on the generic shell-state surface
- `Application.h` no longer exposes that legacy demo command through generic `ShellCommandIds`, `ShellCommandBindings`, or `RegisterShellViewCommands(...)`
- the legacy demo window toggle now lives as a compatibility-only command inside `ApplicationLegacyImGui.cpp`
- generic `Application` host-mode/member naming is now also shifting from `LegacyImGui` toward `CompatibilityHost`, so the default shell surface does not have to encode ImGui into every host-facing method name
- Old `editor` replacement remains deferred; all active execution still stays inside XCUI shared code and `new_editor`.
## Three-Layer Status

View File

@@ -1132,7 +1132,7 @@ void Application::Frame() {
return;
}
FrameLegacyImGuiHost();
FrameCompatibilityHost();
}
} // namespace NewEditor

View File

@@ -52,7 +52,7 @@ public:
using ShellViewToggleState = ::XCEngine::Editor::XCUIBackend::XCUIShellViewToggleState;
enum class WindowHostMode : std::uint8_t {
NativeXCUI = 0,
LegacyImGui
CompatibilityHost
};
struct ShellCommandIds {
@@ -420,12 +420,12 @@ private:
const ::XCEngine::Editor::XCUIBackend::XCUIInputBridgeFrameSnapshot& snapshot);
bool IsNativeWindowHostEnabled() const;
void InitializePanelsForActiveWindowHost();
void InitializeLegacyImGuiPanels();
void RenderLegacyImGuiUiFrame();
void InitializeCompatibilityHostPanels();
void RenderCompatibilityHostUiFrame();
::XCEngine::UI::UIDrawData BuildNativeShellDrawData(
const ::XCEngine::Editor::XCUIBackend::XCUIInputBridgeFrameSnapshot& shellSnapshot,
const ::XCEngine::Editor::XCUIBackend::XCUIInputBridgeFrameDelta& shellFrameDelta);
void FrameLegacyImGuiHost();
void FrameCompatibilityHost();
void FrameNativeXCUIHost();
void RenderShellChrome();
void RenderHostedPreviewHud();

View File

@@ -119,11 +119,11 @@ void Application::InitializePanelsForActiveWindowHost() {
return;
}
InitializeLegacyImGuiPanels();
InitializeCompatibilityHostPanels();
ConfigureHostedPreviewPresenters();
}
void Application::InitializeLegacyImGuiPanels() {
void Application::InitializeCompatibilityHostPanels() {
m_demoPanel = std::make_unique<XCUIDemoPanel>(
&m_xcuiInputSource,
CreateHostedPreviewPresenter(IsNativeHostedPreviewEnabled(ShellPanelId::XCUIDemo)),
@@ -267,7 +267,7 @@ void Application::InitializeWindowCompositor() {
}
}
void Application::FrameLegacyImGuiHost() {
void Application::FrameCompatibilityHost() {
Application::BeginHostedPreviewFrameLifecycle(
m_hostedPreviewQueue,
m_hostedPreviewSurfaceRegistry);
@@ -279,7 +279,7 @@ void Application::FrameLegacyImGuiHost() {
m_windowCompositor->RenderFrame(
kLegacyHostClearColor,
[this]() { RenderLegacyImGuiUiFrame(); },
[this]() { RenderCompatibilityHostUiFrame(); },
[this](
const ::XCEngine::Rendering::RenderContext& renderContext,
const ::XCEngine::Rendering::RenderSurface& surface) {
@@ -323,7 +323,7 @@ void Application::FrameLegacyImGuiHost() {
m_xcuiInputSource.ClearFrameTransients();
}
void Application::RenderLegacyImGuiUiFrame() {
void Application::RenderCompatibilityHostUiFrame() {
::XCEngine::Editor::XCUIBackend::XCUIInputBridgeCaptureOptions options = {};
options.timestampNanoseconds = MakeLegacyHostFrameTimestampNanoseconds();
options.windowFocused = m_xcuiInputSource.IsWindowFocused();