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