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

proc help_ui {root args} {

	# this treats "." as a special case

	if {$root == "."} {
	    set base ""
	} else {
	    set base $root
	}
    
	frame $base.frame#1

	button $base.back \
		-command "HMlink_callback $base.text" \
		-padx 9 \
		-pady 3 \
		-text back

	button $base.button#2 \
		-command "bind_unmap $root;HMset_state $base.text -stop 1; after 5000 {destroy $root}" \
		-padx 9 \
		-pady 3 \
		-text dismiss

	label $base.file \
		-textvariable Help_file \
		-width 20

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

	text $base.text \
		-height 1 \
		-highlightthickness 0 \
		-width 1 \
		-xscrollcommand "$base.scrollbar#2 set" \
		-yscrollcommand "$base.scrollbar#1 set"
	catch {
		$base.text configure \
			-font -*-Courier-Medium-R-Normal-*-*-140-*-*-*-*-*-*
	}

	scrollbar $base.scrollbar#2 \
		-command "$base.text xview" \
		-orient h

	label $base.message \
		-textvariable Help_message


	# Geometry management

	grid $base.frame#1 -in $root	-row 1 -column 1  \
		-columnspan 2 \
		-sticky ew
	grid $base.back -in $base.frame#1	-row 1 -column 1 
	grid $base.button#2 -in $base.frame#1	-row 1 -column 2 
	grid $base.file -in $base.frame#1	-row 1 -column 3 
	grid $base.scrollbar#1 -in $root	-row 2 -column 1  \
		-sticky ns
	grid $base.text -in $root	-row 2 -column 2  \
		-sticky nesw
	grid $base.scrollbar#2 -in $root	-row 3 -column 2  \
		-sticky ew
	grid $base.message -in $root	-row 4 -column 1  \
		-columnspan 2

	# Resize behavior management

	grid rowconfigure $root 1 -weight 0 -minsize 30
	grid rowconfigure $root 2 -weight 1 -minsize 442
	grid rowconfigure $root 3 -weight 0 -minsize 12
	grid rowconfigure $root 4 -weight 0 -minsize 15
	grid columnconfigure $root 1 -weight 0 -minsize 15
	grid columnconfigure $root 2 -weight 1 -minsize 523

	grid rowconfigure $base.frame#1 1 -weight 0 -minsize 30
	grid columnconfigure $base.frame#1 1 -weight 0 -minsize 26
	grid columnconfigure $base.frame#1 2 -weight 0 -minsize 30
	grid columnconfigure $base.frame#1 3 -weight 1 -minsize 30
# additional interface code
global Fonts
catch {unset Fonts}
bind $base.text <space> {%W yview scroll 1 page;break}
bind $base.text <Home> {%W yview 0.0;break}
focus $base.text

# end additional interface code

}


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

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