Magic VLSI Layout Tool Version 7.5 *

cursor


Return magic internal coordinates of the cursor (X11 pointer)

Usage:

cursor glyphnum

cursor [internal|lambda|user]

Summary:

The cursor command has two distinct uses. When followed by an integer value, the cursor glyph is changed to the indicated glyph, as defined internally to Magic.
When used without an option, or when followed by a measurement metric "internal", "lambda", or "user", the cursor command returns the current position of the cursor (the X11 pointer, not the magic cursor box) in layout coordinates. The coordinates are given in the indicated metric, or in internal units by default.

Implementation Notes:

cursor is implemented as a built-in window command in magic. In the Tcl version of magic, it returns a Tcl result (list of two elements, x and y coordinates).

Like all window commands, it reports relative to the existing window if only one window is present, or the active window if called with the ":" macro. Otherwise, it must be called using the tk_path_name command to specify relative to which layout window the cursor coordinates will be given.

The value returned by cursor may be modified according to the state set by the snap command. cursor user reports units relative to the grid set by the grid command, which may differ in aspect between the X and Y axes.

See Also:

snap
grid
tk_path_name

Return to command index

Last updated: February 3, 2008 at 8:04pm