 
 M: pane gadget-selection? pane-caret&mark and ;
 
-M: pane gadget-selection ( pane -- string/f )
-    selected-subtree gadget-text ;
+M: pane gadget-selection selected-subtree gadget-text ;
 
 : init-prototype ( pane -- pane )
     <shelf> +baseline+ >>align >>prototype ; inline

        add-incremental
    ] [ next-line ] bi ;

: smash-pane ( pane -- gadget )
    [ pane-nl ] [ output>> smash-line ] bi ;

GENERIC: pane-write ( str gadget -- )
GENERIC: pane-write1 ( char gadget -- )
GENERIC: pane-format ( str style gadget -- )

M: pane pane-write
    [ pane-nl ] [ current>> pane-write ]
    bi-curry interleave ;

M: pane pane-format
    [ nip pane-nl ] [ current>> pane-format ]
    bi-curry bi-curry interleave ;

: do-pane-stream ( pane-stream quot -- )
    [ pane>> ] dip keep scroll-pane ; inline

} set-gestures

GENERIC: content-gadget ( object -- gadget/f )

M: object content-gadget drop f ;
