Well, you girls and guys are making cool things, and I have some progress to show as well. 😅
https://movq.de/v/c0408a80b1/movwin.mp4
Scrolling widgets appears to work now. This is (mostly) Unicode-aware: Note how emojis like “😅” are double-width “characters” and the widget system knows this. It doesn’t try to place a “😅” in a location where there’s only one cell available.
Same goes for that weird “ä” thingie, which is actually “a” followed by U+0308 (a combining diacritic). Python itself thinks of this as two “characters”, but they only occupy one cell on the screen. (Assuming your terminal supports this …)
This library does the heavy Unicode lifting: https://github.com/jquast/wcwidth (Take a look at its implementation to learn how horrible Unicode and human languages are.)
The program itself looks like this, it’s a proper widget hierarchy:
https://movq.de/v/1d155106e2/s.png
(There is no input handling yet, hence some things are hardwired for the moment.)
#yiihgta
(#yiihgta) @movq@www.uninformativ.de Is this on yout little toy OS? 🤔
#rddwluq
(#yiihgta) @prologic@twtxt.net No, that’s Python/curses on Linux. 😅
#hebmzgq
(#yiihgta) @movq@www.uninformativ.de That’s cool! I also like the name of your library. :-) I assume you made the thing load quickly, didn’t you?
#2p27wba