#!xtk01 -f
# Geoffrey Furnish                     -*-tcl-*-
# 11 April 1994
#
# @> A script for using Tk to control xtk01
#
# $Id: tk01,v 1.7 1994/07/24 07:42:57 mjl Exp $
#
# $Log: tk01,v $
# Revision 1.7  1994/07/24  07:42:57  mjl
# Eliminated "destroy ." in favor of "exit".
#
# Revision 1.6  1994/07/01  20:43:59  mjl
# Modified to use startup proc plstdwin when configuring main window.
#
# Revision 1.5  1994/06/17  21:23:09  mjl
# Removed option database settings since they were the same as those set
# in the pldefaults proc.
#
# Revision 1.4  1994/06/09  20:28:15  mjl
# Changed to new improved megawidget instantiation method.
#
###############################################################################

wm title . "x01c -- TK version"
plstdwin .

###############################################################################
# Set up the menubar and message widgets.

frame .menu -relief raised -borderwidth 3

button .menu.one -text "One" -command "myplot 1"
pack append .menu .menu.one {left expand fill}

button .menu.two -text "Two" -command "myplot 2"
pack append .menu .menu.two {left expand fill}

button .menu.three -text "Three" -command "myplot 3"
pack append .menu .menu.three {left expand fill}

button .menu.four -text "Four" -command "myplot 4"
pack append .menu .menu.four {left expand fill}

button .menu.exit -text "Exit" -command "quit 0"
pack append .menu .menu.exit {right expand fill}

message .msg \
	-font -Adobe-helvetica-medium-r-normal--*-240* -aspect 200 \
	 -width 500 -borderwidth 1 \
	-text "TK01: Control x01c from TK"

pack append . \
	.menu {top fillx} \
	.msg {top padx 5 pady 5 fill} 

tk_menuBar .menu .menu.one .menu.two .menu.three .menu.four .menu.exit

###############################################################################
#
# This creates the plframe "megawidget".  If you just want a bare plframe,
# change "plxframe" to "plframe".

plxframe .plw
pack append . .plw {left expand fill}

###############################################################################
# Definitions of procedures used in this script.

# Punch eject and hold onto your seat !!!

proc quit a {
    exit
}

# Utility routine.

proc dpos w {
    wm geometry $w +300+300
}

###############################################################################
