What
Wire mouse events from parsed SGR sequences (#32) through the hit-test registry (#31) to widget on_mouse handlers.
App shell changes (src/shell.sh):
- When
shellframe_read_key returns SHELLFRAME_KEY_MOUSE, call shellframe_widget_at $SHELLFRAME_MOUSE_ROW $SHELLFRAME_MOUSE_COL to identify the target widget.
- If the target widget is not focused, call
shellframe_shell_focus_set to move focus to it (click-to-focus).
- Dispatch to the target widget's
on_mouse handler: ${PREFIX}_on_mouse "$SHELLFRAME_MOUSE_BUTTON" "$SHELLFRAME_MOUSE_ACTION" "$SHELLFRAME_MOUSE_ROW" "$SHELLFRAME_MOUSE_COL".
Widget on_mouse handlers:
shellframe_list_on_mouse — click on a row sets selection to that row; scroll-wheel scrolls the list
shellframe_scroll_on_mouse — scroll-wheel scrolls the container (used by editor, grid)
- Other widgets: click-to-focus only (no additional action needed for v1)
Files
src/shell.sh — mouse dispatch in main loop
src/widgets/list.sh — shellframe_list_on_mouse
src/scroll.sh — scroll-wheel handler (used by list, editor, grid)
Done criteria
Effort
M (~half day)
Deps
What
Wire mouse events from parsed SGR sequences (#32) through the hit-test registry (#31) to widget
on_mousehandlers.App shell changes (
src/shell.sh):shellframe_read_keyreturnsSHELLFRAME_KEY_MOUSE, callshellframe_widget_at $SHELLFRAME_MOUSE_ROW $SHELLFRAME_MOUSE_COLto identify the target widget.shellframe_shell_focus_setto move focus to it (click-to-focus).on_mousehandler:${PREFIX}_on_mouse "$SHELLFRAME_MOUSE_BUTTON" "$SHELLFRAME_MOUSE_ACTION" "$SHELLFRAME_MOUSE_ROW" "$SHELLFRAME_MOUSE_COL".Widget
on_mousehandlers:shellframe_list_on_mouse— click on a row sets selection to that row; scroll-wheel scrolls the listshellframe_scroll_on_mouse— scroll-wheel scrolls the container (used by editor, grid)Files
src/shell.sh— mouse dispatch in main loopsrc/widgets/list.sh—shellframe_list_on_mousesrc/scroll.sh— scroll-wheel handler (used by list, editor, grid)Done criteria
Effort
M (~half day)
Deps