Connect native tab chrome to managed Page methods
Verify Tessera GUI / verify (push) Failing after 7m37s

This commit is contained in:
2026-10-21 17:29:54 +08:00
parent 76e293d3b8
commit 96319b13a3
13 changed files with 548 additions and 16 deletions
+1
View File
@@ -2,6 +2,7 @@
| File | Purpose |
| --- | --- |
| [tabs.endor](tabs.endor) | Three real Page tabs, shared counter state, source titles, native switching/closing and reopening through code. |
| [window.endor](window.endor) | A managed native Window resizes the actual shell; source callbacks update it and layout follows reported dimensions. |
| [layout-cache.endor](layout-cache.endor) | Per-occurrence source measurement caches, separate size/paint models, and a band using the logical viewport input. |
| [source-layout.endor](source-layout.endor) | Source measurement reads its initial Mount parent; source arrangement moves a child and a click updates the shared layout model. |
+17
View File
@@ -0,0 +1,17 @@
// Code and tab chrome operate the same Page objects.
first = Page()
first.title = "共享计数"
count = ui.state(0)
increment = Button("加一")
connection = increment.on("click", count.increment)
first.render(Column(24,16,TextBlock("切换页面后,计数对象继续存在"),ui.textOf(count,"value"),increment))
second = Page()
second.title = "另一个页面"
second.render(Column(24,16,TextBlock("点击上方 Tab 切换;× 关闭页面"),TextBlock("Ctrl+Tab 切换,Cmd/Ctrl+W 关闭;代码可调用 first.open() 重开")))
third = Page()
third.title = "窗口与布局"
third.render(Column(24,16,TextBlock("每个 Tab 都是同一个 VM 中的 Page 对象"),RectBlock(240,80,8,"#237A45")))
first.activate()
ui.window().setTitle("Endor Pages")