source: trunk/SRC/ToBeReviewed/HOPE/domainpart.pro @ 163

Last change on this file since 163 was 163, checked in by navarro, 18 years ago

header improvements : type of parameters and keywords, default values, spell checking + idldoc assistant (IDL online_help)

  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1;+
2; @file_comments
3;
4;
5; @categories
6;
7;
8; @param TOP_UVALUE
9;
10;
11; @param BASEDOMAIN
12;
13;
14; @param SELECTED
15;
16;
17; @keyword DESTROY
18;
19;
20; @returns
21;
22;
23; @uses
24;
25;
26; @restrictions
27;
28;
29; @examples
30;
31;
32; @history
33;
34;
35; @version
36; $Id$
37;
38; @todo seb
39;
40;-
41pro domainpart, top_uvalue, basedomain, selected, DESTROY = destroy
42;
43  compile_opt idl2, strictarrsubs
44;
45
46   if keyword_set(destroy) then BEGIN
47;       id = widget_info(basedomain,find_by_uname = 'title')
48;       IF id NE 0 THEN widget_control, id, /destroy
49      id = widget_info(basedomain,find_by_uname = 'oddsecchoice')
50      IF id NE 0 THEN widget_control, id, /destroy
51      id = widget_info(basedomain,find_by_uname = 'evensecchoice')
52      IF id NE 0 THEN widget_control, id, /destroy
53      id = widget_info(basedomain,find_by_uname = 'odd-evensecchoice')
54      IF id NE 0 THEN widget_control, id, /destroy
55      id = widget_info(basedomain,find_by_uname = 'basex')
56      IF id NE 0 THEN widget_control, id, /destroy
57      id = widget_info(basedomain,find_by_uname = 'basey')
58      IF id NE 0 THEN widget_control, id, /destroy
59      id = widget_info(basedomain,find_by_uname = 'basez')
60      IF id NE 0 THEN widget_control, id, /destroy
61      return
62   endif
63;
64; we get the size of the dimenstion id of this section
65;
66   dimvar = *top_uvalue[1, findline(top_uvalue, 'dimvar')]
67   selecteddim = dimvar[*, selected]
68   typedim = *top_uvalue[1, findline(top_uvalue, 'typedim')]
69   sorteddim = selecteddim[sortdim(typedim[selecteddim])]
70   dimlist = *top_uvalue[1, findline(top_uvalue, 'dimlist')]
71;
72;  longitude part
73;
74   basex=widget_info(basedomain,find_by_uname = 'basex')
75   IF basex NE 0 THEN widget_control, basex, /destroy
76   basex=widget_base(basedomain,/row, uname='basex')
77   nothing=widget_text(basex,value='longitude', xsize = 10)
78   nothing=cw_selectinterval(basex,dimlist.(sorteddim[0]),uname='xinterval',uvalue={name:'xinterval'})
79;
80;  latitude part
81;
82   basey=widget_info(basedomain,find_by_uname = 'basey')
83   IF basey NE 0 THEN widget_control, basey, /destroy
84   basey=widget_base(basedomain,/row, uname='basey')
85   nothing=widget_text(basey,value='latitude', xsize = 10)
86   nothing=cw_selectinterval(basey,reverse(dimlist.(sorteddim[1])), uname='yinterval',uvalue={name:'yinterval'})
87;
88;  depth part
89;
90   basez=widget_info(basedomain,find_by_uname = 'basez')
91   IF basez NE 0 THEN widget_control, basez, /destroy
92   basez=widget_base(basedomain,/row, uname='basez')
93   nothing=widget_text(basez,value='depth', xsize = 10)
94   nothing=cw_selectinterval(basez,dimlist.(sorteddim[2]),uname='zinterval',uvalue={name:'zinterval'})
95;
96end
97;
Note: See TracBrowser for help on using the repository browser.