 : smash-pane ( pane -- gadget )
     [ pane-nl ] [ output>> smash-line ] bi ;
 
-: pane-write ( seq pane -- )
-    [ pane-nl ] [ current>> stream-write ]
+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 ;
 
-: pane-format ( seq style pane -- )
-    [ nip pane-nl ] [ current>> stream-format ]
+M: pane pane-format
+    [ nip pane-nl ] [ current>> pane-format ]
     bi-curry bi-curry interleave ;
 
 : do-pane-stream ( pane-stream quot -- )

    [ pane-nl ] do-pane-stream ;

M: pane-stream stream-write1
    [ current>> stream-write1 ] do-pane-stream ;

: split-pane ( str quot: ( str -- ) -- )
    '[

    [ [ empty-output? ] 2keep ] dip
    '[ _ _ swap <styled-label> _ swap add-gadget drop ] unless ;

M: pack pane-format
    gadget-format ;

M: paragraph pane-format
    over { presented image-style } [ swap key? ] with any? [
        gadget-format
    ] [
