Skip to content

LVGL: add Textarea actions and owned ButtonMatrix maps - #30

Open
AwangYes wants to merge 4 commits into
eez-open:masterfrom
AwangYes:lvgl-textarea-buttonmatrix
Open

AwangYes wants to merge 4 commits into
eez-open:masterfrom
AwangYes:lvgl-textarea-buttonmatrix

Conversation

@AwangYes

@AwangYes AwangYes commented Sep 15, 2026 •

Copy link
Copy Markdown

Summary

This is the framework part of a coordinated Studio Textarea / ButtonMatrix update.

  • Append action IDs 65–73 without reordering 0–64: six Textarea actions, ButtonMatrix Get Selected Button, Get Button Text and Set Map.
  • Keep Textarea and ButtonMatrix getter results and converted string arguments alive independently of widgets/temporary Values.
  • Copy ButtonMatrix maps and labels, release them on replacement/deletion, preserve text-update controls, and validate widget types/counts/row-width bounds before dispatch.
  • Successful Set Map detaches original widget text bindings so later ticks cannot restore a default symbol over replacement text. Failed replacement leaves bindings active; new widgets start with active bindings. No new action IDs or UI options are introduced for this fix.
  • Return cleanly when ObjectAllocator receives a null allocation instead of invoking placement new at address zero.
  • Expose the two map/text helpers for Studio's runtime and generated code. The C-compatible implementation is also reused by generated projects without Flow.

Validation

  • Five real LVGL versions (8.4.0, 9.2.2, 9.3.0, 9.4.0, 9.5.0): expression bytecode → action dispatch → actual LVGL objects.
  • Getter ownership, string-conversion lifetime, password mode/bullet with ASCII and UTF-8, selection/NONE, complete map/ctrl replacement and 500 repeated replacements.
  • C helper tests inject allocation/event-registration failures and exercise aliasing, row limits, bubbled deletion and externally replaced static maps.
  • Generated amalgamation compiled and run under ASan/UBSan with LVGL 8.4.0 and 9.5.0.
  • Binding ownership regression: symbol-to-text replacement, 500 replacements, allocation/event failures and widget recreation. Companion CI: https://github.com/AwangYes/studio-wasm-libs/actions/runs/35080585574
  • Allocator CI: https://github.com/AwangYes/eez-framework/actions/runs/35067456366

The integration tests/build tooling live in the accompanying studio-wasm-libs change; this repository's small CI job only exercises the allocator guard. LVGL's own allocation/assert behavior is not changed.

Integration order

Merge the framework change first, then update the studio-wasm-libs submodule pin and regenerate its amalgamation plus five engines, then consume those same artifacts in Studio. Studio's Set Map uses the existing complete Buttons editor, not a new raw-map parameter or UI style. All new actions require the matching runtime, so this is one feature delivery rather than a Set Map-only follow-up.

Companion PRs: eez-open/studio-wasm-libs#1 and eez-open/studio#1068.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant