with-cursor

Macro

Package: common-graphics

Arguments: (cursor) &body body

Changes the cursor to cursor during the execution of body. Note that you should wrap this macro only around code where you do not intend to release the processor to handle other events (as with a call to process-pending-events). During the execution of the body, mouse and keyboard events will be queued as usual.

cursor should be one of the standard cursors or a cursor handle created with cg::open-cursor-handle. Passing a Lisp cursor object will work (it will be converted to a handle). However that is not recommended because it is difficult to free the handle (with cg::open-cursor-handle) when the macro is complete since a cursor handle created from a Lisp cursor by the with-cursor macro will not be the value of any variable when body completes.

During the evaluation of body, the cursor will be the value of the variable *with-cursor*.

If you want to return to standard cursor behavior during the execution of body, use without-cursor.

Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.