Support shared-VM native windows and Page detachment
Verify Tessera GUI / verify (push) Failing after 7m35s
Verify Tessera GUI / verify (push) Failing after 7m35s
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
| File | Purpose |
|
||||
| --- | --- |
|
||||
| [windows.endor](windows.endor) | Two real native windows in one Aster VM, live shared counter state and explicit Page ownership. |
|
||||
| [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. |
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// Both native windows use one Aster VM and one shared business object.
|
||||
count = ui.state(0)
|
||||
leftButton = Button("共享计数 +1")
|
||||
leftConnection = leftButton.on("click",count.increment)
|
||||
left = Page()
|
||||
left.title = "主窗口页面"
|
||||
left.render(Column(24,16,TextBlock("两个窗口操作同一个计数对象"),ui.textOf(count,"value"),leftButton))
|
||||
|
||||
other = Window()
|
||||
rightButton = Button("另一个窗口 +1")
|
||||
rightConnection = rightButton.on("click",count.increment)
|
||||
right = Page()
|
||||
right.title = "独立窗口页面"
|
||||
right.render(Column(24,16,TextBlock("关闭窗口会解除 Page 归属,保留的对象仍可重开"),ui.textOf(count,"value"),rightButton))
|
||||
right.open(other)
|
||||
ui.window().setTitle("Endor Main")
|
||||
other.setTitle("Endor Shared")
|
||||
other.resize(960,640)
|
||||
Reference in New Issue
Block a user