PRO qView_Sensitive, state, set_box=set_box, get_data=get_data ;+ ; NAME: ; qView_Sensitive ; PURPOSE: ; Controls the sensitivity for most widgets in the qView widget ; CATEGORY: ; Widget qView ; CALLING SEQUENCE: ; qView_Sensitive, state, /set_box ; qView_Sensitive, state, /get_data ; qView_Sensitive ; INPUTS: ; state array[1]; type: structure ; qView state structure ; OPTIONAL INPUT PARAMETERS: ; If no keyword is set then all the task widgets are sensitized. ; ; /set_box sensitizes the 'Set Area' widget, while desensitizing ; the 'Read Area' and all task widgets ; /get_data sensitizes the 'Read Area' widget while desensitizing ; all task widgets. ; OUTPUTS: ; (none) ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; qView_ImageInfo ; RESTRICTIONS: ; /set_box and /get_data should not be set at the same time ; PROCEDURE: ; The main purpose of this routine to keep the task widgets desensitized ; when a condition arises that would make information stored in the ; widget values (first, last file, file increment, etc.) inconsistent ; with the image cube currently loaded. By desensitizing the task widgets ; the user is force to set up a new image cube using the 'Set Area' and ; 'Read Area' widgets. ; MODIFICATION HISTORY: ; FEB-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- InitVar, set_box , /key InitVar, get_data, /key IF set_box THEN BEGIN widget_control, state.wid_box , /sensitive widget_control, state.wid_data , sensitive=0 ENDIF IF get_data THEN $ widget_control, state.wid_data , /sensitive IF set_box OR get_data THEN BEGIN widget_control, state.wid_wall , sensitive=0 widget_control, state.wid_movie , sensitive=0 widget_control, state.wid_track , sensitive=0 widget_control, state.wid_view , sensitive=0 widget_control, state.wid_series, sensitive=0 widget_control, state.wid_glitch, sensitive=0 widget_control, state.wid_gain , sensitive=0 widget_control, state.wid_save , sensitive=0 widget_control, state.wid_forw , sensitive=0 widget_control, state.wid_back , sensitive=0 widget_control, state.wid_diff , sensitive=0 ENDIF ELSE BEGIN tmp = qView_ImageInfo(state, /first, /last) frst = tmp[0] last = tmp[1] widget_control, state.wid_wall , sensitive=frst NE last widget_control, state.wid_movie , sensitive=frst NE last widget_control, state.wid_track , sensitive=frst NE last widget_control, state.wid_view , /sensitive widget_control, state.wid_series, sensitive=frst NE last widget_control, state.wid_glitch, /sensitive widget_control, state.wid_gain , sensitive=frst NE last widget_control, state.wid_save , /sensitive widget_control, state.wid_forw , sensitive=frst NE last widget_control, state.wid_back , sensitive=frst NE last widget_control, state.wid_diff , sensitive=frst NE last ENDELSE RETURN & END