From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- vendor/x11iraf/ximtool/ximtool-alt.csh | 98 ++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100755 vendor/x11iraf/ximtool/ximtool-alt.csh (limited to 'vendor/x11iraf/ximtool/ximtool-alt.csh') diff --git a/vendor/x11iraf/ximtool/ximtool-alt.csh b/vendor/x11iraf/ximtool/ximtool-alt.csh new file mode 100755 index 00000000..631723ef --- /dev/null +++ b/vendor/x11iraf/ximtool/ximtool-alt.csh @@ -0,0 +1,98 @@ +#!/bin/csh -f +# +# XIMTOOL-ALT -- Script wrapper to start XImtool using the alternate GUI. +# The GUI file is contained is this script which is created when the system +# is built, it may be used to run any alternate GUI by simply replacing the +# Tcl script making up the GUI at the end of this script or by using the +# "-gui" command line flag. The only configurable item is the path to the +# XImtool binary to be used, by default the one found in the user's path will +# be used. +# Arguments specific to this GUI include: +# +# -showToolBar show toolbar on startup +# -showPanelBar show panelbar on startup +# +#---------------------------------------------------------------------------- + +# Configurable parameters +set XIMTOOL = ximtool # Path to default ximtool binary + + +#------------------------------------------------------------------ +#--------------- Do not modify below this line -------------------- +#------------------------------------------------------------------ +unset noclobber +onintr cleanup + +set SKIP = 99 # offset to GUI file + +# Dump the GUI from this script file. +tail +$SKIP $0 > /tmp/_gui.$$ + +# Check for no arguments. +set q = '"' +set cmd = "-gui /tmp/_gui.$$ -title $q XImtool V1.3 - Alternative GUI $q" + +# Process the script arguments, quoting args when necessary. +if ($#argv > 0) then + while ("$1" != "") + if ("$1" == "-xrm") then + if ("$2" != "") then + shift + else + echo "missing argument to '-xrm ' switch" + exit 1 + endif + set cmd = "$cmd -xrm $q$1$q" + else if ("$1" == "-help") then + $XIMTOOL -help + exit 0 + else if ("$1" == "-defgui") then + tail +$SKIP $0 + exit 0 + else if ("$1" == "-showToolBar") then + if ("$2" != "") then + shift + else + echo "missing argument to '-showToolBar ' switch" + exit 1 + endif + set cmd = "$cmd -xrm $q XImtool.showToolBar:$1$q" + else if ("$1" == "-showPanelBar") then + if ("$2" != "") then + shift + else + echo "missing argument to '-showPanelBar ' switch" + exit 1 + endif + set cmd = "$cmd -xrm $q XImtool.showPanelBar:$1$q" + else + set cmd = "$cmd $1" + endif + + if ("$2" == "") then + break + else + shift + endif + end +endif + +# Run the command. +echo "$XIMTOOL $cmd ; /bin/rm -f /tmp/_gui*.$$" > /tmp/_gui.cmds.$$ +sh /tmp/_gui.cmds.$$ +exit 0 + +cleanup: + /bin/rm -f /tmp/_gui*.$$ + exit 0 + +#-------------------------------------------------------------------------- +#-------------------------- XIMTOOL-ALT.GUI ------------------------------- +#------ ------ +#------ To change the GUI run by this script just delete everything ------ +#------ below here and replace with the new GUI Tcl script. ------ +#------ ------ +#-------------------------------------------------------------------------- +#-------------------------------------------------------------------------- + -- cgit