PRO qRemoteView_AddData, state, f0, f1, f2, add_list=add_list ;+ ; NAME: ; qRemoteView_AddData ; PURPOSE: ; Adds 3D data cubes to the available data ; CATEGORY: ; Widgets: qRemoteView ; CALLING SEQUENCE: ; qRemoteView_AddData, state, f0, f1, f2, add_list=add_list ; INPUTS: ; state array[1]; type: structure ; qRemoteView state structure ; f0, f1, f2 array[n,m,l]; type: any ; 3D data matrices ; OPTIONAL INPUT PARAMETERS: ; add_list array[*]; type: string ; array with identifying string for f0, f1, f2 ; OUTPUTS: ; OPTIONAL OUTPUT PARAMETERS: ; INCLUDE: @compile_opt.pro ; On error, return to caller ; RESTRICTIONS: ; The max number of array processed is set to three. Hence the number ; of elements in add_list can be at most three. ; PROCEDURE: ; MODIFICATION HISTORY: ; MAY-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- n = n_elements(add_list) IF n NE 0 THEN BEGIN add_mptrs = ptrarr(n, /allocate_heap) ; Matrix pointers add_vptrs = ptrarr(n, /allocate_heap) ; View cube pointers FOR i=0,n-1 DO BEGIN IF i EQ 0 then *add_mptrs[i] = f0 IF i EQ 1 then *add_mptrs[i] = f1 IF i EQ 2 then *add_mptrs[i] = f2 ENDFOR widget_control, state.wid_list , get_uvalue=list , /no_copy widget_control, state.wid_matrix, get_uvalue=mptrs, /no_copy widget_control, state.wid_calc , get_uvalue=vptrs, /no_copy IF n_elements(list) EQ 0 THEN BEGIN list = add_list mptrs = add_mptrs vptrs = add_vptrs ENDIF ELSE BEGIN list = [list, add_list] mptrs = [mptrs, add_mptrs] vptrs = [vptrs, add_vptrs] ENDELSE ; Can't use /no_copy here: apparently the uvalue is set first ; If /no_copy is used 'list' doesn't exist anymore when the value is set. widget_control, state.wid_list , set_uvalue=list, set_value=list, /sensitive widget_control, state.wid_matrix, set_uvalue=mptrs, /no_copy widget_control, state.wid_calc , set_uvalue=vptrs, /no_copy widget_control, state.wid_mhisto , /sensitive ENDIF RETURN & END