• insertEscapes ?-w win? ?option value...? range
Apply a stylistic marking (color, font style, underlines, etc.) to a
range of text. The marking is specified by different options with the
following syntax:
-bgColor token |
-color token |
-cursor name |
-hypertext proc |
-spelling num |
-strike num |
-style num |
-tip str |
-underline num |
The range argument is a two-element list containing the start and
end positions.
The -color and -bgColor options expect a color token (typically obtained with
the [colorRef] command).
The -style option specifies a font style. Its value is a
combination of the following additive flags:
The -underline option and the -strike option are used to
underline or strike through a range of text. Their value is the sum of two
constants specifying respectively the kind of line and the pattern.
Possible values are:
Kind | Value |
Single line | 1 |
Double line | 2 |
Thick line | 3 |
Pattern | Value |
Solid | 0 |
Dot | 10 |
Dash | 20 |
Dash-Dot | 30 |
Dash-Dot-Dot | 40 |
The -spelling option is a temporary marker used to display
spelling indicators for the range of text. The possible values are:
The -hypertext option attaches a script to execute or an URL
to open when the user clicks on the specified range of text. This is useful
to create hyperlinks. This option causes the corresponding section to be
colored in blue and underlined.
The -tip option attaches a tooltip
to the specified range of text. If the cursor hovers over this block of
text, a tooltip window appears showing the specified string. Note that the
cursor in the text area is an I-beam: the top of the I-beam must be
positionned over the block of text for the tooltip window to pop up.
The -cursor option lets you
define a mouse cursor to display when the mouse hovers over the specified range of text.
Cursors are designated by name. The possible names are given in the
following table:
Cursor | Name |
| arrow |
| crosshair |
| IBeam |
| IBeamHorizontal |
| closedHand |
| openHand |
| pointingHand |
| resizeDown |
| resizeLeft |
| resizeLeftRight |
| resizeRight |
| resizeUp |
| resizeUpDown |
| contextualMenu |
| dragCopy |
| dragLink |
| operationNotAllowed |
| disappearingItem |