#!/bin/sh
# \
        exec itkwish "$0" ${1+"$@"}

lappend auto_path ..

menubar .mb -helpvariable helpVar -menubuttons {
	menubutton file -text File -menu {
		options -tearoff false
		command new -label New \
				-helpstr "Open new document" \
				-command {puts NEW}
		command close -label Close \
				-helpstr "Close current document" \
				-command {puts CLOSE}
		separator sep1
		command exit -label Exit -command {exit} \
				-helpstr "Exit application"
	}
	menubutton edit -text Edit -menu {
		options -tearoff false
		command undo -label Undo -underline 0 \
				-helpstr "Undo last command" \
				-command {puts UNDO}
		separator sep2
		command cut -label Cut -underline 1 \
				-helpstr "Cut selection to clipboard" \
				-command {puts CUT}
		command copy -label Copy -underline 1 \
				-helpstr "Copy selection to clipboard" \
				-command {puts COPY}
		command paste -label Paste -underline 0 \
				-helpstr "Paste clipboard contents into document" \
				-command {puts PASTE}
	}
	menubutton options -text Options -menu {
		options -tearoff false -selectcolor blue
		radiobutton byName -variable viewMode \
				-value NAME -label "by Name" \
				-helpstr "View files by name order" \
				-command {puts NAME}
		radiobutton byDate -variable viewMode \
				-value DATE -label "by Date" \
				-helpstr "View files by date order" \
				-command {puts DATE}
		cascade prefs -label Preferences -menu {
			command colors -label Colors... \
				-helpstr "Change text colors" \
				-command {puts COLORS}
			command fonts -label Fonts... \
				-helpstr "Change text font" \
				-command {puts FONT}
		}
	}
}
frame .fr -width 300 -height 300
entry .ef -textvariable helpVar

pack .mb -anchor nw -fill x -expand yes
pack .fr -fill both -expand yes
pack .ef -anchor sw -fill x -expand yes
