# interface generated by SpecTcl version 1.0 from /mont-blanc/psh/tcllib/pbuild.ui
#   root     is the parent window for this user interface

proc pbuild_ui {root args} {

	# this treats "." as a special case

	if {$root == "."} {
	    set base ""
	} else {
	    set base $root
	}
    
	label $base.label#4 \
		-text {Available Packets}
	catch {
		$base.label#4 configure \
			-font {-*-interface user-Bold-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	label $base.label#5 \
		-text {Available Protocol Layers}
	catch {
		$base.label#5 configure \
			-font {-*-interface user-Bold-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	label $base.label#6 \
		-text {Available Fields}
	catch {
		$base.label#6 configure \
			-font {-*-interface user-Bold-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	label $base.label#1
	catch {
		$base.label#1 configure \
			-font {-*-interface user-Bold-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	label $base.label#2
	catch {
		$base.label#2 configure \
			-font {-*-interface user-Bold-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	label $base.label#3
	catch {
		$base.label#3 configure \
			-font {-*-interface user-Bold-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	listbox $base.listbox#1 \
		-yscrollcommand "$base.scrollbar#1 set" \
		-height 0 \
		-width 0
	catch {
		$base.listbox#1 configure \
			-font {-*-interface user-Medium-R-Normal-*-*-120-*-*-*-*-*-*}
	}

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

	listbox $base.listbox#2 \
		-yscrollcommand "$base.scrollbar#2 set" \
		-height 0 \
		-width 0
	catch {
		$base.listbox#2 configure \
			-font {-*-interface user-Medium-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	scrollbar $base.scrollbar#2 \
		-command "$base.listbox#2 yview" \
		-orient v

	listbox $base.listbox#3 \
		-yscrollcommand "$base.scrollbar#3 set" \
		-height 0 \
		-width 0
	catch {
		$base.listbox#3 configure \
			-font {-*-interface user-Medium-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	scrollbar $base.scrollbar#3 \
		-command "$base.listbox#3 yview" \
		-orient v

	label $base.label#7
	catch {
		$base.label#7 configure \
			-font {-*-interface user-Medium-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	button $base.button#1 \
		-command createPacket \
		-text {Create Packet}
	catch {
		$base.button#1 configure \
			-font {-*-interface user-Medium-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	button $base.button#3 \
		-command copyPackets \
		-text {Copy Packets}
	catch {
		$base.button#3 configure \
			-font {-*-interface user-Medium-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	button $base.button#5 \
		-command deletePacket \
		-text {Delete Packet}
	catch {
		$base.button#5 configure \
			-font {-*-interface user-Medium-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	button $base.button#2 \
		-command {destroy .} \
		-text Quit
	catch {
		$base.button#2 configure \
			-font {-*-interface user-Medium-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	button $base.button#4 \
		-command savetoFile \
		-text {Save to File}
	catch {
		$base.button#4 configure \
			-font {-*-interface user-Medium-R-Normal-*-*-120-*-*-*-*-*-*}
	}

	button $base.button#6 \
		-command pbuildHelp \
		-text Help
	catch {
		$base.button#6 configure \
			-font {-*-interface user-Medium-R-Normal-*-*-120-*-*-*-*-*-*}
	}


	# Geometry management

	grid $base.label#4 -in $root	-row 1 -column 1  \
		-columnspan 2
	grid $base.label#5 -in $root	-row 1 -column 3  \
		-columnspan 2
	grid $base.label#6 -in $root	-row 1 -column 5  \
		-columnspan 2
	grid $base.label#1 -in $root	-row 2 -column 1  \
		-columnspan 2
	grid $base.label#2 -in $root	-row 2 -column 3  \
		-columnspan 2
	grid $base.label#3 -in $root	-row 2 -column 5  \
		-columnspan 2
	grid $base.listbox#1 -in $root	-row 3 -column 1  \
		-sticky nesw
	grid $base.scrollbar#1 -in $root	-row 3 -column 2  \
		-sticky ns
	grid $base.listbox#2 -in $root	-row 3 -column 3  \
		-sticky nesw
	grid $base.scrollbar#2 -in $root	-row 3 -column 4  \
		-sticky ns
	grid $base.listbox#3 -in $root	-row 3 -column 5  \
		-sticky nesw
	grid $base.scrollbar#3 -in $root	-row 3 -column 6  \
		-sticky ns
	grid $base.label#7 -in $root	-row 4 -column 1  \
		-columnspan 6
	grid $base.button#1 -in $root	-row 5 -column 1  \
		-columnspan 2 \
		-sticky nesw
	grid $base.button#3 -in $root	-row 5 -column 3  \
		-columnspan 2 \
		-sticky nesw
	grid $base.button#5 -in $root	-row 5 -column 5  \
		-columnspan 2 \
		-sticky nesw
	grid $base.button#2 -in $root	-row 6 -column 1  \
		-columnspan 2 \
		-sticky nesw
	grid $base.button#4 -in $root	-row 6 -column 3  \
		-columnspan 2 \
		-sticky nesw
	grid $base.button#6 -in $root	-row 6 -column 5  \
		-columnspan 2 \
		-sticky nesw

	# Resize behavior management

	grid rowconfigure $root 1 -weight 0 -minsize 30
	grid rowconfigure $root 2 -weight 0 -minsize 30
	grid rowconfigure $root 3 -weight 1 -minsize 126
	grid rowconfigure $root 4 -weight 0 -minsize 30
	grid rowconfigure $root 5 -weight 0 -minsize 30
	grid rowconfigure $root 6 -weight 0 -minsize 30
	grid columnconfigure $root 1 -weight 0 -minsize 145
	grid columnconfigure $root 2 -weight 0 -minsize 2
	grid columnconfigure $root 3 -weight 0 -minsize 170
	grid columnconfigure $root 4 -weight 0 -minsize 2
	grid columnconfigure $root 5 -weight 0 -minsize 145
	grid columnconfigure $root 6 -weight 0 -minsize 22
# additional interface code
# end additional interface code

}


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

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