The function set-rich-text-pane-paragraph-format
sets paragraph attributes for the current paragraphs in
pane
.
The current paragraphs are those paragraphs which overlap the current selection, or the paragraph containing the insertion point if there is no selection.
If
attributes-plist
is the symbol :default
then the default paragraph format of the
pane
is used. Otherwise
attributes-plist
is a plist of keywords and values. These are the valid keywords on Microsoft Windows and Cocoa:
:left
, :right
or :center
.
A number setting the indentation.
A number modifying the indentation.
A number setting the relative indentation of subsequent lines in a paragraph.
A number setting the right margin.
A list of numbers.
Additionally this attributes-list keyword is valid on Microsoft Windows, only:
nil
, t
, :bullet
, :arabic
, :lowercase
, :uppercase
, :lower-roman
or :upper-roman
.
numbering
specifies the numbering style. Rich Edit 3.0 supports all the above values of
numbering
. Please note that the Arabic and Roman styles start numbering from zero, and that only t
and :bullet
work with versions of Rich Edit before 3.0 (other values of
numbering
are quietly ignored).
start-indent specifies the indentation of the first line of a paragraph. A negative value removes the indentation.
offset-indent takes effect only when start-indent is not passed. It specifies an increase in the current indentation. Therefore, a negative value of offset-indent decreases the indentation.
offset specifies the offset of the second and following lines relative to the first line of the paragraph. That is, when the indentation of the first line is indent , the indentation of the second and subsequent lines is indent + offset . When offset is negative, the second and subsequent lines are indented less than the first line. If indent + offset is negative, then these lines are not indented.
tab-stops should be a list of numbers specifying the locations of tabs. No more than 32 tabs are allowed.
(setq rtp
(capi:contain
(make-instance
'capi:rich-text-pane
:visible-min-height 300
:visible-min-width 400
:paragraph-format
'(:start-indent 20 :offset -15)
:text (format nil "First paragraph.~%Second paragraph, a little longer.~%Another paragraph, which should be long long enough that it spans more than one line. ~%" ))))
(capi:set-rich-text-pane-paragraph-format
rtp '(:offset-indent 30 :numbering :lowercase))
CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015