- Timestamp:
- 03/16/07 10:22:26 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice.pro
r157 r226 5 5 ; @categories 6 6 ; Compound widget 7 ; 7 ; 8 8 ; @param ID 9 ;10 9 ; 11 10 ; @param VALUE … … 13 12 ; 14 13 ; @returns 15 ; 16 ; 14 ; 17 15 ; @uses 18 ; 19 ; 16 ; 20 17 ; @restrictions 21 ; 22 ; 18 ; 23 19 ; @examples 24 ; 25 ; 20 ; 26 21 ; @history 27 ; 28 ; 29 ; @version 22 ; 23 ; @version 30 24 ; $Id$ 31 25 ;- … … 49 43 widget_control, sliderid, set_value = {slider_min:mini, slider_max:maxi, value:boxzoom[0]<maxi} 50 44 thickness = boxzoom[1]-boxzoom[0] 51 ENDIF ELSE BEGIN 45 ENDIF ELSE BEGIN 52 46 mini = floor(min([gphit, gphif], max = maxi)) 53 47 maxi = ceil(maxi)-thickness … … 57 51 thicknessval = thicknessuval.choix 58 52 index = where(thicknessval EQ thickness) & index = index[0] 59 if index EQ -1 then BEGIN 53 if index EQ -1 then BEGIN 60 54 index = 20 61 55 thicknessval[20] = strtrim(thickness, 1) … … 73 67 ; @categories 74 68 ; Compound widget 75 ; 69 ; 76 70 ; @param EVENT 77 71 ; 78 ;79 72 ; @returns 80 ; 81 ; 73 ; 82 74 ; @uses 83 ; 84 ; 75 ; 85 76 ; @restrictions 86 ; 87 ; 77 ; 88 78 ; @examples 89 ; 90 ; 79 ; 91 80 ; @history 92 ; 93 ; 94 ; @version 81 ; 82 ; @version 95 83 ; $Id$ 96 84 ;- … … 117 105 mini = floor(min([glamt, glamf], max = maxi)) 118 106 maxi = ceil(maxi)-thickness 119 ENDIF ELSE BEGIN 107 ENDIF ELSE BEGIN 120 108 mini = floor(min([gphit, gphif], max = maxi)) 121 109 maxi = ceil(maxi)-thickness … … 136 124 ; print, lon1, mini, maxi 137 125 ; widget_control, sliderid, set_value = {value:lon1, slider_min_max:[mini, maxi]} 138 ; ENDIF ELSE BEGIN 126 ; ENDIF ELSE BEGIN 139 127 ; mini = floor(min([gphit, glamf], max = maxi)) 140 128 ; maxi = ceil(maxi) … … 145 133 ; print, 'ds if',firstxt, 0, jpi-1 146 134 ; widget_control, sliderid, set_value = {value:firstxt, slider_min_max:[0, jpi-1]} 147 ; ENDIF ELSE BEGIN 135 ; ENDIF ELSE BEGIN 148 136 ; widget_control, sliderid, set_value = {value:firstyt, slider_min_max:[0, jpj-1]} 149 137 ; ENDELSE … … 154 142 if type EQ 'y' then begin 155 143 boxzoom[0] = slider & boxzoom[1] = slider+thickness 156 ENDIF ELSE BEGIN 144 ENDIF ELSE BEGIN 157 145 boxzoom[2] = slider & boxzoom[3] = slider+thickness 158 ENDELSE 146 ENDELSE 159 147 ; ENDIF ELSE BEGIN 160 148 ; if strpos(type,'y') NE -1 then begin 161 149 ; boxzoom[0] = glamt[slider, 0] & boxzoom[1] = glamf[slider+thickness, 0] 162 ; ENDIF ELSE BEGIN 150 ; ENDIF ELSE BEGIN 163 151 ; boxzoom[2] = gphit[0, slider] & boxzoom[3] = gphif[0, slider+thickness] 164 ; ENDELSE 152 ; ENDELSE 165 153 ; ENDELSE 166 154 widget_control, domainid, set_value = boxzoom … … 179 167 ; 180 168 ; @keyword BOXZOOM 181 ; Vector indicating the geographic zone on which we want to cut the map. 182 ; If BOXZOOM has : 169 ; Vector indicating the geographic zone on which we want to cut the map. 170 ; If BOXZOOM has : 183 171 ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 184 172 ; 2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 185 173 ; 4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 186 174 ; 5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 187 ; 6 elements: The extraction is made on Boxzoom 175 ; 6 elements: The extraction is made on Boxzoom 188 176 ; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 189 177 ; … … 191 179 ; Buttons will be arranged in the number of columns 192 180 ; specified by this keyword. 193 ; 181 ; 194 182 ; @keyword FRAME 195 183 ; Specifies the width of the frame to be drawn around the base. 196 ; 184 ; 197 185 ; @keyword ROW 198 186 ; Buttons will be arranged in the number of rows 199 187 ; specified by this keyword. 200 ; 188 ; 201 189 ; @keyword UVALUE 202 190 ; The user value to be associated with the widget. 203 ; 191 ; 204 192 ; @keyword UNAME 205 193 ; The user name to be associated with the widget. 206 ; 194 ; 207 195 ; @keyword _EXTRA 208 196 ; Used to pass your keywords 209 ; 197 ; 210 198 ; @returns 211 ; 212 ; 199 ; 213 200 ; @uses 214 ; 215 ; 201 ; 216 202 ; @restrictions 217 ; 218 ; 203 ; 219 204 ; @examples 220 ; 221 ; 205 ; 222 206 ; @history 223 ; 224 ; 225 ; @version 207 ; 208 ; @version 226 209 ; $Id$ 227 ; 210 ; 228 211 ; @todo 229 212 ; seb: documenter … … 236 219 @common 237 220 ;------------------------------------------------ 238 ; che king exclusive keywords221 ; checking exclusive keywords 239 222 column = keyword_set(column)*(1-keyword_set(row)) 240 row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column) 223 row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column) 241 224 if NOT keyword_set(uvalue) then uvalue = '' 242 225 if NOT keyword_set(uname) then uname = '' … … 247 230 , PRO_SET_VALUE='cw_slide_slice_set_value' $ 248 231 , ROW = row, COLUMN = column, UVALUE = uvalue, UNAME = uname $ 249 , FRAME = frame, _extra = ex) 232 , FRAME = frame, _extra = ex) 250 233 ;------------------------------------------------ 251 234 if NOT keyword_set(boxzoom) then boxzoom = [lon1, lon2, lat1, lat2] … … 264 247 , value = mini > boxzoom[0] < maxi, /column, uname = 'slider' $ 265 248 , uvalue = {name:'slider'}) 266 ENDIF ELSE BEGIN 249 ENDIF ELSE BEGIN 267 250 mini = floor(min([gphit, gphif], max = maxi)) 268 251 thickness = boxzoom[3]-boxzoom[2] … … 273 256 ENDELSE 274 257 index = where(thicknessval EQ thickness) & index = index[0] 275 if index EQ -1 then BEGIN 258 if index EQ -1 then BEGIN 276 259 index = 20 277 260 thicknessval[20] = strtrim(thickness, 1) … … 280 263 endif 281 264 widget_control, droplistid, set_value = {droplist_select:index} 282 265 283 266 ; if type EQ 'xt' then begin 284 267 ; mini = floor(min([glamt,glamf], max = maxi)) 285 268 ; maxi = ceil(maxi) 286 ; ENDIF ELSE BEGIN 269 ; ENDIF ELSE BEGIN 287 270 ; mini = floor(min([gphit,gphif], max = maxi)) 288 271 ; maxi = ceil(maxi) 289 272 ; ENDELSE 290 273 291 274 ;------------------------------------------------ 292 275 return, base
Note: See TracChangeset
for help on using the changeset viewer.