Build XCUI splitter foundation and test harness

This commit is contained in:
2026-04-06 03:17:53 +08:00
parent dc17685099
commit c7dc8d7484
77 changed files with 4749 additions and 542 deletions

View File

@@ -0,0 +1,35 @@
set(EDITOR_UI_INPUT_SHORTCUT_SCOPE_RESOURCES
View.xcui
${CMAKE_SOURCE_DIR}/tests/UI/Editor/integration/shared/themes/editor_validation.xctheme
)
add_executable(editor_ui_input_shortcut_scope_validation WIN32
main.cpp
${EDITOR_UI_INPUT_SHORTCUT_SCOPE_RESOURCES}
)
target_include_directories(editor_ui_input_shortcut_scope_validation PRIVATE
${CMAKE_SOURCE_DIR}/tests/UI/Editor/integration/shared/src
${CMAKE_SOURCE_DIR}/engine/include
)
target_compile_definitions(editor_ui_input_shortcut_scope_validation PRIVATE
UNICODE
_UNICODE
)
if(MSVC)
target_compile_options(editor_ui_input_shortcut_scope_validation PRIVATE /utf-8 /FS)
set_property(TARGET editor_ui_input_shortcut_scope_validation PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
target_link_libraries(editor_ui_input_shortcut_scope_validation PRIVATE
editor_ui_integration_host
)
set_target_properties(editor_ui_input_shortcut_scope_validation PROPERTIES
OUTPUT_NAME "XCUIEditorInputShortcutScopeValidation"
)
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES View.xcui)

View File

@@ -0,0 +1,69 @@
<View
name="EditorInputShortcutScope"
theme="../../shared/themes/editor_validation.xctheme"
shortcut="Ctrl+P"
shortcutCommand="global.command"
shortcutScope="global">
<Column padding="20" gap="12">
<Card
title="Editor Validation | Shortcut Scope"
subtitle="验证功能Editor shortcut scope 路由与 text input suppression"
tone="accent"
height="100">
<Column gap="6">
<Text text="功能 1验证 Ctrl+P 在 Widget / Panel / Window / Global 间按优先级命中 shortcut。" />
<Text text="功能 2验证 Text Input Proxy 会抑制 Ctrl+P 和 Tab 焦点遍历。" />
</Column>
</Card>
<Button id="global-focus" text="Global Focus" />
<Card
id="window-shell"
title="Window Scope"
subtitle="Ctrl+P -> window.command"
shortcutScopeRoot="window"
shortcut="Ctrl+P"
shortcutCommand="window.command"
shortcutScope="window">
<Column gap="10">
<Text text="先检查优先级widget > panel > window > global。" />
<Button id="window-focus" text="Window Focus" />
<Card
id="panel-shell"
title="Panel Scope"
subtitle="Ctrl+P -> panel.command"
shortcutScopeRoot="panel"
shortcut="Ctrl+P"
shortcutCommand="panel.command"
shortcutScope="panel">
<Column gap="10">
<Button id="panel-focus" text="Panel Focus" />
<Card
id="widget-shell"
title="Widget Scope"
subtitle="Ctrl+P -> widget.command"
tone="accent-alt"
shortcutScopeRoot="widget"
shortcut="Ctrl+P"
shortcutCommand="widget.command"
shortcutScope="widget">
<Column gap="10">
<Button id="widget-focus" text="Widget Focus" />
</Column>
</Card>
<Button id="text-input" text="Text Input Proxy" textInput="true" />
<Text text="操作指引:" />
<Text text="1. 依次点 Widget / Panel / Window / Global Focus再按 Ctrl+P。" />
<Text text="2. 右下角 Recent shortcut 应分别显示 widget / panel / window / global且状态为 handled。" />
<Text text="3. 点 Text Input Proxy 再按 Ctrl+PRecent shortcut 状态应变为 suppressed。" />
<Text text="4. 保持 Text Input Proxy focus 再按 TabResult 应显示 focus traversal suppressedfocus 不应跳走。" />
</Column>
</Card>
</Column>
</Card>
</Column>
</View>

View File

@@ -0,0 +1,8 @@
#include "Application.h"
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, LPWSTR, int nCmdShow) {
return XCEngine::Tests::EditorUI::RunEditorUIValidationApp(
hInstance,
nCmdShow,
"editor.input.shortcut_scope");
}