feat(wasm-dom): Phase 5 baselines + visual notes (menus/toolbars/tooltips)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Viktor Vaczi 2026-06-11 00:02:50 +02:00
commit e36854bab6
17 changed files with 21 additions and 4 deletions

View file

@ -113,3 +113,21 @@ slider/statline/statbox wired:
- **Polish items (open):** generic wxSpinCtrl's text field collapses
beside the spin pair; Event Log textarea lacks the univ scrollbar
gutter (native scrollbars appear on overflow instead).
## Phase 5 (2026-06-10) — menus, toolbars, tooltips
- **Working as native DOM:** menubar strip (File/Edit/View/Tools/Help) with
popup menus — items, separators, check marks, submenu expansion, hover
highlight, outside-click dismissal, drop shadow (`menu-03-file-clicked`
is a close twin of the canvas popup); toolbar strips with PNG icon
buttons, toggle state, separators; tooltips as native `title`
attributes (wxUSE_TOOLTIPS re-enabled for the DOM build).
- **Compatibility:** menu titles register as rendered elements
(`menuitem`/`menubar`), popup items as `menuitem`, tools as `tool` —
`clickMenuBarItem`/`findRenderedByType`-based specs pass unchanged
(menu.spec 7/7, toolbar.spec 6/6).
- **Architecture note:** menu structures serialize C++→JS as JSON
(wxDomMenuSetStructure); activation routes back via
wxDomGetLastCommandId + wxDOM_EVENT_MENU → wxMenu::SendEvent. Toolbar
identical shape (wxDomToolbarSetTools / wxDOM_EVENT_TOOL →
wxToolBarBase::OnLeftClick with radio-group + veto handling).

View file

@ -46,9 +46,8 @@ if [ "$DOM_BUILD" = "1" ]; then
BUILD_DIR="$PROJECT_ROOT/build-wasm/wxwidgets-dom"
# Native (non-universal) widget set: controls are real DOM elements.
UNIVERSAL_FLAG=""
# Tooltips will be DOM title attributes (dom-phase-5); no wxToolTip yet.
# (Universal mode auto-disables them; native mode must do it explicitly.)
PORT_EXTRA_FLAGS="--disable-tooltips"
# Tooltips are DOM title attributes (wx/wasm/tooltip.h).
PORT_EXTRA_FLAGS=""
WXLIB_PREFIX="libwx_wasmu"
else
BUILD_DIR="$PROJECT_ROOT/build-wasm/wxwidgets-universal"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

@ -1 +1 @@
Subproject commit a93ce9187cb0b482897ca502c314ee5aca68b52c
Subproject commit 5de7b0f072d2dd26c83347190d0587121a9df39e