;+ ; NAME: ; qLine_Skip ; PURPOSE: ; Handles a 'skip plot' event ; CATEGORY: ; qLine widget ; CALLING SEQUENCE: FUNCTION qLine_Skip, state, event, iy ; INPUTS: ; state array[1]; type: structure ; qLine state structure ; event array[1]; type: structure ; event structure ; iy scalar; type: integer ; index of the 'skip' widget that received the event ; OUTPUTS: ; refresh scalar; type: byte ; 0B of 1B (1B indicating that href=qLine_Curve= needs to be called) ; 'refresh' will be 1B, unless a 'newyaxis' event is generated. ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; qLine_SequenceOrder ; PROCEDURE: ; > The user value of state.wid_skip[iy] is updated with event.select. ; The sensitivity of state.wid_newyaxis, state.wid_exact, state.wid_ynozero and ; state.wid_ylog is updated as needed. ; > A check is made to made sure that the first curve to be plotted has ; 'newyaxis' set. If not then a 'newyaxis' event is generated to set it. ; MODIFICATION HISTORY: ; JULY-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- widget_control, state.wid_skip [iy], set_uvalue=event.select skip = -1 ; Pick up all 'skip' and 'isx' settings isx = -1 FOR jy=0,state.n-1 DO BEGIN widget_control, state.wid_skip[jy], get_uvalue=tmp skip = [skip, tmp] widget_control, state.wid_isx [jy], get_uvalue=tmp isx = [isx , tmp] ENDFOR skip = skip[1:*] isx = isx [1:*] sensitive = 1B-event.select widget_control, state.wid_fit [iy], sensitive=sensitive widget_control, state.wid_newyaxis [iy], sensitive=sensitive, get_uvalue=newyaxis widget_control, state.wid_linestyle [iy], sensitive=sensitive sensitive = sensitive AND newyaxis widget_control, state.wid_exact [iy], sensitive=sensitive OR isx[iy] widget_control, state.wid_ynozero [iy], sensitive=sensitive widget_control, state.wid_ylog [iy], sensitive=sensitive ; The first curve to be plotted (not skipped), should have 'newyaxis' set. seq = qLine_SequenceOrder(state) jy = (where(1-skip[seq]))[0] ; Find first curve to be plotted refresh = jy[0] EQ -1 IF NOT refresh THEN BEGIN ; Get 'newyaxis' setting of first curve jy = seq[jy] widget_control, state.wid_newyaxis[jy], get_uvalue=refresh ; If 'newyaxis' not set, the generate a 'newyaxis' event to set it. ; In that case qLine_Curve does not need to redrawn here ; (the generated event will take care of that) IF NOT refresh THEN $ widget_control, state.wid_newyaxis[jy], /set_button, $ send_event={WIDGET_BUTTON, id:0L, top:0L, handler:0L, select:1L} ENDIF RETURN, refresh & END