make-cell-stream ( style stream -- stream' )
Factor documentation > Factor handbook > Input and output > Formatted output > Formatted stream protocol

Prev:make-block-stream ( style stream -- stream' )
Next:stream-write-table ( table-cells style stream -- )


Inputs and outputs
stylean assoc
streaman output stream
stream'an object

Generic word contract
Creates an output stream which writes to a table cell object.

Most code only works on one stream at a time and should instead use with-cell; see Default input and output streams.

Throws an error if the I/O operation fails.

IN: io.styles

GENERIC: make-cell-stream ( style stream -- stream' )

USING: io.streams.256color.private io.streams.string io.styles
kernel ;

M: 256color make-cell-stream 2drop <string-writer> <256color> ;

USING: io.streams.ansi.private io.streams.string io.styles
kernel ;

M: ansi make-cell-stream 2drop <string-writer> <ansi> ;

USING: accessors io.streams.duplex io.styles kernel ;

M: duplex-stream make-cell-stream
[ out>> ] call \ make-cell-stream execute ;

USING: accessors io.styles kernel ;

M: filter-writer make-cell-stream
[ stream>> ] call \ make-cell-stream execute ;

USING: html.streams html.streams.private io.styles ;

M: html-writer make-cell-stream
html-sub-stream new-html-sub-stream ;

USING: io.styles ui.gadgets.panes ui.gadgets.panes.private ;

M: pane-stream make-cell-stream
pane-cell-stream new-nested-pane-stream ;

USING: io.styles pdf.streams ;

M: pdf-writer make-cell-stream
pdf-sub-stream new-pdf-sub-stream ;

USING: io.streams.plain io.streams.string io.styles kernel ;

M: plain-writer make-cell-stream 2drop <string-writer> ;

USING: accessors io.styles kernel ;

M: style-stream make-cell-stream
[ do-nested-style make-cell-stream ] [ style>> ] bi
<style-stream> ;