summaryrefslogtreecommitdiff
path: root/fw/lib/svc/fw.ether0
diff options
context:
space:
mode:
authorCalvin Morrison <calvin@pobox.com>2026-08-22 19:12:01 -0400
committerCalvin Morrison <calvin@pobox.com>2026-08-22 19:12:01 -0400
commit77c7bc9b187450818ec068239a3ae836d01fdebc (patch)
tree9615997000c722687f9f69bbbe38cd00a3ce8315 /fw/lib/svc/fw.ether0
parentba00c7dab8ea982fc3fdbfc7062234adbe1fcc0e (diff)
gui: a widget layer, so the next program does not write one
cal9 had grown its own: borders drawn four fills at a time in two places, a button-3 menu, hit regions, buttons, text wrapping. None of that is about calendars, and a second program would have written it again, differently. It lives in gui/ui now. It is a kit and not a framework. Every call draws a thing and, where it makes sense, records where it drew it; the program keeps its own event loop and its own idea of what to redraw. Menu takes a redraw function rather than calling back into anything. The moment the library owns the loop it stops being usable by the next program, which was the problem being fixed. Body is the fix for two bugs that turned out to be one. rio draws a window's border into the client's own image and puts corner cursors in it, taking those clicks before the client sees them: the border is rio's resize handle. Filling the whole rectangle erased it, so the border vanished and so did resizing. Drawing inside Body gives both back, and the drag-to-resize cal9 had grown -- which could only ever shrink, since a window stops getting mouse events once the pointer leaves it -- was deleted rather than fixed. Field is one line of editable text with a cursor, backspace, ^U and a paste from /dev/snarf. No selection, no mouse placement, no history: a form asking for a summary and a time needs none of them and each is somewhere to be subtly wrong. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'fw/lib/svc/fw.ether0')
0 files changed, 0 insertions, 0 deletions