set-character-format

Generic Function

Package: common-graphics

Arguments: window &rest args&key (scope :all) face bold italic underline (style t) height color

This function modifies the formatting of text in a rich-edit-pane. Depending on the value of the scope argument, the modification applies to all text or can be limited to selected text or text about the cursor.

window is a text-edit-pane and is typically a rich-edit-pane (a subclass of text-edit-pane). Note that neither a text-edit-window (typically the parent of a text-edit-pane) nor a rich-edit control are valid arguments to this function. Applying window to a rich-edit control results in a suitable argument, however.

scope is one of:

The default for scope is currently :all, but it arguably should be :selection. It is recommended that you always pass this argument so that your code will not need to change if the deafult is changed.

face and height are either as passed to make-font-ex or else nil for no change to that attribute. Note that height is interpreted as point-size rather than the usual common graphics pixel-size, due to lack of a means of converting this measurement for character formatting. Point-size is what appears in the font dialog.

color is an rgb color object (see make-rgb) or nil to not change the color.

style may be a list as passed to make-font-ex, or t for no change.

bold, italic, and underline can each be either :on or :off to change that attribute, or nil for no change; true values will override the style argument.

See also get-character-format.

See About Rich Text Editing in Common Graphics in cgide.htm.

Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.