Changeset 778
- Timestamp:
- Dec 4, 2009 5:11:52 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/excledt.tcl
- Property rcs:date changed from 2003/12/05 12:56:23 to 2004/04/26 21:18:57
- Property rcs:lines changed from +17 -11 to +37 -4
- Property rcs:rev changed from 1.11 to 1.12
r759 r778 675 675 # are there any points between the regions 676 676 if {$i != 0} { 677 set seppts [allxvec search \ 678 [expr -.00001+$low] [expr .00001+$prvhigh]] 677 set x1 [expr {-.00001+$low}] 678 set x2 [expr {.00001+$prvhigh}] 679 if {$x1 < $x2} { 680 set seppts [allxvec search $x1 $x2] 681 } else { 682 set seppts [allxvec search $x2 $x1] 683 } 679 684 if {[llength $seppts] == 0} { 680 685 set exclist [lreplace $exclist $ip $i [list $prvlow $high]] … … 1265 1270 } 1266 1271 1272 # move the zoom region around 1273 proc ScanZoom {box key frac} { 1274 foreach var {xl xh yl yh} axis {xaxis xaxis yaxis yaxis} \ 1275 flg {-min -max -min -max} { 1276 set $var [$box $axis cget $flg] 1277 if {$var == ""} return 1278 } 1279 catch { 1280 switch -- $key { 1281 Right {set a x; set l $xl; set h $xh; set d [expr {$frac*($h-$l)}]} 1282 Left {set a x; set l $xl; set h $xh; set d [expr {-$frac*($h-$l)}]} 1283 Up {set a y; set l $yl; set h $yh; set d [expr {$frac*($h-$l)}]} 1284 Down {set a y; set l $yl; set h $yh; set d [expr {-$frac*($h-$l)}]} 1285 } 1286 $box ${a}axis configure -min [expr {$l + $d}] -max [expr {$h + $d}] 1287 } 1288 } 1289 1267 1290 # code to create the EXCLEDT box 1268 1291 proc ShowExcl {} { … … 1395 1418 -command setpostscriptout 1396 1419 # phase options 1420 set box $graph(plot) 1421 set win [winfo toplevel $graph(plot)] 1397 1422 foreach num $expmap(phaselist) { 1398 1423 $graph(exclmenu).file.menu.tick add checkbutton -label "Phase $num" \ 1399 1424 -variable peakinfo(flag$num) 1400 bind [winfo toplevel $graph(plot)]<Key-$num> \1425 bind $win <Key-$num> \ 1401 1426 "set peakinfo(flag$num) \[expr !\$peakinfo(flag$num)\]" 1402 1427 $graph(exclmenu).options.menu.tick add command -label "Phase $num" \ 1403 1428 -command "minioptionsbox $num" 1404 1429 } 1430 bind $win <Key-Up> "ScanZoom $box %K .1" 1431 bind $win <Key-Left> "ScanZoom $box %K .1" 1432 bind $win <Key-Right> "ScanZoom $box %K .1" 1433 bind $win <Key-Down> "ScanZoom $box %K .1" 1434 bind $win <Control-Key-Up> "ScanZoom $box %K 1.0" 1435 bind $win <Control-Key-Left> "ScanZoom $box %K 1.0" 1436 bind $win <Control-Key-Right> "ScanZoom $box %K 1.0" 1437 bind $win <Control-Key-Down> "ScanZoom $box %K 1.0" 1405 1438 1406 1439 set graph(bbox) [set bb $graph(exclbox).b]
Note: See TracChangeset
for help on using the changeset viewer.