summaryrefslogtreecommitdiffstats
path: root/ds9/library/load.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-04-11 17:06:38 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-04-11 17:06:38 (GMT)
commit0687f8781a9d6ae85df3eec400dae77a0f06fd4a (patch)
tree97225ec597963a98ffb4966dab8b14a99452ee61 /ds9/library/load.tcl
parentbb5b4289cfdadeff94c5b7efdeea4f91280370af (diff)
downloadblt-0687f8781a9d6ae85df3eec400dae77a0f06fd4a.zip
blt-0687f8781a9d6ae85df3eec400dae77a0f06fd4a.tar.gz
blt-0687f8781a9d6ae85df3eec400dae77a0f06fd4a.tar.bz2
add ds9 update parser
Diffstat (limited to 'ds9/library/load.tcl')
-rw-r--r--ds9/library/load.tcl27
1 files changed, 27 insertions, 0 deletions
diff --git a/ds9/library/load.tcl b/ds9/library/load.tcl
index dc6d385..1a7cd37 100644
--- a/ds9/library/load.tcl
+++ b/ds9/library/load.tcl
@@ -475,6 +475,14 @@ proc ProcessUpdateCmd {varname iname} {
upvar $varname var
upvar $iname i
+ global debug
+ if {$debug(tcl,parser)} {
+ update::YY_FLUSH_BUFFER
+ update::yy_scan_string [lrange $var $i end]
+ update::yyparse
+ incr i [expr $update::yycnt-1]
+ } else {
+
global current
global ds9
@@ -521,3 +529,22 @@ proc ProcessUpdateCmd {varname iname} {
incr i -1
}
}
+}
+
+proc UpdateCmd {{which {}} {x1 {}} {y1 {}} {x2 {}} {y2 {}}} {
+ global current
+
+ if {$current(frame) == {}} {
+ return
+ }
+ $current(frame) update $which $x1 $y1 $x2 $y2
+}
+
+proc UpdateCmdNow {{which {}} {x1 {}} {y1 {}} {x2 {}} {y2 {}}} {
+ global current
+
+ if {$current(frame) == {}} {
+ return
+ }
+ $current(frame) update now $which $x1 $y1 $x2 $y2
+}