;+ ; NAME: ; qLine_YAction ; PURPOSE: ; Used by the qLine event handler to test whether an event was ; received from any of the y-base widgets ; CATEGORY: ; qLine ; CALLING SEQUENCE: FUNCTION qLine_YAction, wid_array, event, iy, onoff=onoff ; INPUTS: ; wid_array array; type: long integer ; array of widget id's (one element for each curve) ; event array[1]; type: structure ; event structure ; OUTPUTS: ; R scalar; type: long integer ; 'wid' (event.id) if a match with one of the elements ; in 'wid_array' was found; -1 if not. ; iy scalar: type: long integer ; index into qLine_YAction of the match found; ; -1 if no match was found. ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; InitVar ; PROCEDURE: ; Used as test statement in the main 'case' block in the event handler. ; MODIFICATION HISTORY: ; JULY-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- InitVar, onoff, /key iy = (where(event.id EQ wid_array))[0] CASE iy EQ -1 of 0: BEGIN ret_wid = event.id IF onoff THEN widget_control, wid_array[iy], set_uvalue=event.select END 1: ret_wid = -1 ENDCASE RETURN, ret_wid & END