NextPrevUpTopContentsIndex

rich-text-pane

Class
Summary

A text pane with extended formatting.

Package

capi

Superclasses

simple-pane

Initargs

:character-format

A plist.

:paragraph-format

A plist.

:change-callback

A function called when a change is made.

:protected-callback

A function determining whether the user may edit a protected part of the text.

:filename

A file to display.

:text

A string or nil .

:text-limit

An integer.

Accessors

rich-text-pane-change-callback
rich-text-pane-limit
rich-text-pane-text

Description

The class rich-text-pane provides a text editor which supports character and paragraph formatting of its text.

Note: rich-text-pane is supported only on MS Windows, and Cocoa in Mac OS X 10.3 and later. Some of its features are supported only on MS Windows, as mentioned below.

character-format is the default character format. It is a plist which is interpreted in the same way as the attributes-plist argument of set-rich-text-pane-character-format. The default value of character-format is nil .

paragraph-format is the default paragraph format. It is a plist which is interpreted in the same way as the attributes-plist argument of set-rich-text-pane-paragraph-format. The default value of paragraph-format is nil .

change-callback , if non- nil , is a function of two arguments: the pane itself, and a keyword denoting the type of change. This second argument is either :text or :selection . The default value of change-callback is nil .

protected-callback is a function of four arguments: the pane itself, bounding indexes of the protected text, and a booleanwhich is true when the change would affect the selection. If the change would affect just a single character, this last argument is nil . If protected-callback returns nil , then the change is not performed. protected-callback is supported only on MS Windows.

filename , if non- nil , should be a string or pathname naming a file to display in the pane. filename takes precedence over text if both are non- nil .

text , if non- nil , should be a string which is displayed in the pane if filename is nil .

text-limit , if non- nil , should be an integer which is an upper bound for the length of text displayed in the pane.

Note: change-callback and protected-callback are not yet implemented on Cocoa.

Note: The functions that are specific to rich-text-pane cannot be called before the pane is created. If you need to perform operations on the pane before it appears, and which cannot be performed using the initargs, the best approach is to define an :after method on interface-display on the class of the interface containing the rich-text-pane , and perform the operations inside this method.

See also

print-rich-text-pane
rich-text-pane-character-format
rich-text-pane-operation
set-rich-text-pane-character-format
rich-text-pane-paragraph-format
set-rich-text-pane-paragraph-format


LispWorks CAPI Reference Manual - 25 Jul 2006

NextPrevUpTopContentsIndex