[2] | 1 | PRO createhistory, base, petit |
---|
| 2 | ; |
---|
| 3 | ;------------------------------------------------------------- |
---|
| 4 | ; we save globalcommand in globaloldcommand |
---|
| 5 | widget_control,base, get_uvalue = top_uvalue |
---|
| 6 | globalcommand = extractatt(top_uvalue, 'globalcommand') |
---|
| 7 | *top_uvalue[1, findline(top_uvalue, 'globaloldcommand')] = globalcommand |
---|
| 8 | ; composition du text contennu ds history.pro |
---|
| 9 | texte = ['@common' $ |
---|
| 10 | , ' ' $ |
---|
| 11 | , 'if n_elements(portrait) ne 0 then key_portrait = portrait' $ |
---|
| 12 | , 'if n_elements(landscape) ne 0 then key_portrait = 1-landscape' $ |
---|
| 13 | , ' ' $ |
---|
| 14 | , 'if keyword_set(postscript) then begin' $ |
---|
| 15 | , ' noerase = 1' $ |
---|
| 16 | , ' openps, infowidget = infowidget' $ |
---|
| 17 | , 'endif' $ |
---|
| 18 | , ' ' $ |
---|
| 19 | , '; beginning of 1' $ |
---|
| 20 | , ';' $ |
---|
| 21 | , '; end of 1'] |
---|
| 22 | if petit[0]*petit[1] GT 1 then begin |
---|
| 23 | for draw = 1, petit[0]*petit[1]-1 do begin |
---|
| 24 | texte = [texte $ |
---|
| 25 | , '; beginning of '+strtrim(draw+1, 2) $ |
---|
| 26 | , 'noerase=1' $ |
---|
| 27 | , '; end of '+strtrim(draw+1, 2)] |
---|
| 28 | endfor |
---|
| 29 | ENDIF |
---|
| 30 | texte = [texte $ |
---|
| 31 | , 'if keyword_set(postscript) then begin' $ |
---|
| 32 | , ' closeps, infowidget = infowidget' $ |
---|
| 33 | , ' imprime' $ |
---|
| 34 | , 'endif'] |
---|
| 35 | ; the new globalcommand |
---|
| 36 | *top_uvalue[1, findline(top_uvalue, 'globalcommand')] = texte |
---|
| 37 | ;------------------------------------------------------------- |
---|
| 38 | ; for i = 0, n_elements(texte)-1 do print, texte[i] |
---|
| 39 | ;------------------------------------------------------------- |
---|
| 40 | return |
---|
| 41 | end |
---|