{Begin SubSec Cursor and Mouse} {Title Cursor and Mouse} {Text {index *PRIMARY* Mouse} {index *PRIMARY* Cursor} A mouse is a small box connected to the computer keyboard by a long wire. On the top of the mouse are two or three buttons. On the bottom is a rolling ball or a set of photoreceptors, to detect when the mouse is moved. As the mouse is moved on a surface, a small image on the screen, called the cursor, moves to follow the movement of the mouse. By moving the mouse, the user can cause the cursor to point to any part of the display screen. The mouse and cursor are an important part of the Interlisp-D user interface. The Interlisp-D window system allows the user to create, move, and reshape windows, and to select items from displayed menus, all by moving the mouse and clicking the mouse buttons. This section describes the low-level functions used to control the mouse and cursor. {Begin SubSec Changing the Cursor Image} {Title Changing the Cursor Image} {Text Interlisp-D maintains the image of the cursor on the screen, moving it as the mouse is moved. The bitmap that becomes visible as the cursor can be accessed by the following function: {FnDef {Name CURSORBITMAP} {Text Returns the cursor bitmap. }} {VarDef {Name CURSORWIDTH}} {VarDef {Name CURSORHEIGHT} {Text Value is the width and height of the cursor bitmap, respectively. }} The cursor bitmap can be changed like any other bitmap by {fn BITBLT}ing into it or pointing a display stream at it and printing or drawing curves. However, for some applications it is necessary to save and restore the cursor, which can be most easily done using {lisp CURSOR} record objects.{index CURSOR (Record)} A {lisp CURSOR} record contains fields {lisp CURSORBITMAP} and {lisp CURSORHOTSPOT}. The value of the {lisp CURSORBITMAP} field is a bitmap that is {var CURSORWIDTH} bits wide by {var CURSORHEIGHT} high. The value of the {lisp CURSORHOTSPOT} field is the {index *PRIMARY* Hot spot of cursor}{index *PRIMARY* Hotspot}"hot spot" of the cursor, a position in the bitmap interpreted as the point that the cursor is pointing to. {lisp CURSOR} objects can be saved on a file using the file package command {filecom CURSORS},{index CURSORS FileCom} or the {filecom UGLYVARS} file package command. {FnDef {Name CURSORCREATE} {Args BITMAP X Y} {Text Returns a cursor object which has {arg BITMAP} as its image and the location ({arg X},{arg Y}) as the hot spot. If {arg X} is a {lisp POSITION}, it is used as the hot spot. If {arg BITMAP} has dimensions different from {lisp CURSORWIDTH} by {lisp CURSORHEIGHT}, the lesser of the widths and the lesser of the heights are used to determine the bits that actually get copied into the lower left corner of the cursor. If {arg X} is {lisp NIL}, 0 is used. If {arg Y} is {lisp NIL}, {lisp CURSORHEIGHT}-1 is used. The default cursor is an uparrow with its tip in the upper left corner and its hot spot at (0,{lisp CURSORHEIGHT}-1). }} {note the INVERTFLG arg to CURSOR and SETCURSOR should not be documented... FLIPCURSOR is to be used for inverting the cursor} {FnDef {Name CURSOR} {Args NEWCURSOR {anonarg}} {Text Returns a {lisp CURSOR} record instance that contains (a copy of) the current cursor specification. If {arg NEWCURSOR} is a {lisp CURSOR} record instance, the cursor will be set to the values in {arg NEWCURSOR}. If {arg NEWCURSOR} is {lisp T}, the cursor will be set to the default cursor {var DEFAULTCURSOR},{index *PRIMARY* DEFAULTCURSOR Var} an upward left pointing arrow:  . }} {FnDef {Name SETCURSOR} {Args NEWCURSOR {anonarg}} {Text If {arg NEWCURSOR} is a {lisp CURSOR} record instance, the cursor will be set to the values in {arg NEWCURSOR}. This does not return the old cursor, and therefore, provides a way of changing the cursor without using storage. }} {FnDef {Name FLIPCURSOR} {Args} {Text Inverts the cursor. }} The following list describes the cursors used by the Interlisp-D system. Most of them are stored as the values of various variables. {Begin LabeledList Named cursors} {Label  } {Text In variable {var DEFAULTCURSOR}.{index DEFAULTCURSOR Var} This is the default cursor. } {Label `=x `07g} {Text In variable {var WAITINGCURSOR}.{index *PRIMARY* WAITINGCURSOR Var} Represents an hourglass. Used during long computations. } {Label  (((((((} {Text In variable {var MOUSECONFIRMCURSOR}.{index MOUSECONFIRMCURSOR Var} Indicates that the system is waiting for the user to confirm an action by pressing the left mouse button, or aborting the action by pressing any other button. Used by the function {fn MOUSECONFIRM} ({PageRef Fn MOUSECONFIRM}). } {Label ta$b2\JHJHJHJH1} {Text In variable {var SYSOUTCURSOR}.{index SYSOUTCURSOR Var} Indicates that the system is saving the virtual memory in a sysout file. See {fn SYSOUT}, {PageRef Fn SYSOUT}. } {Label  dʠ.@@ N R P \} {Text In variable {var SAVINGCURSOR}.{index SAVINGCURSOR Var} Indicates that {fn SAVEVM} has been called automatically to save the virtual memory state after the system is idle for long enough. See {var SAVEVMWAIT}, {PageRef Var SAVEVMWAIT}. } {Label p1a AAa 1p} {Text In variable {var CROSSHAIRS}.{index CROSSHAIRS Var} Used by {fn GETPOSITION} ({PageRef Fn GETPOSITION}) to indicate a position. } {Label  00000000} {Text In variable {var BOXCURSOR}.{index BOXCURSOR Var} Used by {fn GETBOXPOSITION} ({PageRef Fn GETBOXPOSITION}) to indicate where to place the corner of a box. } {Label  9)@9p``} {Text In variable {var FORCEPS}.{index FORCEPS Var} Used by {fn GETREGION} ({PageRef Fn GETREGION}) when the user switches corners. } {Label $$ } {Text In variable {var EXPANDINGBOX}.{index EXPANDINGBOX Var} Used by {fn GETREGION} ({PageRef Fn GETREGION}) when a box is first displayed. } {Label  @} {Text In variable {var UpperRightCursor}.{index UpperRightCursor Var} } {Label   ````````} {Text In variable {var LowerRightCursor}.{index LowerRightCursor Var} } {Label  } {Text In variable {var UpperLeftCursor}.{index UpperLeftCursor Var} } {Label  } {Text In variable {var LowerLeftCursor}.{index LowerLeftCursor Var} } {Unindent The previous four cursors are used by {fn GETREGION} ({PageRef Fn GETREGION}) to indicate the four corners of a region. } {Label  } {Text In variable {var VertThumbCursor}.{index VertThumbCursor Var} Used during scrolling to indicate thumbing in a vertical scroll bar. } {Label 88||8888||88} {Text In variable {var VertScrollCursor}.{index VertScrollCursor Var} } {Label  >>} {Text In variable {var ScrollUpCursor}.{index ScrollUpCursor Var} } {Label  >>} {Text In variable {var ScrollDownCursor}.{index ScrollDownCursor Var} } {Unindent The previous four cursors are used by {fn SCROLL.HANDLER} ({PageRef Fn SCROLL.HANDLER}) during vertical scrolling. } {Label   ***} {Text In variable {var HorizThumbCursor}.{index HorizThumbCursor Var} Used during scrolling to indicate thumbing in a horizontal scroll bar. } {Label   088x