A TVision/Turbo-Vision style character-cell UI toolkit written in ISO GNU
Modula-2 (gm2 -fiso) for the terminal, developed alongside the tigr and
microui bindings in this repository. No C source and no graphics
dependency; the only non-Modula-2 part is the libc binding tvtty.def.
Working milestone: a retained view tree with clipping and z-order, a diffed ANSI screen, keyboard + mouse input, widgets and modal dialogs. Builds warning-free and was exercised by driving a real pty (frames reconstructed from the captured terminal stream).
| file | role |
|---|---|
tvtty.def |
libc binding: raw mode, winsize, read/write |
tv.def / tv.mod |
screen, view tree, widgets, events, modal dialog |
demo.mod |
demo application (two windows, all widgets, mouse) |
ttysize.mod |
diagnostic for the tty binding |
Makefile |
build |
README.md |
build/run + API + GM2 notes |
X close box.Message dialog with its own event loop.F10 to open, Left/Right switch
menus, Up/Down move, Enter/Space or click selects (returns the item tag);
separators supported.Driving the demo through a pty and reconstructing the screen:
OK with the mouse opens the modal Info box;File title opens the drop-down (New/Open/Sep/Quit), F10
Quit exits the program.Message is the only dialog helper; no generic form dialog.SIGWINCH-driven relayout).See README.md: value-returning no-arg procedures need () in the .def;
pointer fields need ^; a BEGIN...END block cannot be a CASE branch;
INTEGER vs HIGH() comparisons need VAL; termios/winsize use fixed Linux
offsets. A subtle runtime bug was found and fixed in the ANSI output: SGR
attributes accumulate, so blink must be emitted explicitly as ;5/;25 or
it leaks into every following cell.