Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      The Screen
         . . .
         Windows
            Creating Windows
            Removing Windows
            Selecting Windows
            Resizing Windows
         Customizing the Screen
            Cursor Shapes
         Fonts
         . . .

Previous   Up    Next
Customizing the Screen  Commands by Topic   Fonts


Epsilon User's Manual and Reference > Commands by Topic > The Screen > Customizing the Screen >

Cursor Shapes

You can set variables to modify the text cursor shape (the caret) that Epsilon displays in different situations.

Epsilon for Windows gets the cursor shape from one of four variables, depending upon whether or not Epsilon is in overwrite mode, and whether or not the cursor is positioned in virtual space. (See the description of the virtual-space variable in Simple Movement Commands.)

 Variable  In overwrite mode?  In virtual space?
 normal-gui-cursor  No  No
 overwrite-gui-cursor  Yes  No
 virtual-insert-gui-cursor  No  Yes
 virtual-overwrite-gui-cursor  Yes  Yes

Epsilon for X11 also uses these settings, but only if you've provided an Epsilon.cursorstyle:1 resource to let it set the cursor shape (see Unix Installation).

Each variable contains a code that specifies the height and width of the caret, as well as a vertical offset, each expressed as a percentage of the character dimensions. Values close to 0 or 100 are absolute pixel counts, so a width of 98 is two pixels smaller than a character. A width of exactly zero means use the default width.

All measurements are from the top left corner of the character. A nonzero vertical offset moves the caret down from its usual starting point at the top left corner.

In EEL programs, you can use the GUI_CURSOR_SHAPE( ) macro to combine the three values into the appropriate code; it simply multiplies the height by 1000 and the offset by 1,000,000, and adds both to the width. So the default Windows caret shape of GUI_CURSOR_SHAPE(100, 2, 0), which specifies a height of 100% of the character size and a width of 2 pixels, is encoded as the value 100,002. The value 100100 provides a block cursor, while 99,002,100 makes a good underline cursor. (It specifies a width of 100%, a height of 2 pixels, and an offset of 99 putting the caret down near the bottom of the character cell.) The CURSOR_SHAPE( ) macro serves a similar purpose for text mode versions of Epsilon.

Epsilon for Windows Console gets its cursor shapes from four other variables. As with the GUI variabls, it selects one based upon whether or not Epsilon is in overwrite mode, and whether or not the cursor is positioned in virtual space.

 Variable  In overwrite mode?  In virtual space?
 normal-cursor  No  No
 overwrite-cursor  Yes  No
 virtual-insert-cursor  No  Yes
 virtual-overwrite-cursor  Yes  Yes

Each of these variables contains a code that specifies the top and bottom edges of the cursor, such as 3006, which specifies a cursor that begins on scan line 3 and extends to scan line 6 on a character box. The topmost scan line is scan line 0.

Scan lines above 50 in a cursor shape code are interpreted differently. A scan line number of 99 indicates the highest-numbered valid scan line (just below the character), 98 indicates the line above that, and so forth. For example, a cursor shape like 1098 produces a cursor that extends from scan line 1 to the next-to-last scan line, one scan line smaller at top and bottom than a full block cursor.



Previous   Up    Next
Customizing the Screen  Commands by Topic   Fonts


Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.