which_window ( : : : WindowID, Row, Column, Button, MachineName )

Query the mouse position.

which_window returns the logical window number of the output window in which the mouse pointer is located at the time of the call. The position of the mouse pointer and the mouse buttons pressed are returned as well. Since it is possible to open windows on several machines simultaneously, tuples of values are returned, one for each display. In order to determine the display, the hostname of the respective display is used (e.g., 'gsradig1'). If the mouse is not located in a HORUS window, the window number returned is ``0''. In this case, the mouse coordinates are relative to the root window.


Parameters

WindowID (output_control)
window.id-array -> integer
Window number of the window in which the moise pointer resides.

Row (output_control)
point.y-array -> integer
Row coordinate within the pointer window.

Column (output_control)
point.x-array -> integer
Column coordinate within the pointer window.

Button (output_control)
integer-array -> integer
Mouse button pressed.

MachineName (output_control)
string-array -> string
Name of the machine on which the window is opened.


Example
which_window(:::Window,Row,Column,Button,MachineName) >
fwrite_string(::['The name of all machine with window = ',MachineName]:) >
fnew_line(:::) >
fwrite_string(::['Mausposition = (',Row,',',Column,')']:) >
fnew_line(:::).

Result

which_window returns the value TRUE if a window is active. Otherwise, an exception is raised.


Possible Predecessors

open_window, set_window, open_textwindow


Alternatives

get_mposition, get_mbutton


See also

open_window, open_textwindow



Copyright © 1996-1997 MVTec Software GmbH