forked from iori-yja/WORD-bukkyo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
title.wish
executable file
·69 lines (55 loc) · 1.65 KB
/
title.wish
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/wish
package require Tclx
set background white
wm geometry . "1280x1024"
. configure -bg #fff
#frame .f0
#frame .f1
#frame .f2
#frame .f3
#frame .f4
image create photo im -file "img/bukkyo.png"
image create photo bg -file "img/backgroundDefault.png"
canvas .c -width 1280 -height 1024 -background #fff -borderwidth 0 -highlightthickness 0
.c create image 640 312 -image bg
.c create image 640 100 -image im
#pack .c
pack .c
#canvas .f1.g -width 1280 -background #fff -borderwidth 0 -highlightthickness 0
#.f1.g create image 1280 924 -image bg
frame .f2
label .l1 -textvariable userid -height 1 -font {{MMCedar} 24} -background #fff -borderwidth 0 -highlightthickness 0
label .l2 -textvariable username -height 2 -font {{MMcedar} 32} -background #fff -borderwidth 0 -highlightthickness 0
label .l3 -textvariable balance -height 2 -font {{MMcedar} 20} -background #fff -borderwidth 0 -highlightthickness 0
pack .l1 .l2 .l3 -in .f2
entry .barcode -textvariable item
button .buttonexit -text "exit" -command "exec killall xinit"
bind .barcode <Key-Return> {
puts $item
exec kill -USR1 [lindex $argv 0]
set item ""
}
#pack .f3.e1
#pack .f4.b1
#pack .c .l1 .l2 .l3 .e1 .b1
.c create window 640 812 -window .f2 -width 1280 -height 250
.c create window 640 300 -window .barcode -width 300 -height 40
.c create window 1000 200 -window .buttonexit -width 100 -height 40
raise .
focus .barcode
set userid ""
set username ""
set balance ""
set dum ""
proc writename {} {
gets stdin ::userid
gets stdin ::username
gets stdin ::balance
}
proc clearname {} {
set ::userid ""
set ::username ""
set ::balance ""
}
signal trap USR1 writename
signal trap USR2 clearname