From 568ffc40eb1cdef12e71242e43693c22ebca3ce6 Mon Sep 17 00:00:00 2001 From: Codex Date: Wed, 30 Sep 2026 01:23:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=20StellarX=20=E6=A0=B8?= =?UTF-8?q?=E5=BF=83=E9=87=8D=E6=9E=84=E3=80=81=E7=BC=BA=E9=99=B7=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=B8=8E=E6=B5=8B=E8=AF=95=E6=94=B6=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 + Run-Key-Test.cmd | 13 + StellarX.Core.vcxproj | 63 +++ z-testDome.cpp => app/z-testDome.cpp | 43 +- imGui-easyX.sln | 30 ++ imGui-easyX.vcxproj | 68 ++-- imGui-easyX.vcxproj.filters | 63 +-- Button.h => include/StellarX/Button.h | 85 ++-- Canvas.h => include/StellarX/Canvas.h | 77 +++- Control.h => include/StellarX/Control.h | 111 +++++- CoreTypes.h => include/StellarX/CoreTypes.h | 131 +++++- Dialog.h => include/StellarX/Dialog.h | 54 +-- Label.h => include/StellarX/Label.h | 11 +- MessageBox.h => include/StellarX/MessageBox.h | 9 +- StellarX.h => include/StellarX/StellarX.h | 0 SxLog.h => include/StellarX/SxLog.h | 13 +- TabControl.h => include/StellarX/TabControl.h | 53 ++- Table.h => include/StellarX/Table.h | 79 ++-- TextBox.h => include/StellarX/TextBox.h | 19 +- Window.h => include/StellarX/Window.h | 89 ++++- scripts/run-key.ps1 | 82 ++++ scripts/run-ui-tests.ps1 | 307 ++++++++++++++ scripts/test.ps1 | 91 +++++ Button.cpp => src/StellarX/Button.cpp | 94 +++-- Canvas.cpp => src/StellarX/Canvas.cpp | 193 ++++++++- Control.cpp => src/StellarX/Control.cpp | 117 ++++-- Dialog.cpp => src/StellarX/Dialog.cpp | 64 ++- Label.cpp => src/StellarX/Label.cpp | 6 +- MessageBox.cpp => src/StellarX/MessageBox.cpp | 0 SxLog.cpp => src/StellarX/SxLog.cpp | 82 +++- TabControl.cpp => src/StellarX/TabControl.cpp | 156 ++++++-- Table.cpp => src/StellarX/Table.cpp | 154 ++++++-- TextBox.cpp => src/StellarX/TextBox.cpp | 43 +- Window.cpp => src/StellarX/Window.cpp | 219 ++++++++-- src/StellarX/internal/SxEventLoopInternal.h | 42 ++ src/StellarX/internal/SxTextInternal.h | 46 +++ tests/StellarX.Tests.vcxproj | 57 +++ tests/StellarX.UiFixture.vcxproj | 33 ++ tests/StellarXTests.cpp | 373 ++++++++++++++++++ tests/UiFixture.cpp | 170 ++++++++ 开发记录/00-修改总览-20260409.md | 32 ++ .../01-补充记录-20260409-窗口最大化收口保护.md | 2 +- ...0001-TabControl由不可见设置为可见时绘制错乱.md | 53 +++ ...001-TabControl-setActiveIndex绘制前调用崩溃.md | 60 +++ ...-0001-TextBox-setText进入事件循环前调用崩溃.md | 66 ++++ ...0109-0002-TabControl切换后Table新旧内容重叠.md | 60 +++ ...001-Window-runEventLoop普通控件事件分发顺序.md | 53 +++ ...3-0001-对话框打开时错误下发合成WM_MOUSEMOVE.md | 53 +++ ...-20260206-0001-对话框打开时持续触发全量重绘.md | 53 +++ ...bControl-getActiveIndex无激活页返回最后索引.md | 54 +++ ...0003-直接最大化触发收口保护导致黑背景与残影.md | 2 +- .../BUG-20260410-0004-按钮Tooltip移出后不消失.md | 2 +- ...415-0005-局部重绘未补画上层兄弟导致遮挡错误.md | 6 +- ...ble运行期重置后页码标签被旧分页按钮快照覆盖.md | 54 +++ ...0001-TabControl由不可见设置为可见时绘制错乱.md | 64 +++ ...001-TabControl-setActiveIndex绘制前调用崩溃.md | 69 ++++ ...-0001-TextBox-setText进入事件循环前调用崩溃.md | 65 +++ ...0109-0002-TabControl切换后Table新旧内容重叠.md | 69 ++++ ...Window-runEventLoop普通控件事件分发顺序修复.md | 58 +++ ...01-对话框打开时错误下发合成WM_MOUSEMOVE修复.md | 59 +++ ...60206-0001-对话框打开时持续触发全量重绘修复.md | 63 +++ ...TabControl-getActiveIndex无激活页返回值修复.md | 58 +++ ...0003-直接最大化触发收口保护导致黑背景与残影.md | 2 +- ...x-BUG-20260410-0004-按钮Tooltip移出后不消失.md | 6 +- ...-BUG-20260415-0005-局部重绘补画上层兄弟修复.md | 10 +- ...260929-0001-Table分页控件绘制前统一布局修复.md | 66 ++++ 开发记录/MIGRATION.md | 74 ++++ 开发记录/TESTING.md | 119 ++++++ ...ture-20251220-0001-Table运行期重置表头与数据API.md | 70 ++++ .../Feature-20251220-0002-TextBox密码模式.md | 66 ++++ ...eature-20260109-0001-TabControl页签切换时序调整.md | 67 ++++ .../Feature-20260109-0002-删除Button尺寸别名API.md | 66 ++++ .../Feature-20260317-0001-TextBox文本溢出截断.md | 71 ++++ ...20260317-0002-TextBox-setText运行期刷新语义调整.md | 77 ++++ ...ure-20260415-0008-KEY5-第二阶段专项回归场景增强.md | 2 +- ...-20260416-0009-KEY2-使用新布局API重构与联动刷新.md | 2 +- ...eature-20260418-0010-当前阶段测试用例矩阵与定位.md | 4 +- ...e-20260509-0011-布局API使用说明与旧接口覆盖规则.md | 6 +- .../Feature-20260915-0001-全量缺陷修复与API调整.md | 137 +++++++ .../Module-20260109-0001-SxLog轻量日志系统.md | 127 ++++++ ...dule-20260410-0002-锚点与布局系统第一阶段重构.md | 32 +- .../Module-20260415-0003-布局系统第二阶段收口.md | 40 +- ...dule-20260415-0004-布局系统第二阶段验收与封口.md | 52 +-- .../Module-20260416-0005-布局策略公开API落地.md | 12 +- ...60915-0001-StellarX核心库与自动化测试基础设施.md | 149 +++++++ 85 files changed, 5011 insertions(+), 645 deletions(-) create mode 100644 Run-Key-Test.cmd create mode 100644 StellarX.Core.vcxproj rename z-testDome.cpp => app/z-testDome.cpp (97%) rename Button.h => include/StellarX/Button.h (75%) rename Canvas.h => include/StellarX/Canvas.h (52%) rename Control.h => include/StellarX/Control.h (65%) rename CoreTypes.h => include/StellarX/CoreTypes.h (74%) rename Dialog.h => include/StellarX/Dialog.h (68%) rename Label.h => include/StellarX/Label.h (86%) rename MessageBox.h => include/StellarX/MessageBox.h (75%) rename StellarX.h => include/StellarX/StellarX.h (100%) rename SxLog.h => include/StellarX/SxLog.h (96%) rename TabControl.h => include/StellarX/TabControl.h (54%) rename Table.h => include/StellarX/Table.h (74%) rename TextBox.h => include/StellarX/TextBox.h (76%) rename Window.h => include/StellarX/Window.h (63%) create mode 100644 scripts/run-key.ps1 create mode 100644 scripts/run-ui-tests.ps1 create mode 100644 scripts/test.ps1 rename Button.cpp => src/StellarX/Button.cpp (91%) rename Canvas.cpp => src/StellarX/Canvas.cpp (72%) rename Control.cpp => src/StellarX/Control.cpp (87%) rename Dialog.cpp => src/StellarX/Dialog.cpp (93%) rename Label.cpp => src/StellarX/Label.cpp (92%) rename MessageBox.cpp => src/StellarX/MessageBox.cpp (100%) rename SxLog.cpp => src/StellarX/SxLog.cpp (86%) rename TabControl.cpp => src/StellarX/TabControl.cpp (78%) rename Table.cpp => src/StellarX/Table.cpp (83%) rename TextBox.cpp => src/StellarX/TextBox.cpp (91%) rename Window.cpp => src/StellarX/Window.cpp (86%) create mode 100644 src/StellarX/internal/SxEventLoopInternal.h create mode 100644 src/StellarX/internal/SxTextInternal.h create mode 100644 tests/StellarX.Tests.vcxproj create mode 100644 tests/StellarX.UiFixture.vcxproj create mode 100644 tests/StellarXTests.cpp create mode 100644 tests/UiFixture.cpp create mode 100644 开发记录/BUG/BUG-20251209-0001-TabControl由不可见设置为可见时绘制错乱.md create mode 100644 开发记录/BUG/BUG-20251220-0001-TabControl-setActiveIndex绘制前调用崩溃.md create mode 100644 开发记录/BUG/BUG-20260109-0001-TextBox-setText进入事件循环前调用崩溃.md create mode 100644 开发记录/BUG/BUG-20260109-0002-TabControl切换后Table新旧内容重叠.md create mode 100644 开发记录/BUG/BUG-20260122-0001-Window-runEventLoop普通控件事件分发顺序.md create mode 100644 开发记录/BUG/BUG-20260203-0001-对话框打开时错误下发合成WM_MOUSEMOVE.md create mode 100644 开发记录/BUG/BUG-20260206-0001-对话框打开时持续触发全量重绘.md create mode 100644 开发记录/BUG/BUG-20260217-0001-TabControl-getActiveIndex无激活页返回最后索引.md create mode 100644 开发记录/BUG/BUG-20260929-0001-Table运行期重置后页码标签被旧分页按钮快照覆盖.md create mode 100644 开发记录/Fix/Fix-BUG-20251209-0001-TabControl由不可见设置为可见时绘制错乱.md create mode 100644 开发记录/Fix/Fix-BUG-20251220-0001-TabControl-setActiveIndex绘制前调用崩溃.md create mode 100644 开发记录/Fix/Fix-BUG-20260109-0001-TextBox-setText进入事件循环前调用崩溃.md create mode 100644 开发记录/Fix/Fix-BUG-20260109-0002-TabControl切换后Table新旧内容重叠.md create mode 100644 开发记录/Fix/Fix-BUG-20260122-0001-Window-runEventLoop普通控件事件分发顺序修复.md create mode 100644 开发记录/Fix/Fix-BUG-20260203-0001-对话框打开时错误下发合成WM_MOUSEMOVE修复.md create mode 100644 开发记录/Fix/Fix-BUG-20260206-0001-对话框打开时持续触发全量重绘修复.md create mode 100644 开发记录/Fix/Fix-BUG-20260217-0001-TabControl-getActiveIndex无激活页返回值修复.md create mode 100644 开发记录/Fix/Fix-BUG-20260929-0001-Table分页控件绘制前统一布局修复.md create mode 100644 开发记录/MIGRATION.md create mode 100644 开发记录/TESTING.md create mode 100644 开发记录/功能变更/Feature-20251220-0001-Table运行期重置表头与数据API.md create mode 100644 开发记录/功能变更/Feature-20251220-0002-TextBox密码模式.md create mode 100644 开发记录/功能变更/Feature-20260109-0001-TabControl页签切换时序调整.md create mode 100644 开发记录/功能变更/Feature-20260109-0002-删除Button尺寸别名API.md create mode 100644 开发记录/功能变更/Feature-20260317-0001-TextBox文本溢出截断.md create mode 100644 开发记录/功能变更/Feature-20260317-0002-TextBox-setText运行期刷新语义调整.md create mode 100644 开发记录/功能变更/Feature-20260915-0001-全量缺陷修复与API调整.md create mode 100644 开发记录/模块/Module-20260109-0001-SxLog轻量日志系统.md create mode 100644 开发记录/模块/Module-20260915-0001-StellarX核心库与自动化测试基础设施.md diff --git a/.gitignore b/.gitignore index a21f13e..ec61071 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,10 @@ .vs/ x64/ .codex-temp/ +.codex-staging/ +build/ +TestResults/ +*.vcxproj.user *.obj *.exe *.pdb diff --git a/Run-Key-Test.cmd b/Run-Key-Test.cmd new file mode 100644 index 0000000..81df873 --- /dev/null +++ b/Run-Key-Test.cmd @@ -0,0 +1,13 @@ +@echo off +setlocal + +"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\run-key.ps1" +set "runnerExit=%ERRORLEVEL%" + +if not "%runnerExit%"=="0" ( + echo. + echo KEY test launcher failed with exit code %runnerExit%. + pause +) + +exit /b %runnerExit% diff --git a/StellarX.Core.vcxproj b/StellarX.Core.vcxproj new file mode 100644 index 0000000..d13725c --- /dev/null +++ b/StellarX.Core.vcxproj @@ -0,0 +1,63 @@ + + + + + + DebugWin32 + ReleaseWin32 + Debugx64 + Releasex64 + + + 17.0 + Win32Proj + {28B8D78E-85AF-4F14-AD56-D51AB6958941} + StellarXCore + 10.0 + + + + + StaticLibrary + true + false + v143 + MultiByte + + + + + $(SolutionDir)build\$(Platform)\$(Configuration)\ + $(SolutionDir)build\obj\$(ProjectName)\$(Platform)\$(Configuration)\ + + + true + $(ProjectDir)build\$(Platform)\$(Configuration)-asan\ + $(ProjectDir)build\obj\$(ProjectName)\$(Platform)\$(Configuration)-asan\ + + + + Level4 + true + true + stdcpp17 + NotUsing + $(ProjectDir)include\StellarX;$(ProjectDir)src\StellarX\internal;%(AdditionalIncludeDirectories) + + + + + + + + + + + + + + + + + + diff --git a/z-testDome.cpp b/app/z-testDome.cpp similarity index 97% rename from z-testDome.cpp rename to app/z-testDome.cpp index 0e5792a..15af23e 100644 --- a/z-testDome.cpp +++ b/app/z-testDome.cpp @@ -53,7 +53,7 @@ #include"StellarX.h" #include #ifndef KEY -#define KEY 6 +#define KEY 1 #endif // 测试用例统一使用最新布局 API,避免继续依赖旧 setAnchor() 兼容层。 @@ -285,8 +285,9 @@ int main() rightPage2Ptr->addControl(std::move(rightPage2Label)); rightPage2Ptr->addControl(std::move(roundReadOnly)); - rightTabsPtr->add(std::make_pair(std::make_unique