Changeset 117 for sans/utils/bt5/prepare
- Timestamp:
- Jun 1, 2007 1:50:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/utils/bt5/prepare/prepare
r17 r117 293 293 set config(pola_state) disabled 294 294 set config(mono_list) {Si220} 295 set config(mode) 0 296 set config(motlbls) {Monochromator Analyzer "Detector Slide" "Analyzer Table" Sample Unused} 295 297 } 296 298 7 { … … 513 515 set row 1 514 516 foreach i $config(ibuf_mots) { 517 if { $config(nsta) == 5 } { 518 set motname [lindex $config(motlbls) [expr $i-1]] 519 label $parent.a${i}beglabel -text "$motname (A${i}) Beg:" 520 entry $parent.a${i}beg -width $width -textvariable ibufdisp(a${i}beg) 521 label $parent.a${i}inclabel -text "Inc:" 522 entry $parent.a${i}inc -width $width -textvariable ibufdisp(a${i}inc) 523 label $parent.a${i}endlabel -text "End:" 524 entry $parent.a${i}end -width $width -textvariable ibufdisp(a${i}end) 525 526 527 } else { 515 528 label $parent.a${i}beglabel -text "A${i}-beg:" 516 529 entry $parent.a${i}beg -width $width -textvariable ibufdisp(a${i}beg) … … 519 532 label $parent.a${i}endlabel -text "A${i}-end:" 520 533 entry $parent.a${i}end -width $width -textvariable ibufdisp(a${i}end) 521 if $text_only { 534 } 535 if $text_only { 522 536 grid $parent.a${i}beglabel -row $row -column 1 -ipadx 1 -sticky w 523 537 grid $parent.a${i}beg -row $row -column 2 -ipadx 1 -sticky w … … 527 541 grid $parent.a${i}end -row $row -column 6 -ipadx 1 -sticky w 528 542 } else { 529 grid $parent.a${i}beglabel -row $row -column 1 543 grid $parent.a${i}beglabel -row $row -column 1 -sticky e 530 544 grid $parent.a${i}beg -row $row -column 2 531 545 grid $parent.a${i}inclabel -row $row -column 3 … … 697 711 if {$config(nsta) == 1} { 698 712 foreach i $config(ibuf_mots) { 713 foreach l "a${i}beglabel a${i}inclabel a${i}endlabel" { 714 $parent.$l config -fg $color 715 } 716 foreach e "a${i}beg a${i}inc a${i}end" { 717 $parent.$e config -state $state -fg $color 718 } 719 } 720 $parent.pts.label config -fg $color 721 $parent.pts.val config -state $state -fg $color 722 } 723 if { $config(nsta) == 5} { 724 foreach i {1 3 4 6} { 699 725 foreach l "a${i}beglabel a${i}inclabel a${i}endlabel" { 700 726 $parent.$l config -fg $color … … 862 888 863 889 proc IBufList { } { 864 global text_only 890 global text_only config 865 891 # Clear out our list if it contains anything. 866 892 set lbox .l.list 867 893 set start [expr int([lindex [$lbox yview] 0] * [$lbox index end])] 868 894 $lbox delete 0 end 869 $lbox configure -font {-family courier -size 12} 895 if { $config(nsta) == 5} { 896 $lbox configure -font {-family courier -size 12} 897 } else { 898 $lbox configure -font fixed 899 } 870 900 for {set i 0} {$i < 30} {incr i} { 871 901 $lbox insert end [IBufFormatRec $i] … … 883 913 884 914 proc IBufFormatRec { recno } { 885 global ibuf 915 global ibuf config 916 917 if { $config(nsta) == 5 } { 918 886 919 set output [format "%-3d " [expr $recno + 1]] 887 920 append output [binary format A20 $ibuf($recno,comment)] … … 898 931 append output [format "%4.0f" $ibuf($recno,th0)] 899 932 933 } else { 934 935 set output [format "%2d " [expr $recno + 1]] 936 append output [binary format A20 $ibuf($recno,comment)] 937 append output [format " %6.2f " $ibuf($recno,a4beg)] 938 append output [format "%6.2f " $ibuf($recno,a4end)] 939 append output [format "%5.2f " $ibuf($recno,a4inc)] 940 append output [format "%2.0f\* " $ibuf($recno,mpf)] 941 append output [format "%6.0f " $ibuf($recno,mon)] 942 append output [binary format A4 $ibuf($recno,mt)] 943 append output [format " %6.1f" $ibuf($recno,t0)] 944 append output [format "%4.0f " $ibuf($recno,th0)] 945 946 } 900 947 return $output 901 948 } … … 5430 5477 5431 5478 proc SwitchBuf { which } { 5432 global mode changed 5479 global mode changed config 5433 5480 switch $which { 5434 5481 increment { 5482 if { $config(nsta) == 5 } { 5435 5483 .l.title configure -text \ 5436 5484 "# Comment *I-Buf* A2-beg A2-end A2-Inc A5-beg A5-end A5-Inc Monitor Temp Hold"\ 5437 5485 -font {-family courier -size 11} 5486 } else { 5487 .l.title configure -text \ 5488 "No Comment *I-Buffer* A4-beg A4-end Inc Monitor Temp Hold" 5489 } 5438 5490 IBufReadFile ;# Make sure we get the latest data from disk 5439 5491 IBufList
Note: See TracChangeset
for help on using the changeset viewer.