by adamnemecek · 6y ago · 0 comments
Here's another nanovg based gui toolkit in cpp https://github.com/wjakob/nanogui
Thanks to Rust macros, you can shape the language to be essentially whatever you want.
I think that ECS (entity component system https://en.wikipedia.org/wiki/Entity_component_system) is the way go with GUIs.
I like the control a lot, with Cocoa, I felt really constrained sometimes.
A key point of a shared UI toolkit is that users can bring their knowledge from one app to another. A standard Cocoa table view or text view has tons of advanced behaviors: type select, keyboard shortcuts, etc. It's worth the user's time to learn these because they work in every app.
But apps where these don't work feel discordant and frustrating.
Honestly, don't let these comments get you down. It's important to act strategically of course, so it doesn't make sense to over-invest in an idea succeeding. But it makes sense to do scoped experiments / proof-of-concepts. I don't think we're "done" with UI framework architecture design, people need to keep trying new things in the space. And I also don't think only Apple (eg. SwiftUI) and Google (eg. Flutter) are allowed to work on these things and we need to accept their gifts from above. Some times, a good quality here is almost not believing that something is too hard to do (while obviously also informing oneself about as much existing work there has been as possible to incorporate it into the experiments).
Yeah. Once you add hierarchy, event handling, windowing, and layout to a rendering engine you pretty much have a basic toolkit.
Kind of like once you've hand built a cpu, gpu, logic board, hard drive, and so on, on top of 3d-printing a case, you have a basic PC.
tree views (with non-textual cells)?
nested menus?
file selection dialog?
Drawing buttons and windows is easy, the problem is the rest.
UI platforms as a rule are always terrible, but there’s inevitably a whole lot of baby in the bath water.
It's not baby with the bathwater, the second you want something cross platform, your choices are electron or qt? Neither is that great of an option.
Last year Voice Control: https://www.apple.com/macos/catalina/docs/Voice_Control_Tech... came out and is absolutely stunning and free with accessibility labels.
A custom UI would force them into “grid mode” on page 6 off the bat while it’s almost too easy if you just stay native, UI tests interact with the app through accessibility labels for example, and obviously we’re all testing, right?
Simply riding closely on the back of the behemoth that’s weirdly good about accessibility gets one very far, very fast.