PRO createhistory, base, small ; ;------------------------------------------------------------- ; we save globalcommand in globaloldcommand ; compile_opt idl2, strictarrsubs ; widget_control,base, get_uvalue = top_uvalue globalcommand = extractatt(top_uvalue, 'globalcommand') *top_uvalue[1, findline(top_uvalue, 'globaloldcommand')] = globalcommand ; portrait or landscape ??? options = extractatt(top_uvalue, 'options') optionsflag = extractatt(top_uvalue, 'optionsflag') portrait = (optionsflag[where(options EQ 'Portrait/Landscape'), 0])[0] ; composition du text contennu ds history.pro texte = ['@common' $ , ' ' $ , 'if keyword_set(postscript) then begin' $ , ' noerase = 1' $ , ' openps, infowidget = infowidget, portrait = ' + strtrim(portrait, 2) $ , 'endif' $ , ' ' $ , '; beginning of 1' $ , ';' $ , '; end of 1'] if small[0]*small[1] GT 1 then begin for draw = 1, small[0]*small[1]-1 do begin texte = [texte $ , '; beginning of '+strtrim(draw+1, 2) $ , 'noerase=1' $ , '; end of '+strtrim(draw+1, 2)] endfor ENDIF texte = [texte $ , 'if keyword_set(postscript) then begin' $ , ' closeps, infowidget = infowidget' $ , ' printps' $ , 'endif'] ; the new globalcommand *top_uvalue[1, findline(top_uvalue, 'globalcommand')] = texte ;------------------------------------------------------------- ; for i = 0, n_elements(texte)-1 do print, texte[i] ;------------------------------------------------------------- return end