Add XCUI input focus shortcut MVP

This commit is contained in:
2026-04-04 18:55:20 +08:00
parent a9bf9ef35c
commit 611ca705c8
17 changed files with 1342 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
# Subplan 04XCUI Input / Focus / Shortcut
状态:
- 已于 `2026-04-04` 完成当前 subplan 定义边界内的实现。
- 已归档到:
[../used/XCUI_Input_Focus_Shortcut_Subplan_完成归档_2026-04-04.md](../used/XCUI_Input_Focus_Shortcut_Subplan_完成归档_2026-04-04.md)
目标:
- 建立 XCUI 的输入事件、焦点流转和快捷键分发模型。
- 让输入不再直接写死在 ImGui 调用点里。
负责人边界:
- 负责 `engine/src/UI/Input/`
- 负责 pointer / keyboard / focus / command dispatch 的抽象。
- 不负责平台消息采集本身。
建议目录:
- `engine/include/XCEngine/UI/Input/`
- `engine/src/UI/Input/`
- `tests` 中 input/focus 测试
前置依赖:
- 依赖 `Subplan 01` 的 tree 和 hit-test 基础契约。
- 需要和 `Subplan 05` 对齐 adapter 输入桥接接口。
现在就可以先做的内容:
- 设计 `UIInputEvent` 丰富版本
- 设计 focus path / active path / capture path
- 设计 shortcut scopeglobal / window / panel / widget
- 写 focus 切换和冒泡/捕获测试
明确不做:
- 不做 Win32 原生消息处理细节
- 不做具体文本输入 widget
交付物:
- XCUI 输入分发器
- 焦点管理器
- 快捷键绑定与分发机制
验收标准:
- 可以确定事件从哪里来、往哪里走、谁消费
- 焦点切换规则稳定可测
- 快捷键系统可与 editor shell 直接对接