Lugaru's Epsilon
Programmer's
Editor

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 struct mouse_cursor {
        byte on_pixels[32];
        byte off_pixels[32];
        byte hot_x, hot_y;
        short stock_cursor;
} MOUSE_CURSOR;
MOUSE_CURSOR *mouse_cursor;
MOUSE_CURSOR std_pointer;

You can select a different mouse cursor in Epsilon for Windows by setting the mouse_cursor primitive. It points to a structure of type MOUSE_CURSOR. The MOUSE_CURSOR type is built into Epsilon. In the current version, only the stock_cursor member is used. It selects one of several standard Windows cursors, 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

The std_pointer primitive variable contains Epsilon's standard left-pointing arrow cursor. Use the syntax mouse_cursor = &some_cursor; to set the cursor to a different MOUSE_CURSOR variable. In Epsilon for Unix under X11, the panning cursors above are available, but not the others.



Previous   Up    Next
The Mouse  Primitives and EEL Subroutines   Mouse Subroutines


Lugaru Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.