Changeset 231 for trunk/SRC/buildinit.pro
- Timestamp:
- 03/19/07 18:15:51 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/buildinit.pro
r229 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; 4 ;5 5 ; @categories 6 ;7 6 ; 8 7 ; @param PARENT {in}{required} 9 8 ; The ID of the parent widget. 10 9 ; 11 ; @keyword COLUMN 10 ; @keyword COLUMN 12 11 ; Buttons will be arranged in the number of columns specified by this keyword. 13 12 ; … … 16 15 ; 17 16 ; @keyword EVENT_FUNC 18 ; The name of an optional user-supplied event function for buttons. 19 ; This function is called with the return value structure whenever a 17 ; The name of an optional user-supplied event function for buttons. 18 ; This function is called with the return value structure whenever a 20 19 ; button is pressed, and follows the conventions for user-written event functions. 21 20 ; 22 21 ; @keyword FLOATING 23 22 ; 24 ;25 23 ; @keyword INTEGER 26 24 ; 27 ;28 25 ; @keyword LONG 29 26 ; 30 ;31 27 ; @keyword STRING 32 28 ; 33 ;34 29 ; @keyword FONT 35 ; The name of the font to be used for the button titles. If this keyword 30 ; The name of the font to be used for the button titles. If this keyword 36 31 ; is not specified, the default font is used. 37 32 ; … … 47 42 ; @keyword VALUE 48 43 ; 49 ;50 44 ; @keyword RETURN_EVENTS 51 45 ; 52 ;53 46 ; @keyword ALL_EVENTS 54 47 ; 55 ;56 48 ; @keyword FIELDFONT 57 49 ; 58 ;59 50 ; @keyword NOEDIT 60 51 ; 61 ;62 52 ; @keyword TEXT_FRAME 63 53 ; 64 ;65 54 ; @keyword XSIZE 66 ; The width of the base .55 ; The width of the base 67 56 ; 68 57 ; @keyword YSIZE … … 79 68 ; 80 69 ; @examples 81 ;82 70 ; 83 71 ; @history … … 87 75 ;- 88 76 ; 89 ;----------------------------------------------------------90 ;----------------------------------------------------------91 ;92 77 ; slightly modified version of cw_field... 78 ; 93 79 FUNCTION cw_field2, Parent, COLUMN=Column, ROW=Row, $ 94 80 EVENT_FUNC = efun, $ … … 98 84 FIELDFONT=FieldFont, NOEDIT=NoEdit, TEXT_FRAME=Text_Frame, $ 99 85 XSIZE=XSize, YSIZE=YSize, UNAME=uname 100 ; FLOOR=vmin, CEILING=vmax 86 ; FLOOR=vmin, CEILING=vmax 101 87 ; 102 88 compile_opt idl2, strictarrsubs … … 165 151 END 166 152 ; 167 ;----------------------------------------------------------168 ;----------------------------------------------------------169 153 ; 170 154 ;+ … … 174 158 ; @categories 175 159 ; 176 ; 160 ; 177 161 ; @param EVENT 178 162 ; 179 163 ; 180 164 ; @returns 181 ; 182 ; 165 ; 183 166 ; @uses 184 ; 185 ; 167 ; 186 168 ; @restrictions 187 ; 188 ; 169 ; 189 170 ; @examples 190 ; 191 ; 171 ; 192 172 ; @history 193 ; 194 ; 195 ; @version 173 ; 174 ; @version 196 175 ; $Id$ 197 176 ;- … … 226 205 END 227 206 ; 228 ;----------------------------------------------------------229 ;----------------------------------------------------------230 207 ; 231 208 ;+ 209 ; 232 210 ; @file_comments 233 211 ; 234 ;235 212 ; @categories 236 213 ; 237 ;238 214 ; @param EVENT 239 215 ; 240 ;241 216 ; @returns 242 ; 243 ; 217 ; 244 218 ; @uses 245 ; 246 ; 219 ; 247 220 ; @restrictions 248 ; 249 ; 221 ; 250 222 ; @examples 251 ; 252 ; 223 ; 253 224 ; @history 254 ; 255 ; 256 ; @version 225 ; 226 ; @version 257 227 ; $Id$ 258 228 ;- … … 283 253 ; @file_comments 284 254 ; 285 ;286 255 ; @categories 287 256 ; 288 ;289 257 ; @param EVENT 290 258 ; 291 ;292 259 ; @returns 293 ; 294 ; 260 ; 295 261 ; @uses 296 ; 297 ; 262 ; 298 263 ; @restrictions 299 ; 300 ; 264 ; 301 265 ; @examples 302 ; 303 ; 266 ; 304 267 ; @history 305 ; 306 ; 307 ; @version 268 ; 269 ; @version 308 270 ; $Id$ 309 271 ;- … … 320 282 END 321 283 ; 322 ;----------------------------------------------------------323 ;----------------------------------------------------------324 ;325 284 ;+ 285 ; 326 286 ; @file_comments 327 287 ; 328 ;329 288 ; @categories 330 289 ; 331 ;332 290 ; @keyword _EXTRA 333 ; Used to pass yourkeywords291 ; Used to pass keywords 334 292 ; 335 293 ; @returns 336 ; 337 ; 294 ; 338 295 ; @uses 339 ; 340 ; 296 ; 341 297 ; @restrictions 342 ; 343 ; 298 ; 344 299 ; @examples 345 ; 346 ; 300 ; 347 301 ; @history 348 ; 349 ; 350 ; @version 302 ; 303 ; @version 351 304 ; $Id$ 352 305 ;- 306 ; 353 307 FUNCTION xask, _extra = ex 354 308 ; 355 309 compile_opt idl2, strictarrsubs 356 310 ; 357 base = widget_base() 358 field = cw_field2(base, /frame, /return_events, /column, _extra = ex) 311 base = widget_base() 312 field = cw_field2(base, /frame, /return_events, /column, _extra = ex) 359 313 ptranswer = ptr_new(/allocate_heap) 360 314 ; we realize the widget and wait for an answer … … 368 322 END 369 323 ; 370 ;----------------------------------------------------------371 ;----------------------------------------------------------372 ;373 324 ;+ 325 ; 374 326 ; @file_comments 375 327 ; 376 ;377 328 ; @categories 378 ;379 329 ; 380 330 ; @keyword TITLE … … 382 332 ; 383 333 ; @keyword NOMARK 384 ;385 334 ; 386 335 ; @keyword NOWRITE 387 336 ; 388 ;389 337 ; @returns 390 ; 391 ; 338 ; 392 339 ; @uses 393 ; 394 ; 340 ; 395 341 ; @restrictions 396 ; 397 ; 342 ; 398 343 ; @examples 399 ; 400 ; 344 ; 401 345 ; @history 402 ; 403 ; 404 ; @version 346 ; 347 ; @version 405 348 ; $Id$ 406 349 ;- 350 ; 407 351 FUNCTION getdir, title = title, nomark = nomark, nowrite = nowrite 408 352 ; 409 353 compile_opt idl2, strictarrsubs 410 354 ; 411 355 412 356 REPEAT BEGIN 413 357 dir = dialog_pickfile(/directory, /must_exist, title = title) … … 422 366 END 423 367 ; 424 ;----------------------------------------------------------425 ;----------------------------------------------------------426 368 ; 427 369 ;+ 370 ; 428 371 ; @file_comments 429 372 ; 430 ;431 373 ; @categories 432 374 ; 433 ;434 375 ; @returns 435 ; 436 ; 376 ; 437 377 ; @uses 438 ; 439 ; 378 ; 440 379 ; @restrictions 441 ; 442 ; 380 ; 443 381 ; @examples 444 ; 445 ; 382 ; 446 383 ; @history 447 ; 448 ; 449 ; @version 384 ; 385 ; @version 450 386 ; $Id$ 451 387 ;- 388 ; 452 389 PRO buildinit 453 390 ; 454 ;455 391 compile_opt idl2, strictarrsubs 456 392 ; 457 IF fix(strmid(!version.release, 0, 1)) LT 6 THEN BEGIN 393 IF fix(strmid(!version.release, 0, 1)) LT 6 THEN BEGIN 458 394 print, ' *** ***** ***' 459 395 print, ' *** ERROR ***' … … 496 432 , 'with the old version ?'], /question, /default_no) 497 433 yes = strlowcase(yes) 498 434 499 435 init = [init $ 500 436 , ';' $ 501 437 , '; compatibility with the old version' $ 502 438 , ';' $ 503 , 'keep_compatibility, ' + strtrim(fix(yes EQ 'yes'), 2)] 439 , 'keep_compatibility, ' + strtrim(fix(yes EQ 'yes'), 2)] 504 440 ; 505 441 ; define all the commons … … 535 471 ptnumb = xask(title = 'Number of accessible printers', value = 0, /long) 536 472 ; 537 ; define all the printer parameters 473 ; define all the printer parameters 538 474 ; 539 475 init = [init $ … … 543 479 ; 544 480 IF ptnumb NE 0 THEN BEGIN 545 base = widget_base(/column, /frame) 481 base = widget_base(/column, /frame) 546 482 cwids = lonarr(3, ptnumb) 547 483 FOR i = 0, ptnumb-1 DO BEGIN 548 484 subbase = widget_base(base, /row) 549 485 cwids[0, i] = cw_field(subbase, /string $ 550 , Title = 'printer_human_names['+strtrim(i, 2)+'] = ') 486 , Title = 'printer_human_names['+strtrim(i, 2)+'] = ') 551 487 cwids[1, i] = cw_field(subbase, /string $ 552 , Title = 'printer_machine_names['+strtrim(i, 2)+'] = ') 488 , Title = 'printer_machine_names['+strtrim(i, 2)+'] = ') 553 489 cwids[2, i] = cw_field(subbase, /string, value = '\lpr -P' $ 554 , Title = 'print_command['+strtrim(i, 2)+'] = ') 490 , Title = 'print_command['+strtrim(i, 2)+'] = ') 555 491 ENDFOR 556 492 trash = widget_button(base, value = 'ok', uvalue = cwids) … … 580 516 , 'printer_machine_names = ''''' $ 581 517 , 'print_command = '''''] 582 ENDELSE 518 ENDELSE 583 519 ; 584 520 ; Colors … … 622 558 ; postscript position 623 559 ; 624 yes = dialog_message(['the default postscript position', 'is landscape?'], /question) 560 yes = dialog_message(['the default postscript position', 'is landscape?'], /question) 625 561 init = [init $ 626 562 , ';' $ … … 661 597 , '11x17 11 17 27.94 43.18' $ 662 598 , 'ledger 17 11 43.18 27.94'] 663 base = widget_base(/column) 599 base = widget_base(/column) 664 600 trash = widget_label(base, value = '--- Select the paper size ---') 665 601 trash = widget_label(base, value = '') … … 689 625 wsize_scale = xask(title = title, value = 1, /floating) 690 626 init = [init, 'windowsize_scale = ' + strtrim(wsize_scale, 2)] 691 627 692 628 ; 693 629 ; postscript archiving...
Note: See TracChangeset
for help on using the changeset viewer.