summaryrefslogtreecommitdiffstats
path: root/ds9/library
diff options
context:
space:
mode:
Diffstat (limited to 'ds9/library')
-rw-r--r--ds9/library/cat.tcl37
-rw-r--r--ds9/library/layout.tcl82
-rw-r--r--ds9/library/source.tcl4
-rw-r--r--ds9/library/util.tcl8
4 files changed, 55 insertions, 76 deletions
diff --git a/ds9/library/cat.tcl b/ds9/library/cat.tcl
index c97c12e..0fc90fa 100644
--- a/ds9/library/cat.tcl
+++ b/ds9/library/cat.tcl
@@ -1541,8 +1541,24 @@ proc CatalogCmdSymbolSave {fn} {
}
proc ProcessSendCatalogCmd {proc id param sock fn} {
+ if {1} {
+ global parse
+ set parse(proc) $proc
+ set parse(id) $id
+ set parse(sock) $sock
+ set parse(fn) $fn
+
global icat
+ set ref [lindex $icat(cats) end]
+ global cvarname
+ set cvarname $ref
+
+ catsend::YY_FLUSH_BUFFER
+ catsend::yy_scan_string $param
+ catsend::yyparse
+ } else {
+ global icat
set cc [lindex $icat(cats) end]
switch -- [string tolower [lindex $param 0]] {
header {}
@@ -1557,3 +1573,24 @@ proc ProcessSendCatalogCmd {proc id param sock fn} {
header {ProcessSend $proc $id $sock $fn {.txt} "[CATGetHeader $cc]\n"}
}
}
+}
+
+proc CatalogSendCmdRef {ref} {
+ global icat
+ global cvarname
+
+ # backward compatibility
+ if {$ref == "catcxc"} {
+ set ref catcsc
+ }
+
+ # look for reference in current list
+ if {[lsearch $icat(cats) $ref] < 0} {
+ Error "[msgcat::mc {Unable to find catalog window}] $ref"
+ return 0
+ }
+
+ set cvarname $ref
+ return [CatalogCmdCheck]
+}
+
diff --git a/ds9/library/layout.tcl b/ds9/library/layout.tcl
index 6fe2630..9165d1b 100644
--- a/ds9/library/layout.tcl
+++ b/ds9/library/layout.tcl
@@ -87,7 +87,6 @@ proc ViewDef {} {
set view(info,keyvalue) {}
set view(info,keyword) 0
set view(info,minmax) 0
- set view(info,minmax,xy) 0
set view(info,lowhigh) 0
set view(info,bunit) 0
set view(info,wcs) 1
@@ -859,79 +858,12 @@ proc ProcessViewCmd {varname iname} {
}
proc ProcessSendViewCmd {proc id param {sock {}} {fn {}}} {
- global view
-
- switch -- [string tolower [lindex $param 0]] {
- layout {$proc $id "$view(layout)\n"}
- keyvalue {$proc $id "$view(info,keyvalue)\n"}
- info {$proc $id [ToYesNo $view(info)]}
- panner {$proc $id [ToYesNo $view(panner)]}
- magnifier {$proc $id [ToYesNo $view(magnifier)]}
- buttons {$proc $id [ToYesNo $view(buttons)]}
- colorbar {$proc $id [ToYesNo $view(colorbar)]}
- colorbarnumerics {
- # backward compatibility
- $proc $id [ToYesNo $colorbar(numerics)]
- }
- graph {
- switch -- [string tolower [lindex $param 1]] {
- horizontal {$proc $id [ToYesNo $view(graph,horz)]}
- vertical {$proc $id [ToYesNo $view(graph,vert)]}
- }
- }
- horzgraph {
- # backward compatibility
- $proc $id [ToYesNo $view(graph,horz)]
- }
- vertgraph {
- # backward compatibility
- $proc $id [ToYesNo $view(graph,vert)]
- }
+ global parse
+ set parse(proc) $proc
+ set parse(id) $id
- filename {$proc $id [ToYesNo $view(info,filename)]}
- object {$proc $id [ToYesNo $view(info,object)]}
- keyword {$proc $id [ToYesNo $view(info,keyword)]}
- minmax {$proc $id [ToYesNo $view(info,minmax)]}
- minmaxxy {$proc $id [ToYesNo $view(info,minmax,xy)]}
- lowhigh {$proc $id [ToYesNo $view(info,lowhigh)]}
- units {$proc $id [ToYesNo $view(info,bunit)]}
-
- detector {$proc $id [ToYesNo $view(info,detector)]}
- amplifier {$proc $id [ToYesNo $view(info,amplifier)]}
- physical {$proc $id [ToYesNo $view(info,physical)]}
- image {$proc $id [ToYesNo $view(info,image)]}
- wcs {$proc $id [ToYesNo $view(info,wcs)]}
- wcsa {$proc $id [ToYesNo $view(info,wcsa)]}
- wcsb {$proc $id [ToYesNo $view(info,wcsb)]}
- wcsc {$proc $id [ToYesNo $view(info,wcsc)]}
- wcsd {$proc $id [ToYesNo $view(info,wcsd)]}
- wcse {$proc $id [ToYesNo $view(info,wcse)]}
- wcsf {$proc $id [ToYesNo $view(info,wcsf)]}
- wcsg {$proc $id [ToYesNo $view(info,wcsg)]}
- wcsh {$proc $id [ToYesNo $view(info,wcsh)]}
- wcsi {$proc $id [ToYesNo $view(info,wcsi)]}
- wcsj {$proc $id [ToYesNo $view(info,wcsj)]}
- wcsk {$proc $id [ToYesNo $view(info,wcsk)]}
- wcsl {$proc $id [ToYesNo $view(info,wcsl)]}
- wcsm {$proc $id [ToYesNo $view(info,wcsm)]}
- wcsn {$proc $id [ToYesNo $view(info,wcsn)]}
- wcso {$proc $id [ToYesNo $view(info,wcso)]}
- wcsp {$proc $id [ToYesNo $view(info,wcsp)]}
- wcsq {$proc $id [ToYesNo $view(info,wcsq)]}
- wcsr {$proc $id [ToYesNo $view(info,wcsr)]}
- wcss {$proc $id [ToYesNo $view(info,wcss)]}
- wcst {$proc $id [ToYesNo $view(info,wcst)]}
- wcsu {$proc $id [ToYesNo $view(info,wcsu)]}
- wcsv {$proc $id [ToYesNo $view(info,wcsv)]}
- wcsw {$proc $id [ToYesNo $view(info,wcsw)]}
- wcsx {$proc $id [ToYesNo $view(info,wcsx)]}
- wcsy {$proc $id [ToYesNo $view(info,wcsy)]}
- wcsz {$proc $id [ToYesNo $view(info,wcsz)]}
-
- frame {$proc $id [ToYesNo $view(info,frame)]}
- default {
- # backward compatibility
- $proc $id "$view(layout)\n"
- }
- }
+ viewsend::YY_FLUSH_BUFFER
+ viewsend::yy_scan_string $param
+ viewsend::yyparse
}
+
diff --git a/ds9/library/source.tcl b/ds9/library/source.tcl
index d1b2d17..2f8ba4f 100644
--- a/ds9/library/source.tcl
+++ b/ds9/library/source.tcl
@@ -210,6 +210,8 @@ source $ds9(root)/library/blocksendparser.tcl
source $ds9(root)/library/blocksendlex.tcl
source $ds9(root)/library/catparser.tcl
source $ds9(root)/library/catlex.tcl
+source $ds9(root)/library/catsendparser.tcl
+source $ds9(root)/library/catsendlex.tcl
source $ds9(root)/library/cmapparser.tcl
source $ds9(root)/library/cmaplex.tcl
source $ds9(root)/library/colorbarparser.tcl
@@ -366,6 +368,8 @@ source $ds9(root)/library/urlfitsparser.tcl
source $ds9(root)/library/urlfitslex.tcl
source $ds9(root)/library/viewparser.tcl
source $ds9(root)/library/viewlex.tcl
+source $ds9(root)/library/viewsendparser.tcl
+source $ds9(root)/library/viewsendlex.tcl
source $ds9(root)/library/vlaparser.tcl
source $ds9(root)/library/vlalex.tcl
source $ds9(root)/library/vlssparser.tcl
diff --git a/ds9/library/util.tcl b/ds9/library/util.tcl
index de85100..e8e82fa 100644
--- a/ds9/library/util.tcl
+++ b/ds9/library/util.tcl
@@ -218,7 +218,12 @@ proc ProcessSendCmdSend {ext cmd} {
return
}
- set rr [$current(frame) $cmd]
+ ProcessSendCmdResult $ext [$current(frame) $cmd]
+}
+
+proc ProcessSendCmdResult {ext rr} {
+ global parse
+
if {$parse(sock) != {}} {
# not implemented
} elseif {$parse(fn) != {}} {
@@ -232,6 +237,7 @@ proc ProcessSendCmdSend {ext cmd} {
}
}
+# old
proc ProcessSend {proc id sock fn ext rr} {
if {$sock != {}} {
# not implemented