Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version


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 default 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 cg-rich-text.htm for information about rich text editing in Common Graphics.

GTK note

Formated editable text is not yet implemented on the GTK platform. It appears feasible to implement functions such as set-character-format and set-paragraph-format that modify the text formatting of an edit control, but not to implement functions such as rich-text and rich-edit-range that handle actual rich text strings.

Attempting to create a rich-edit widget or a rich-edit-pane window currently will error on GTK.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version