source: trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/createhistory.pro @ 325

Last change on this file since 325 was 325, checked in by pinsard, 16 years ago

modification of some headers (+some corrections) to prepare usage of the new idldoc

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1;+
2;
3; @file_comments
4;
5; @categories
6;
7; @param BASE {in}{required}
8; The id of the widget where apply the drawing.
9;
10; @param SMALL
11; Vector composed of 3 or 4 elements, applied to make a drawing on a small
12; portion of a page or screen. It delimit the zone where the drawing will
13; be done. If there is 4 elements: then is constituted of coordinates (expressed
14; in cm located from the up and left corner of the page or the window (in portrait
15; like in landscape)) of the bottom and left corner and of the up and right corner
16; of the drawing zone. If there is 3 elements: in this case, we divide the page or
17; the screen in small[0] columns and in small[1] lines the drawing made in the box
18; numbered small[2]. The numerotation starting up and left by the number 1 and then,
19; following the writing direction. By default, we make the largest drawing we can do,
20; conserving the aspect rapport (except when REMPLI is activated).
21;
22; @returns
23;
24; @uses
25;
26; @restrictions
27;
28; @examples
29;
30; @history
31;
32; @version
33; $Id$
34;
35; @todo
36; seb: je ne suis pas sur pour les param,
37; documenter le reste.
38;
39;-
40PRO createhistory, base, small
41;
42; we save globalcommand in globaloldcommand
43;
44  compile_opt idl2, strictarrsubs
45;
46   widget_control,base, get_uvalue = top_uvalue
47   globalcommand = extractatt(top_uvalue, 'globalcommand')
48   *top_uvalue[1, findline(top_uvalue, 'globaloldcommand')] = globalcommand
49; portrait or landscape ???
50   options = extractatt(top_uvalue, 'options')
51   optionsflag = extractatt(top_uvalue, 'optionsflag')
52   portrait = (optionsflag[where(options EQ 'Portrait/Landscape'), 0])[0]
53; composition du text contennu ds history.pro
54   texte = ['@common' $
55            , ' ' $
56            , 'if keyword_set(postscript) then begin'  $
57            , '    noerase = 1' $
58            , '    openps, infowidget = infowidget, portrait = ' + strtrim(portrait, 2) $
59            , 'endif' $
60            , ' ' $
61            , '; beginning of 1' $
62            , ';' $
63            , '; end of 1']
64   if small[0]*small[1] GT 1 then begin
65      for draw = 1, small[0]*small[1]-1  do begin
66         texte = [texte $
67                  , '; beginning of '+strtrim(draw+1, 2) $
68                  , 'noerase=1' $
69                  , '; end of '+strtrim(draw+1, 2)]
70      endfor
71   ENDIF
72   texte = [texte $
73            , 'if keyword_set(postscript) then begin' $
74            , '    closeps, infowidget = infowidget' $
75            , '    printps' $
76            , 'endif']
77; the new globalcommand
78   *top_uvalue[1, findline(top_uvalue, 'globalcommand')] = texte
79;-------------------------------------------------------------
80;  for i = 0, n_elements(texte)-1 do print, texte[i]
81;-------------------------------------------------------------
82   return
83end
Note: See TracBrowser for help on using the repository browser.