Handbook
Glossary
make-block-stream ( style stream -- stream' )
Factor handbook
»
Input and output
»
Formatted output
»
Formatted stream protocol
Prev:
make-span-stream ( style stream -- stream' )
Next:
make-cell-stream ( style stream -- stream' )
Vocabulary
io
.
styles
Inputs
style
an
assoc
stream
an output stream
Outputs
stream'
an output stream
Generic word contract
Creates an output stream which wraps
stream
and adds
style
on calls to
stream-write
and
stream-format
.
Unlike
make-span-stream
, this creates a new paragraph block in the output.
The
style
hashtable holds paragraph style information. See
Paragraph styles
.
Notes
Most code only works on one stream at a time and should instead use
with-nesting
; see
Default input and output streams
.
Errors
Throws an error if the I/O operation fails.
Definition
IN:
io.styles
GENERIC:
make-block-stream
( style stream -- stream' )
Methods
USING:
io.streams.256color.private
io.styles
kernel
;
M:
256color
make-block-stream
swap
<style-stream>
<ignore-close-stream>
;
USING:
io.streams.ansi.private
io.styles
kernel
;
M:
ansi
make-block-stream
swap
<style-stream>
<ignore-close-stream>
;
USING:
accessors
io.streams.duplex
io.styles
kernel
;
M:
duplex-stream
make-block-stream
[
out>>
]
call
\
make-block-stream
execute
;
USING:
accessors
io.styles
kernel
;
M:
filter-writer
make-block-stream
[
stream>>
]
call
\
make-block-stream
execute
;
USING:
html.streams
html.streams.private
io.styles
;
M:
html-writer
make-block-stream
html-block-stream
new-html-sub-stream
;
USING:
io.styles
ui.gadgets.panes
ui.gadgets.panes.private
;
M:
pane-stream
make-block-stream
<styled-pane-stream>
;
USING:
io.styles
pdf.streams
;
M:
pdf-writer
make-block-stream
pdf-block-stream
new-pdf-sub-stream
;
USING:
io.streams.plain
io.styles
kernel
;
M:
plain-writer
make-block-stream
nip
<ignore-close-stream>
;
USING:
io.styles
io.styles.private
;
M:
style-stream
make-block-stream
nested-style
make-block-stream
;