# interface generated by SpecTcl version 1.0 from /home/kcorey/hack/SpecTcl/SpecTcl/bug.ui
#   root     is the parent window for this user interface

proc bug_ui {root args} {

	# this treats "." as a special case

	if {$root == "."} {
	    set base ""
	} else {
	    set base $root
	}
    
	frame $base.optional \
		-borderwidth 2 \
		-relief raised

	frame $base.frame#1

	button $base.button#1 \
		-command "destroy \[winfo toplevel $base.button#1\]" \
		-text Dismiss

	button $base.button#2 \
		-command send_bug_report \
		-text {Send bug report}

	label $base.label#9 \
		-text {These comments will be sent to the team
at Sun Laboratories, Inc.}

	label $base.title \
		-text {SpecTcl has detected an internal error.}
	catch {
		$base.title configure \
			-font -*-Helvetica-Bold-R-Normal-*-*-140-*-*-*-*-*-*
	}

	label $base.label#2 \
		-text {Please enter the following:}

	label $base.label#3 \
		-text {Your name}

	entry $base.name \
		-textvariable P(username)

	label $base.label#4 \
		-text {email address}

	entry $base.entry#2 \
		-textvariable P(email)

	label $base.label#1 \
		-text {Please type a few words of explanation
about what you were doing when
this happened:}

	text $base.bug_text \
		-cursor {} \
		-height 1 \
		-width 1

	label $base.label#6 \
		-text {Data to be sent as trouble report:}

	text $base.message_text \
		-cursor {} \
		-height 1 \
		-width 1 \
		-yscrollcommand "$base.scrollbar#1 set"

	scrollbar $base.scrollbar#1 \
		-command "$base.message_text yview" \
		-orient v


	# Geometry management

	grid $base.optional -in $root	-row 4 -column 1  \
		-columnspan 2
	grid $base.frame#1 -in $root	-row 1 -column 1  \
		-columnspan 2
	grid $base.button#1 -in $base.frame#1	-row 1 -column 1 
	grid $base.button#2 -in $base.frame#1	-row 1 -column 2 
	grid $base.label#9 -in $root	-row 2 -column 1 
	grid $base.title -in $root	-row 3 -column 1  \
		-columnspan 2
	grid $base.label#2 -in $base.optional	-row 1 -column 1  \
		-columnspan 2
	grid $base.label#3 -in $base.optional	-row 2 -column 1  \
		-sticky e
	grid $base.name -in $base.optional	-row 2 -column 2 
	grid $base.label#4 -in $base.optional	-row 3 -column 1  \
		-sticky e
	grid $base.entry#2 -in $base.optional	-row 3 -column 2 
	grid $base.label#1 -in $root	-row 5 -column 1  \
		-columnspan 2
	grid $base.bug_text -in $root	-row 6 -column 1  \
		-columnspan 2 \
		-sticky nesw
	grid $base.label#6 -in $root	-row 7 -column 1  \
		-columnspan 2 \
		-sticky w
	grid $base.message_text -in $root	-row 8 -column 1  \
		-sticky nesw
	grid $base.scrollbar#1 -in $root	-row 8 -column 2  \
		-sticky ns

	# Resize behavior management

	grid rowconfigure $base.optional 1 -weight 0 -minsize 30
	grid rowconfigure $base.optional 2 -weight 0 -minsize 30
	grid rowconfigure $base.optional 3 -weight 0 -minsize 30
	grid columnconfigure $base.optional 1 -weight 0 -minsize 30
	grid columnconfigure $base.optional 2 -weight 0 -minsize 30

	grid rowconfigure $root 1 -weight 0 -minsize 30
	grid rowconfigure $root 2 -weight 0 -minsize 30
	grid rowconfigure $root 3 -weight 0 -minsize 30
	grid rowconfigure $root 4 -weight 0 -minsize 30
	grid rowconfigure $root 5 -weight 0 -minsize 30
	grid rowconfigure $root 6 -weight 0 -minsize 111
	grid rowconfigure $root 7 -weight 0 -minsize 8
	grid rowconfigure $root 8 -weight 1 -minsize 127
	grid columnconfigure $root 1 -weight 1 -minsize 267
	grid columnconfigure $root 2 -weight 0 -minsize 7

	grid rowconfigure $base.frame#1 1 -weight 0 -minsize 30
	grid columnconfigure $base.frame#1 1 -weight 0 -minsize 30
	grid columnconfigure $base.frame#1 2 -weight 0 -minsize 30
# additional interface code
# end additional interface code

}


# Allow interface to be run "stand-alone" for testing

catch {
    if {$argv0 == [info script]} {
	wm title . "Testing bug"
	bug_ui .
    }
}
