get-character-format

Generic Function

Package: common-graphics

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

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 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.