What
Build src/hitbox.sh — a widget bounding-box registry for mouse routing.
API:
shellframe_widget_register name top left width height — registers a widget's bounding box by name. Coordinates are 1-based terminal rows/columns.
shellframe_widget_at row col — returns the name of the widget whose bounding box contains (row, col), or empty string if none. Last-registered wins on overlap.
shellframe_widget_clear — clears all registered widgets (call on full repaint).
Implemented as parallel arrays keyed by registration order; name lookup iterates from last to first so later registrations shadow earlier ones.
Files
src/hitbox.sh — new module (register, at, clear, parallel arrays)
src/shellframe.sh — source hitbox.sh
Done criteria
Effort
M (~half day)
Deps
What
Build
src/hitbox.sh— a widget bounding-box registry for mouse routing.API:
shellframe_widget_register name top left width height— registers a widget's bounding box by name. Coordinates are 1-based terminal rows/columns.shellframe_widget_at row col— returns the name of the widget whose bounding box contains (row, col), or empty string if none. Last-registered wins on overlap.shellframe_widget_clear— clears all registered widgets (call on full repaint).Implemented as parallel arrays keyed by registration order; name lookup iterates from last to first so later registrations shadow earlier ones.
Files
src/hitbox.sh— new module (register, at, clear, parallel arrays)src/shellframe.sh— sourcehitbox.shDone criteria
shellframe_widget_registerstores bounding box correctlyshellframe_widget_atreturns the correct widget name for a point inside a registered boxshellframe_widget_atreturns empty string for a point outside all boxesshellframe_widget_clearfully resets statetests/unit/test-hitbox.sh: single widget, multiple non-overlapping widgets, point outside all, overlapEffort
M (~half day)
Deps