contents.gifprev1.gifnext1.gif

LOCATE_MOUSE

Description:

LOCATE_MOUSE locates the position of the mouse pointer during a button press. LOCATE_MOUSE returns an array providing the window, column, and row position of the mouse pointer when invoked. The row and column positions are given relative to window coordinates, not screen coordinates. If the mouse pointer is not located in a nu/TPU window or if it is not called during a button press callback, 0 is returned.

Syntax:

array := LOCATE_MOUSE

Example:

MOUSE$ARRAY := LOCATE_MOUSE

MOUSE$WINDOW := MOUSE$ARRAY {"WINDOW"};

MOUSE$COL := MOUSE$ARRAY {"X"};

MOUSE$ROW := MOUSE$ARRAY {"Y"};

Errors:

TPU$_MOUSEINV Unknown mouse position.

TPU$_REQUIRESWINDOWS Must be in a windowed environment.

Related Builtins:

CONVERT

CURRENT_ROW

CURRENT_COLUMN

POSITION