Identifier: tracking { }

Type

callback

Description

The "mouse tracking" procedure. During operations which require an interactive "pick" from the screen, an action may be attached to the mouse movement. This action is a procedure to be executed at every new mouse position.

Within the tracking procedure, any interactive command or function requiring a mouse position, e.g. the system function pcur, will use the current mouse coordinates.

This procedure does not require any parameters.

The procedure (as are all procedures) is in fact a numeric function, and by returning a non-zero value in funcval, the system will behave as though the abort mouse button (abort_button) was pressed.

The tracking procedure is a transient identifier and is valid only within the command frame where it was assigned. Consequently, in other command frames (e.g. other macros, functions and procedures) the tracking procedure is undefined (null) unless explicitly set therein. This prevents other macros inadvertently invoking an unwanted tracking procedure.

Examples

The following will echo the world coordinates as the mouse position changes, the output being directed to a window panel label.

tracking = { mypanel.coords.label = ps(pcur) }
tell pcur

See Also

Commands:

hint