Handbook
Glossary
short-section ( section -- )
Factor handbook
»
Developer tools
»
The prettyprinter
»
Extending the prettyprinter
»
Prettyprinter sections
»
Prettyprinter section protocol
Prev:
short-section? ( section -- ? )
Next:
long-section ( section -- )
Vocabulary
prettyprint
.
sections
Inputs
section
a
section
Outputs
None
Generic word contract
Prints a section which fits in the current line. This should use a layout strategy maximizing line length and minimizing white space.
Definition
IN:
prettyprint.sections
GENERIC:
short-section
( section -- )
Methods
USING:
prettyprint.sections
;
M:
block
short-section
[
advance
]
pprint-sections
;
USING:
accessors
images.viewer
images.viewer.prettyprint
io
namespaces
prettyprint.sections
ui.gadgets.panes
;
M:
image-section
short-section
image>>
<image-gadget>
output-stream
get
write-gadget
;
USING:
kernel
prettyprint.sections
;
M:
line-break
short-section
drop
;
USING:
accessors
io
prettyprint.sections
;
M:
text-section
short-section
string>>
write
;