Generic Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## get-character-format

Arguments: window &key (scope :selection)

Depending on the value of the scope keyword argument, returns the default format of the window or the format of the first character of the selected text.

window must be an instance of a `text-edit-pane` (a `rich-edit-pane` is such an instance). Note that neither a `text-edit-window`, typically the parent of a text-edit-pane, or a `rich-edit` control are acceptable arguments, though the result of applying window to a rich-edit control is acceptable.

scope is either :default or :selection, and controls the returned value. If it is :selection, then details of the format of the first character of the currently selected text are returned. If it is :default, then details of the default character formatting for the window are returned.

The formatting details are returned as multiple values. The "same-foo" values shown here are valid only when scope is :selection. Here are the returned values in order:

- face: the keyword symbol for the font face
- bold: true if the character is bold
- italic: true if the character is italic
- underline: true if the character is underlined
- height: the point-size of the font of the character
- color: the rgb color of the character (see make-rgb)
- same-face: true if the whole selection is the same face (returned value has no meaning when scope is :default)
- same-bold: true if the whole selection is either all bold or all non-bold (returned value has no meaning when scope is :default)
- same-italic: true if the whole selection is either all italic or all non-italic (returned value has no meaning when scope is :default)
- same-underline: true if the whole selection is either all underlined or all non-underlined (returned value has no meaning when scope is :default)
- same-height: true if the whole selection is the same height (returned value has no meaning when scope is :default)
- same-color: true if the whole selection is the same color (returned value has no meaning when scope is :default)

character-format returns a `character-format` object which encapsulates the information returned by get-character-format.

See cg-rich-text.htm for information about rich text editing in Common Graphics.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version