Lugaru's Epsilon
Programmer's
Editor 14.00

Context:
Epsilon User's Manual and Reference
   Primitives and EEL Subroutines
      Input Primitives
         Keys
         The Mouse
            Mouse Cursors
            Mouse Subroutines
            The Scroll Bar
            . . .
         Window Events
         . . .

Previous   Up    Next
The Mouse  Primitives and EEL Subroutines   Mouse Subroutines


Epsilon User's Manual and Reference > Primitives and EEL Subroutines > Input Primitives > The Mouse >

Mouse Cursors

user short mouse_display;
user short mouse_auto_on;    /* default = 1 */
user short mouse_auto_off;   /* default = 1 */

The mouse_display primitive controls whether or not Epsilon displays the mouse cursor. Set it to zero to turn the mouse cursor off, and to a nonzero value to turn the mouse cursor on. Turning off the mouse cursor does not cause Epsilon to stop queuing up mouse events--to do that, use catch_mouse.

Epsilon automatically turns on the mouse cursor when it detects mouse motion, if the mouse_auto_on primitive has a nonzero value. Epsilon automatically turns off the mouse when you start to type on the keyboard, if the mouse_auto_off primitive has a nonzero value. Neither of these actions affect the status of queuing up mouse events. When Epsilon automatically turns on the mouse cursor, it sets mouse_display to 2.

typedef short MOUSE_CURSOR;
MOUSE_CURSOR mouse_cursor;

MOUSE_CURSOR std_pointer            = CURSOR_IBEAM;
MOUSE_CURSOR left_pointer           = CURSOR_ARROW;
MOUSE_CURSOR drag_and_drop_pointer  = CURSOR_ARROW;
MOUSE_CURSOR right_pointer          = CURSOR_RIGHTARR;
MOUSE_CURSOR horiz_arrows           = CURSOR_SIZEWE;
MOUSE_CURSOR vert_arrows            = CURSOR_SIZENS;
MOUSE_CURSOR move_arrows            = CURSOR_ARROW;
MOUSE_CURSOR pan_neutral            = CURSOR_PAN;
MOUSE_CURSOR pan_up                 = CURSOR_PAN_UP;
MOUSE_CURSOR pan_down               = CURSOR_PAN_DOWN;

Setting the mouse_cursor primitive selects a different mouse cursor in Windows and X11 versions of Epsilon. It holds a code that specifies the type of cursor to use. Epsilon regularly sets this variable from an appropriate one of the mouse cursor variables shown above (for instance, from pan_up while panning up using the mouse's middle button). By default, Epsilon sets mouse_cursor to std_pointer, which produces an I-beam cursor.

The codes in all these variables select one of the standard cursor types, according to the following table, which lists the stock cursor codes defined in codes.h:

 CURSOR_ARROW  Standard arrow
 CURSOR_IBEAM  Text I-beam
 CURSOR_WAIT  Hourglass
 CURSOR_CROSS  Crosshair
 CURSOR_UPARROW  Arrow pointing up
 CURSOR_SIZE  Resize
 CURSOR_ICON  Empty icon
 CURSOR_SIZENWSE  Double-headed arrow pointing northwest and southeast
 CURSOR_SIZENESW  Double-headed arrow pointing northeast and southwest
 CURSOR_SIZEWE  Double-headed arrow pointing east and west
 CURSOR_SIZENS  Double-headed arrow pointing north and south
 CURSOR_PAN  Neutral cursor for wheeled mouse panning
 CURSOR_PAN_UP  Wheeled mouse cursor when panning up
 CURSOR_PAN_DOWN  Wheeled mouse cursor when panning down
 CURSOR_HAND  A hand
 CURSOR_APPSTART  arrow with hourglass
 CURSOR_HELP  arrow with question mark
 CURSOR_RIGHTARR  arrow pointing up and right

X11 defines many other mouse cursors. You can use the number of any X11 mouse cursor code by setting Epsilon's mouse cursor variable to its X11 cursor font glyph number plus 50. (For example, X11's familiar "fat X" default mouse cursor has code 0, so mouse_cursor = 50 produces it, while X11's less familiar "trek" mouse cursor has code 142, so mouse_cursor = 192 produces it.)



Previous   Up    Next
The Mouse  Primitives and EEL Subroutines   Mouse Subroutines


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