     dup control-value empty? [ drop ] [
         origin get [
             {
-                [ draw-selected ]
+                [ draw-selected-row ]
                 [ draw-columns ]
                 [ draw-lines ]
-                [ draw-moused ]
+                [ draw-focused-row ]
+                [ draw-moused-row ]
             } cleave
         ] with-translation
     ] if ;

M: object row-color 2drop f ;

TUPLE: table < gadget
renderer filled-column column-alignment action hook
column-widths total-width
font selection-color focus-border-color
mouse-color column-line-color selection-required?

PRIVATE>

: row-action ( table -- )
    dup selected-row
    [ swap [ action>> call ] [ hook>> call ] bi ]
    [ 2drop ]
    if ;

<PRIVATE

: table-button-up ( table -- )
    dup single-click?>> hand-click# get 2 = or
    [ row-action ] [ update-selected-value ] if ;

: select-row ( table n -- )
