A string.
A displayed CAPI pane.
An integer or
nil
.
An integer or
nil
.
A font object.
An integer.
An integer or
nil
.
The function
wrap-text-for-pane
takes a string
text
and returns a list of strings. Together the strings in
strings
contain all the non-whitespace characters of
text
and are suitable for displaying this text on
pane
. That is, each string has a display width no greater than the width of
pane
when drawn using the font of
pane
. The arguments
start
and
end
are used as bounding index designators for
text
and characters outside these bounds are ignored.
If
visible-width
is non-
nil
then text is wrapped to that width. Otherwise, if
external-width
is non-
nil
then text is wrapped as if the pane had that external width (that is, taking account of any borders in the pane). If both
visible-width
and
external-width
are
nil
, then the text is wrapped to the current visible width of the pane. The default value of both
visible-width
and
external-width
is
nil
.
The
font
is used to perform the wrapping calculations. If it is
nil
(the default), then the
graphics-state-font
is used for panes such as output-pane that have a
graphics-state
and the
simple-pane-font
is used for other panes.