at_restorecursor - Restores X window cursor

SYNOPSIS

source at\$tk_include:at_defs.atk

at_restorecursor wclist

ARGUMENTS

wclist
Widget and cursor list. This is a list of widgets and the cursors that they will be set to.

DESCRIPTION

This procedure is part of the standard AT_DEFS. It allows the programmer to set the X window mouse pointer sprite to be any of the standard X window cursors.

The wclist is most readily generated by the at_setcursor command, from which it is returned as a function return variable. This returned variable may be passed to the at_restorecursor command, thus allowing an easy means of returning the cursors for each widget back to their original configurations.

Obviously, at_setcursor/at_restorecursor pairs may be nested (but this should be a rare event).

Example

Here is some example code that can be set the cursor. Note the update command. It ensures that the cursor change is immediately invoked in the case that the timedout operation is completely contained in the TCL script. If the program is waiting on external input, this may not be necessary. This example sets the cursor to a wrist-watch shape and then sets it back again using the at_restorecursor command.

  widgetlist [at_setcursor . watch]

# ... do any long tasks here

  at_restorecursor $widgetlist

KEYWORDS

ATwish, cursor, procedure


Original: dmckay (13-DEC-1994)
Modified: dmckay (17-JUL-1995)