0005. UI as view models plus thin widgets
- Status: accepted
- Date: 2026-10-02
Context
Section titled “Context”GUI code tends to accumulate logic (layout maths, hit-testing, snapping, formatting), which then cannot be tested and cannot survive a change of toolkit.
Decision
Section titled “Decision”core/ui_model and the domain cores hold view models and all geometry and interaction logic as pure C++. Widgets in ui/<toolkit>/ only draw and forward input. Theme values are tokens defined by role.
Consequences
Section titled “Consequences”- UI logic is unit tested.
- A new toolkit needs new widgets only.
- Widgets need a small amount of glue to map toolkit events to interaction objects.
© 2026 Umberto Sorbo. The software is licensed under the Apache License, Version 2.0, and provided “as is”, without warranties or conditions of any kind; see the disclaimer.
SHUFFLE Framework and the SHUFFLE Framework logo are trademarks of Umberto Sorbo; the licence grants no rights to them (trademarks). Other names belong to their owners. Fonts: IBM Plex Sans and JetBrains Mono, SIL Open Font License 1.1.
Contact: shuffleframework@gmail.com · Instagram @shuffleframework. Security problems: write to the same address with “Security” in the subject, not in a public issue.