PRO df_savefts_event,event COMMON yyy,pathbox,filebox,btns,vidbtn,img,hdu,filename CASE event.id OF ;{ pathbox:BEGIN ;{ WIDGET_CONTROL,pathbox,GET_VALUE=savpath WIDGET_CONTROL,pathbox,SET_VALUE=savpath END ;} filebox:BEGIN ;{ WIDGET_CONTROL,filebox,GET_VALUE=filename WIDGET_CONTROL,filebox,SET_VALUE=filename END ;} btns:BEGIN ;{ CASE event.value OF 'SAVE':BEGIN ;{ WIDGET_CONTROL,pathbox,GET_VALUE=path WIDGET_CONTROL,filebox,GET_VALUE=filename WIDGET_CONTROL,vidbtn,GET_VALUE=test path=path(0) path=path+'/' filename=filename(0) fxaddpar,hdu,'SUBT','Made by df.pro' IF (fxpar(hdu,'INSTRUME') EQ 'EIT') THEN $ fxaddpar,hdu,'INSTRUME','eit-subt' WRITEFITS,path+filename,img,hdu IF (test EQ 1) THEN BEGIN ;{ tvlct,r,g,b,/GET sz=SIZE(img) temp=INTARR(640,480) ani_array=img(0:sz(2)-1,0:sz(2)-1) text=img(sz(2):sz(1)-1,0:sz(2)-1) text=CONGRID(text,150,432) ani_array=CONGRID(ani_array,432,432) temp(32:463,24:455)=ani_array temp(464:613,24:455)=text WINDOW,/FREE,XSIZE=640,ysize=480 tv,temp filename=filename+' ' STRPUT,file,'vid.gif',STRLEN(file)-7 WRITE_GIF,path+filename,BYTE(temp),r,g,b END ;} savpath=path WIDGET_CONTROL,event.top,/DESTROY END ;} 'DONE':BEGIN ;{ WIDGET_CONTROL,event.top,/DESTROY END ;} ENDCASE END ;} vidbtn:BEGIN ;{ MESSAGE,'Will save a copy of image in 640x480' END ;} ENDCASE ;} END PRO df_savefts,image,filenm,hdr COMMON yyy,pathbox,filebox,btns,vidbtn,img,hdu,filename img=image path=curdir() savpath=path filename=filenm+'.subt.fts' hdu=hdr base=WIDGET_BASE(TITLE='Save Image as FTS',/COLUMN) t=WIDGET_LABEL(base,VALUE='Enter Path:') pathbox=WIDGET_TEXT(base,XSIZE=40,VALUE=savpath,/EDITABLE) t=WIDGET_LABEL(base,VALUE='Enter Filename:') filebox=WIDGET_TEXT(base,VALUE=filename,/EDITABLE) btns=CW_BGROUP(base,['SAVE','DONE'],/ROW,/RETURN_NAME) vidbtn=CW_BGROUP(base,/ROW,/NONEXCLUSIVE,['Save Video format']) WIDGET_CONTROL,base,/REALIZE XMANAGER,'df_savefts',base END