Changeset 722 for trunk/excledt.tcl
- Timestamp:
- Dec 4, 2009 5:10:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/excledt.tcl
- Property rcs:date changed from 2003/04/10 21:55:15 to 2003/08/11 19:21:23
- Property rcs:lines changed from +180 -374 to +53 -53
- Property rcs:rev changed from 1.9 to 1.10
r666 r722 715 715 set link excledt.html 716 716 grid [button $box.help -text Help -bg yellow \ 717 -command "MakeWWWHelp $link"] -col 98 -row 0717 -command "MakeWWWHelp $link"] -column 98 -row 0 718 718 bind $box <Key-F1> "MakeWWWHelp $link" 719 719 … … 741 741 } 742 742 grid [label $box.t -text "Set usable data range, histogram $hst"] \ 743 -col 0 -columnspan 4 -row 0744 grid [label $box.lu -text "($unit)"] -col 2 -row 1 -rowspan 2745 grid [label $box.lmn -text "$var minimum"] -col 0 -row 1746 grid [entry $box.emn -textvariable graph(tmin) -width 10] -col 1 -row 1747 grid [label $box.lmx -text "$var maximum"] -col 0 -row 2748 grid [entry $box.emx -textvariable graph(tmax) -width 10] -col 1 -row 2749 grid [frame $box.c] -col 0 -columnspan 99 -row 99743 -column 0 -columnspan 4 -row 0 744 grid [label $box.lu -text "($unit)"] -column 2 -row 1 -rowspan 2 745 grid [label $box.lmn -text "$var minimum"] -column 0 -row 1 746 grid [entry $box.emn -textvariable graph(tmin) -width 10] -column 1 -row 1 747 grid [label $box.lmx -text "$var maximum"] -column 0 -row 2 748 grid [entry $box.emx -textvariable graph(tmax) -width 10] -column 1 -row 2 749 grid [frame $box.c] -column 0 -columnspan 99 -row 99 750 750 grid [button $box.c.1 -text Set -command "destroy $box"\ 751 ] -col 1 -row 0751 ] -column 1 -row 0 752 752 grid [button $box.c.2 -text Quit \ 753 753 -command "foreach i {min max} {set graph(\$i) {}}; destroy $box" \ 754 ] -col 2 -row 0754 ] -column 2 -row 0 755 755 set exclist [histinfo $hst excl] 756 756 set oldtmin [lindex [lindex $exclist 0] 1] … … 959 959 if {$msg != ""} { 960 960 grid [label $box.0 -text $msg -fg red] \ 961 -col 1 -row 0 -columnspan 99961 -column 1 -row 0 -columnspan 99 962 962 } 963 963 if {$graph(xunits) == 1} { … … 988 988 if {$reg == 1} { 989 989 grid [label $box.1 -text "Editing Data Limits ($unit)"] \ 990 -col 1 -row 1 -columnspan 99990 -column 1 -row 1 -columnspan 99 991 991 grid [label $box.2 -text "$beg $var "] \ 992 -col 1 -row 2992 -column 1 -row 2 993 993 grid [entry $box.3 -width 12 -textvariable graph(tmax)] \ 994 -col 2 -row 2994 -column 2 -row 2 995 995 } elseif {$reg == [llength $exclist]} { 996 996 grid [label $box.1 -text "Editing Data Limits ($unit)"] \ 997 -col 1 -row 1 -columnspan 99997 -column 1 -row 1 -columnspan 99 998 998 grid [label $box.2 -text "$end $var "] \ 999 -col 1 -row 2999 -column 1 -row 2 1000 1000 grid [entry $box.3 -width 12 -textvariable graph(tmin)] \ 1001 -col 2 -row 21001 -column 2 -row 2 1002 1002 } else { 1003 1003 grid [label $box.1 -text "Editing excluded region #$reg in $var ($unit)"] \ 1004 -col 1 -row 1 -columnspan 991004 -column 1 -row 1 -columnspan 99 1005 1005 grid [label $box.2 -text "$beg $var "] \ 1006 -col 1 -row 21006 -column 1 -row 2 1007 1007 grid [entry $box.3 -width 12 -textvariable graph(tmin)] \ 1008 -col 2 -row 21008 -column 2 -row 2 1009 1009 grid [label $box.4 -text "$end $var "] \ 1010 -col 1 -row 31010 -column 1 -row 3 1011 1011 grid [entry $box.5 -width 12 -textvariable graph(tmax)] \ 1012 -col 2 -row 31012 -column 2 -row 3 1013 1013 } 1014 1014 # save starting values as tmin & tmax … … 1017 1017 } 1018 1018 bind $box <Return> "destroy .edit" 1019 grid [frame $box.c] -col 1 -row 99 -columnspan 991019 grid [frame $box.c] -column 1 -row 99 -columnspan 99 1020 1020 grid [button $box.c.1 -text "OK" -command "destroy .edit"] \ 1021 -col 1 -row 11021 -column 1 -row 1 1022 1022 grid [button $box.c.2 -text "Cancel" \ 1023 1023 -command "set graph(tmin) $tmin; set graph(tmax) $tmax;destroy .edit"] \ 1024 -col 2 -row 11024 -column 2 -row 1 1025 1025 putontop $box 1026 1026 tkwait window $box … … 1110 1110 grid [label $top.$col -text "Range:" \ 1111 1111 -padx 0 -pady 1 -bd 4] \ 1112 -row 0 -col $col1112 -row 0 -column $col 1113 1113 incr col 1114 1114 if {$graph(xunits) == 1} { … … 1117 1117 grid [label $top.$col -text "$i\n[format %.4f $v]" \ 1118 1118 -padx 3 -pady 1 -bd 2 -relief groove] \ 1119 -row 0 -col $col -sticky ns1119 -row 0 -column $col -sticky ns 1120 1120 incr col 1121 1121 } 1122 1122 grid [label $top.$col -text "\xc5" \ 1123 1123 -padx 0 -pady 1 -bd 4] \ 1124 -row 0 -col $col -sticky nsw -ipadx 51124 -row 0 -column $col -sticky nsw -ipadx 5 1125 1125 incr col 1126 1126 grid [label $top.$col -text "points\n$points" \ 1127 1127 -padx 3 -pady 1 -bd 2 -relief groove] \ 1128 -row 0 -col $col -sticky ns1128 -row 0 -column $col -sticky ns 1129 1129 incr col 1130 1130 } elseif {$graph(xunits) == 2} { … … 1132 1132 v [lsort -real [toQ [list $start $end] $graph(hst)]] { 1133 1133 grid [label $top.$col -text "$i\n[format %.3f $v]" \ 1134 -padx 3 -pady 1 -bd 2 -relief groove] -row 0 -col $col -sticky ns1134 -padx 3 -pady 1 -bd 2 -relief groove] -row 0 -column $col -sticky ns 1135 1135 incr col 1136 1136 } 1137 1137 grid [label $top.$col -text "\xc5" \ 1138 1138 -padx 0 -pady 1] \ 1139 -row 0 -col $col1139 -row 0 -column $col 1140 1140 incr col 1141 1141 grid [label $top.$col -text "-1\n" \ 1142 1142 -padx 0 -pady 0] \ 1143 -row 0 -col $col -sticky nsw -ipadx 51143 -row 0 -column $col -sticky nsw -ipadx 5 1144 1144 incr col 1145 1145 grid [label $top.$col -text "points\n$points" \ 1146 -padx 3 -pady 1 -bd 2 -relief groove] -row 0 -col $col -sticky ns1146 -padx 3 -pady 1 -bd 2 -relief groove] -row 0 -column $col -sticky ns 1147 1147 incr col 1148 1148 } else { … … 1150 1150 grid [label $top.$col -text "$i\n[set $i]" \ 1151 1151 -padx 3 -pady 1 -bd 2 -relief groove] \ 1152 -row 0 -col $col -sticky ns1152 -row 0 -column $col -sticky ns 1153 1153 incr col 1154 1154 } … … 1156 1156 grid [button $top.b$col -text "Set" \ 1157 1157 -command "SetDummyRangeBox $graph(hst) $start $end $step"] \ 1158 -sticky ns -row 0 -col $col1158 -sticky ns -row 0 -column $col 1159 1159 } else { 1160 1160 $graph(bbox).bl.1 config -text "Excluded\nRegions" … … 1189 1189 } 1190 1190 grid [button $top.$col -text $lbl -command "EditExclRegion $col" \ 1191 -padx 1 -pady 1] -row 0 -col $col -sticky ns1191 -padx 1 -pady 1] -row 0 -column $col -sticky ns 1192 1192 } 1193 1193 } … … 1404 1404 catch {pack [frame $bb -bd 3 -relief sunken] -side bottom -fill both} 1405 1405 grid [label $bb.top -text "Excluded Region Editing"] \ 1406 -col 0 -row 0 -columnspan 41406 -column 0 -row 0 -columnspan 4 1407 1407 grid [button $bb.help -text Help -bg yellow \ 1408 1408 -command "MakeWWWHelp excledt.html"] \ … … 1410 1410 1411 1411 grid [frame $bb.l -bd 3 -relief groove] \ 1412 -col 0 -row 1 -columnspan 2 -sticky nse1413 grid [label $bb.l.1 -text "Mouse click\naction"] -col 0 -row 01412 -column 0 -row 1 -columnspan 2 -sticky nse 1413 grid [label $bb.l.1 -text "Mouse click\naction"] -column 0 -row 0 1414 1414 foreach c {1 2 3} l {zoom "Add\nregion" "Delete\nregion"} { 1415 1415 grid [button $graph(bbox).l.b$c -text $l -command "exclEditMode $c $bb"] \ 1416 -col $c -row 0 -sticky ns1416 -column $c -row 0 -sticky ns 1417 1417 } 1418 1418 exclEditMode 1 $bb 1419 1419 1420 1420 grid [frame $bb.bl] \ 1421 -col 0 -row 3 -rowspan 2 -sticky nsew1422 grid [label $graph(bbox).bl.1 -text "Excluded\nRegions"] -col 0 -row 01421 -column 0 -row 3 -rowspan 2 -sticky nsew 1422 grid [label $graph(bbox).bl.1 -text "Excluded\nRegions"] -column 0 -row 0 1423 1423 grid [canvas [set graph(ExclCanvas) $bb.bc] \ 1424 1424 -scrollregion {0 0 5000 500} -width 0 -height 0 \ … … 1430 1430 grid [button $bb.cw -text "Save &\nFinish" \ 1431 1431 -command "CheckChanges $startchanges;destroy $graph(exclbox)"] \ 1432 -col 4 -row 1 -columnspan 2 -sticky ns1432 -column 4 -row 1 -columnspan 2 -sticky ns 1433 1433 1434 1434 grid columnconfigure $bb 1 -weight 1 … … 1549 1549 trace variable newhist(tstep) w "ValidateDummyRange $np $hst" 1550 1550 pack [frame $np.d1] 1551 grid [label $np.d1.l1 -text min] -col 1 -row 11552 grid [label $np.d1.l2 -text max] -col 2 -row 11553 grid [label $np.d1.l3 -text step] -col 3 -row 11554 grid [label $np.d1.lu -text ""] -col 4 -row 1 -rowspan 21555 grid [entry $np.d1.e1 -width 10 -textvariable newhist(tmin)] -col 1 -row 21556 grid [entry $np.d1.e2 -width 10 -textvariable newhist(tmax)] -col 2 -row 21557 grid [entry $np.d1.e3 -width 10 -textvariable newhist(tstep)] -col 3 -row 21558 grid [label $np.d1.m1 -anchor w -padx 5] -col 1 -row 3 -sticky ew1559 grid [label $np.d1.m2 -anchor w -padx 5] -col 2 -row 3 -sticky ew1551 grid [label $np.d1.l1 -text min] -column 1 -row 1 1552 grid [label $np.d1.l2 -text max] -column 2 -row 1 1553 grid [label $np.d1.l3 -text step] -column 3 -row 1 1554 grid [label $np.d1.lu -text ""] -column 4 -row 1 -rowspan 2 1555 grid [entry $np.d1.e1 -width 10 -textvariable newhist(tmin)] -column 1 -row 2 1556 grid [entry $np.d1.e2 -width 10 -textvariable newhist(tmax)] -column 2 -row 2 1557 grid [entry $np.d1.e3 -width 10 -textvariable newhist(tstep)] -column 3 -row 2 1558 grid [label $np.d1.m1 -anchor w -padx 5] -column 1 -row 3 -sticky ew 1559 grid [label $np.d1.m2 -anchor w -padx 5] -column 2 -row 3 -sticky ew 1560 1560 label $np.dl1 -text "Data range:" 1561 1561 label $np.dl2 -text "Allowed"
Note: See TracChangeset
for help on using the changeset viewer.