Contain XCUI ImGui adapters behind explicit host seams

This commit is contained in:
2026-04-05 13:24:14 +08:00
parent 56f596548d
commit f943a07862
23 changed files with 1134 additions and 290 deletions

View File

@@ -15,10 +15,11 @@ namespace NewEditor {
class XCUIDemoPanel : public Panel {
public:
explicit XCUIDemoPanel(
::XCEngine::Editor::XCUIBackend::XCUIWin32InputSource* inputSource = nullptr);
::XCEngine::Editor::XCUIBackend::IXCUIInputSnapshotSource* inputSource = nullptr);
XCUIDemoPanel(
::XCEngine::Editor::XCUIBackend::XCUIWin32InputSource* inputSource,
std::unique_ptr<::XCEngine::Editor::XCUIBackend::IXCUIHostedPreviewPresenter> previewPresenter);
::XCEngine::Editor::XCUIBackend::IXCUIInputSnapshotSource* inputSource,
std::unique_ptr<::XCEngine::Editor::XCUIBackend::IXCUIHostedPreviewPresenter> previewPresenter,
std::unique_ptr<::XCEngine::Editor::XCUIBackend::IXCUIPanelCanvasHost> canvasHost = nullptr);
~XCUIDemoPanel() override = default;
void Render() override;
@@ -37,7 +38,7 @@ private:
bool m_hostedPreviewEnabled = true;
bool m_showCanvasHud = true;
bool m_showDebugRects = true;
::XCEngine::Editor::XCUIBackend::XCUIWin32InputSource* m_inputSource = nullptr;
::XCEngine::Editor::XCUIBackend::IXCUIInputSnapshotSource* m_inputSource = nullptr;
::XCEngine::Editor::XCUIBackend::XCUIInputBridge m_inputBridge;
::XCEngine::Editor::XCUIBackend::XCUIDemoRuntime m_runtime;
std::unique_ptr<::XCEngine::Editor::XCUIBackend::IXCUIHostedPreviewPresenter> m_previewPresenter;