summaryrefslogtreecommitdiffhomepage
path: root/DESIGN.md
diff options
context:
space:
mode:
authorSean Kurtz <seankurtz75@gmail.com>2026-11-25 21:55:37 -0600
committerSean Kurtz <seankurtz75@gmail.com>2026-11-25 21:56:07 -0600
commit8a85eb0a61c4deaa337f49f437e00710fc940556 (patch)
tree5a29d916b67da9a73be318c90271cb5656a5431d /DESIGN.md
parent431855189a87388c323787d668e0698cbfefef30 (diff)
downloadztop-feature/mouse.tar.gz
tui: mouse messages; ztop: clickable tabs, wheel, better helpfeature/mouse
Enable xterm SGR mouse reporting and decode it into TUI_MSG_MOUSE. ztop uses it for the view tabs, the storage sub-tabs, table rows and the wheel. The help panel now lists navigation explicitly, and the status line shows the keys for the current view.
Diffstat (limited to 'DESIGN.md')
-rw-r--r--DESIGN.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/DESIGN.md b/DESIGN.md
index 23cfa5a..bf0a6e0 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -148,7 +148,10 @@ the terminal code out of the application and gives every view the same
keys. The widgets are a viewport with its own selection and scroll
offset, a table built from columns and a cell callback, tabs, a single
line input, a progress bar and a status line; an application that wants no
-tabs simply never draws them. Commands and subscriptions are not modelled:
+tabs simply never draws them. The mouse is part of the message loop: SGR
+mouse reporting (1006) turns a click into a `TUI_MSG_MOUSE` with 0-based
+cells, and `tui_tabs_hit` answers which tab a column belongs to, so the
+application decides what a click means. Commands and subscriptions are not modelled:
a tick message and a return value saying "redraw" are enough here, and a
`Cmd` type in C would be a function pointer by another name.