     { mouse-enter show-mouse-help }
     { mouse-leave hide-mouse-help }
     { motion show-mouse-help }
+    { T{ button-down f { C+ } 1 } thru-button-down }
     { T{ button-down f { A+ } 1 } continued-button-down }
-    { T{ button-down f { S+ } 1 } thru-button-down }
+    { T{ button-up } table-button-up }
     { T{ button-down } table-button-down }
-    { T{ button-up } table-button-up }
     { gain-focus focus-table }
     { lose-focus unfocus-table }
     { T{ drag } table-button-down }

: table-button-down ( table -- ) [ (select-row) ] swap (table-button-down) ;
: continued-button-down ( table -- ) dup multiple-selection?>> [ [ add-selected-row ] swap (table-button-down) ] [ table-button-down ] if ;
: thru-button-down ( table -- ) dup multiple-selection?>> [
    [ over selected-index>> (a,b] over
      [ swap push-selected-index drop ] curry each continued-button-down ]
    swap (table-button-down) ] [ table-button-down ] if ;

PRIVATE>

ui.gadgets.status-bar ui.gadgets.worlds ui.gestures ui.render ui.pens.solid
ui.text ui.commands ui.images ui.gadgets.menus ui.gadgets.line-support
math.rectangles models math.ranges sequences combinators
combinators.short-circuit fonts locals strings vectors tools.annotations ;
IN: ui.gadgets.tables

! Row rendererer protocol
