#!/usr/local/bin/wish8.0jp
kanji defaultInputCode EUC

wm title . "Tk_SendTerm"
. configure -width 300 -height 400

label .l0 -text "Terminal" 
label .l1 -relief sunken
label .l2 -text "åϤƲ"

listbox .lb0 -yscrollcommand ".sb0 set"
foreach access_list [ exec sendterm accessuser ] {
	.lb0 insert end $access_list
}
scrollbar .sb0 -orient vertical -command ".lb0 yview"

text .t0 -yscrollcommand ".sb1 set"
scrollbar .sb1 -orient vertical -command ".t0 yview"

button .b0 -text "" -command {
	exec sendterm sendmessage [ .lb0 get active ] [ .t0 get 1.0 end ]
}
button .b1 -text "λ" -command exit

place .l0 -relx 0.5 -y 5 -anchor n
place .lb0 -x 5 -y 30 -width 270 -height 195
place .sb0 -x 295 -y 30 -width 20 -height 195 -anchor ne
place .l1 -x 5 -y 227 -width 290 -height 4
place .l2 -relx 0.5 -y 235  -anchor n
place .t0 -x 5 -y 260 -width 270 -height 105
place .sb1 -x 295 -y 260 -width 20 -height 105 -anchor ne
place .b0 -relx 0.35 -y 395 -anchor s
place .b1 -relx 0.65 -y 395 -anchor s
