This is the text-draw Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Jul 13 22:09:56 2025 GMT+0.
The main system appears first, followed by any subsystem dependency.
text-draw
A utility library to draw nice presentations in pure text.
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shinmera/text-draw.git)
zlib
1.0.0
documentation-utils
(system).
package.lisp
(file).
toolkit.lisp
(file).
styles.lisp
(file).
draw.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
text-draw/text-draw.asd
text-draw/package.lisp
text-draw/toolkit.lisp
text-draw/styles.lisp
text-draw/draw.lisp
text-draw/documentation.lisp
text-draw/toolkit.lisp
package.lisp
(file).
text-draw
(system).
split
(function).
white-char-p
(function).
with-normalized-stream
(macro).
wrap-char-p
(function).
text-draw/styles.lisp
toolkit.lisp
(file).
text-draw
(system).
arrow
(function).
background
(function).
style
(function).
*here*
(special variable).
*styles*
(special variable).
load-styles
(function).
text-draw/draw.lisp
styles.lisp
(file).
text-draw
(system).
align
(function).
box
(function).
check
(function).
compose
(macro).
composite
(function).
fill
(function).
horizontal-line
(function).
line
(function).
node
(function).
pad
(function).
plot
(function).
progress
(function).
radio
(function).
rows
(function).
table
(function).
translate
(function).
tree
(function).
vertical-line
(function).
Packages are listed by definition order.
org.shirakumo.text-draw
common-lisp
.
align
(function).
alignment
(function).
arrow
(function).
background
(function).
box
(function).
check
(function).
compose
(macro).
composite
(function).
fill
(function).
horizontal-line
(function).
line
(function).
lines
(function).
node
(function).
pad
(function).
plot
(function).
progress
(function).
radio
(function).
rows
(function).
style
(function).
table
(function).
translate
(function).
tree
(function).
vertical-line
(function).
width
(function).
wrap
(function).
*here*
(special variable).
*styles*
(special variable).
load-styles
(function).
split
(function).
white-char-p
(function).
with-normalized-stream
(macro).
wrap-char-p
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Convenience shorthand to composite shapes together.
Each PART should be a list composed of the X and Y offset and the
string of the block to compose. Eg:
(compose T
(0 0 (fill 20 11))
(6 4 (box "Hello")))
STREAM should be a format stream designator.
Aligns a text block to produce a fixed width block of lines.
ALIGNMENT designates how the text block is aligned within the box.
STREAM should be a format stream designator.
See ALIGNMENT
Returns the number of characters to insert to achieve the desired alignment.
Returns a cons with the characters on the left and right hand sides of
the line to insert.
ALIGNMENT can be one of :LEFT :RIGHT :MIDDLE :CENTER.
Return an arrow character.
DIR can be one of
:LEFT :WEST
:RIGHT :EAST
:UP :NORTH
:DOWN :SOUTH
:UP-DOWN :NORTH-SOUTH
:LEFT-RIGHT :EAST-WEST
TYPE can be one of:
:HEAD
:LIGHT-HEAD
:EMPTY-HEAD
:TRIANGLE
:LIGHT
T :NORMAL
:HEAVY
:LARGE
:VERY-HEAVY
:DOUBLE
:CIRCLE
:FULL-CIRCLE
:DIAMOND
:FULL-DIAMOND
Return a background character.
TYPE can be one of:
:TRANSPARENT
T :WHITE
:BLACK
:DARK-GRAY
:GRAY
:LIGHT-GRAY
Surrounds the TEXT with a box.
WIDTH designates the width of the box. If NIL or T the box fits the
given text block. If the text is made up of lines that exceed the
width of the box, the text is wrapped automatically.
ALIGN designates how the text block is aligned within the box.
BACKGROUND designates the background of the box.
STREAM should be a format stream designator.
See ALIGNMENT
See BACKGROUND
See WRAP
Generates a simple checkbox.
If LABEL is given it is printed next to the checkbox.
STREAM should be a format stream designator.
Composites two text blocks together.
A-OFFSET and B-OFFSET should be conses of X and Y offsets to apply to
the respective blocks before compositing.
When compositing, B is overlaid on top of A in such a way that any
character in B takes precedence unless that character is a whitespace
character that isn’t a non-breaking space.
Effectively this means that the non-breaking space is considered
"opaque", and all other white space is "transparent."
STREAM should be a format stream designator.
Fill a block with a background pattern.
STREAM should be a format stream designator.
See BACKGROUND
Generates a horizontally oriented line.
START and END if given designate the arrowheads to draw at either end
of the line.
BEND can be one of :LEFT :START :RIGHT :END :MIDDLE :CENTER and
designates where in the line a bend should be generated when HEIGHT is
greater than one.
STREAM should be a format stream designator.
See ARROW
Generates a line.
If the width is greater or equal to the height a horizontal line is
generated, otherwise a vertical one.
See HORIZONTAL-LINE
See VERTICAL-LINE
Returns a list of lines from the split text.
Print a flow chart node with the given input and output ports.
Both INPUTs and OUTPUTs should be lists of port entries. Each port
entry should either be the name of the port or a cons consisting of
the name and the value connected at that port.
LABEL if given designates the label in the center of the node to
print.
BACKGROUND designates the background of the node box.
STREAM should be a format stream designator.
See BACKGROUND
Pads the text block on all sides by SIZE.
SIZE may either be an integer, or a list designating the padding to
add on each side in order of LEFT TOP RIGHT BOTTOM.
BACKGROUND designates the fill character of the padding.
STREAM should be a format stream designator.
See BACKGROUND
Generates a plot.
The plot is generated according to the output of FUNCTION for values
within the region of [LEFT, RIGHT], and clamped into the range of
[BOTTOM, TOP]. If either BOTTOM or TOP are not given, they are
computed based on the values of FUNCTION.
The output has an area as given by WIDTH and HEIGHT, which includes a
border that denotes the axis values, meaning the actual plot has an
area of WIDTH-2 x HEIGHT-2.
STREAM should be a format stream designator.
Prints a simple progress bar filled to PERCENTAGE.
If the percentage is outside of [0,100] then the bar is either
entirely empty or entirely full.
When LABEL is T, some of WIDTH is taken up to print the percentage as
a number label.
STREAM should be a format stream designator.
Generates a simple radio button
If LABEL is given it is printed next to the radio button.
STREAM should be a format stream designator.
Fuse a couple of parts together via new lines.
Returns a new string with each PART on a line.
Returns the text transformed into the given style.
STYLE can be one of:
:sans
:bold
:italic
:bold-italic
:serif
:serif-bold
:serif-italic
:serif-bold-italic
:script
:script-bold
:fraktur
:fraktur-bold
:monospace
:doublestruck
Note that by far not all characters support all of these styles. The text is transformed on a best-effort basis.
Format tabular data.
The TABLE should be a list of lists, with each inner list being a row
and each row having the same number of columns.
BORDERS designates whether borders should be drawn around the cells or
not.
PADDING sets the number of spaces to surround each cell’s contents by.
STREAM should be a format stream designator.
Translates the given string block by X and Y.
This is the same as adding padding on the respective sides of the
block.
STREAM should be a format stream designator.
Format a tree structure.
ROOT is the first element at the root. CHILDREN-FUN should be a
function of one argument (a node in the tree) that returns a SEQUENCE
of child nodes for that node.
KEY should be a function that takes a node and whose return value is
used to print the node’s entry in the tree.
MAX-DEPTH should be the maximum depth to which the tree is printed.
Entries at a depth below that are abbreviated via three dots. If NIL
or T are passed, no max depth is applied.
STREAM should be a format stream designator.
Generates a vertically oriented line.
START and END if given designate the arrowheads to draw at either end
of the line.
BEND can be one of :TOP :START :BOTTOM :END :MIDDLE :CENTER and
designates where in the line a bend should be generated when WIDTH is
greater than one.
STREAM should be a format stream designator.
See ARROW
Returns the width of the text block respecting line feeds.
Perform line wrapping on a block of text.
Returns a list of text lines.
Wrapping is performed on every Linefeed and Return, and if the current
line exceeds WIDTH number of characters. In the latter case, a line is
wrapped at the last whitespace position if there is one within the
current line, or at the width if there is not. Whitespace excluding
the non-breaking space is trimmed from ends and starts of lines.
Jump to: | A B C F H L M N P R S T V W |
---|
Jump to: | A B C F H L M N P R S T V W |
---|
Jump to: | *
S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*here* : | Private special variables | ||
*styles* : | Private special variables | ||
| |||
S | |||
Special Variable, *here* : | Private special variables | ||
Special Variable, *styles* : | Private special variables | ||
|
Jump to: | *
S |
---|
Jump to: | D F O P S T |
---|
Jump to: | D F O P S T |
---|