HELP RC_MOUSE_COORDS A.Sloman April 1997 rc_mouse_coords(stop_button) -> list; This autoloadable procedure enables you to point at a set of locations in the current rc_graphic window, and get a list of coordinates of those locations. Use any mouse button except the stop_button to select the points. Click with the stop button to finish. Each point is represented in the list by the result of applying the user-definable procedure rc_conspoint to a pair of numbers. The default value of rc_conspoint is conspair. The procedure takes an integer representing a mouse button number. It waits for you to use the mouse to select the required locations. If you use a mouse button other than the one specified as stop_button it assumes you are not yet finished. E.g. to select a number of points, using button 3 to terminate, do this: rc_start(); rc_mouse_coords(3)=> The result might be something like this, if you have not redefined rc_conspoint: ** [[-137|123] [-76|40] [-4|-50]] This autoloadable procedure is defined in terms rc_app_mouse, thus define rc_mouse_coords(stop_button) -> list; ;;; return a list of points got by clicking with any button ;;; except stop_button, which indicates termination. [% rc_app_mouse(rc_conspoint, stop_button) %] -> list enddefine; See HELP * RC_APP_MOUSE WARNING: instead of using rc_transxyin, as in LIB RC_MOUSE, this now uses rc_app_mouse_xyin(x, y) -> (x, y); for which a default definition is shown in HELP * RC_APP_MOUSE The procedure is analogous to rc_mouse_draw with first argument true, except that it does not draw anything. --- $poplocal/local/rclib/help/rc_mouse_coords --- Copyright University of Birmingham 1997. All rights reserved. ------