setConv.tcl
5.85 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
#------------------ Set Convert --------------------------------------------------
frame .setConvertFrame0 -relief ridge -borderwidth 2
frame .setConvertFrame1 -relief ridge -borderwidth 2
frame .setConvertFrame2 -relief ridge -borderwidth 2
frame .setConvertFrame3 -relief ridge -borderwidth 2
frame .setConvertFrame4 -relief ridge -borderwidth 2
frame .setConvertFrame5 -relief ridge -borderwidth 2
frame .setConvertPair0
frame .setConvertPair1
frame .setConvertPair2
frame .setConvertPair3
frame .setConvertPair4
frame .setConvertPair5
label .setConvertL -text "setConvert" -relief groove
scale .setConvertS0 -label K0 -from 0 -to 255 -length 130 -orient vertical \
-command CsetConvertK0
entry .setConvertE0 -width 3 -relief sunken -textvariable setConvertK0
#set setConvertK0 128
#.setConvertS0 set 128
bind .setConvertE0 <Return> {
if {$setConvertK0 > 255} {set setConvertK0 255}
if {$setConvertK0 < 0} {set setConvertK0 0}
.setConvertS0 set $setConvertK0
focus none
if {$record == 1} {
puts $fptr "set setConvertK0 $setConvertK0"
puts $fptr ".setConvertS0 set $setConvertK0"
}
}
proc CsetConvertK0 value {
global setConvertK0
global fptr record
set setConvertK0 $value
if {$record == 1} {
puts $fptr "set setConvertK0 $setConvertK0"
puts $fptr ".setConvertS0 set $setConvertK0"
}
callback_setConvert
callback_send_dl
}
scale .setConvertS1 -label K1 -from 0 -to 255 -length 130 -orient vertical \
-command CsetConvertK1
entry .setConvertE1 -width 3 -relief sunken -textvariable setConvertK1
#set setConvertK1 128
#.setConvertS1 set 128
bind .setConvertE1 <Return> {
if {$setConvertK1 > 255} {set setConvertK1 255}
if {$setConvertK1 < 0} {set setConvertK1 0}
.setConvertS1 set $setConvertK1
focus none
if {$record == 1} {
puts $fptr "set setConvertK1 $setConvertK1"
puts $fptr ".setConvertS1 set $setConvertK1"
}
}
proc CsetConvertK1 value {
global setConvertK1
global fptr record
set setConvertK1 $value
if {$record == 1} {
puts $fptr "set setConvertK1 $setConvertK1"
puts $fptr ".setConvertS1 set $setConvertK1"
}
callback_setConvert
callback_send_dl
}
scale .setConvertS2 -label K2 -from 0 -to 255 -length 130 -orient vertical \
-command CsetConvertK2
entry .setConvertE2 -width 3 -relief sunken -textvariable setConvertK2
#set setConvertK2 128
#.setConvertS2 set 128
bind .setConvertE2 <Return> {
if {$setConvertK2 > 255} {set setConvertK2 255}
if {$setConvertK2 < 0} {set setConvertK2 0}
.setConvertS2 set $setConvertK2
focus none
if {$record == 1} {
puts $fptr "set setConvertK2 $setConvertK2"
puts $fptr ".setConvertS2 set $setConvertK2"
}
}
proc CsetConvertK2 value {
global setConvertK2
global fptr record
set setConvertK2 $value
if {$record == 1} {
puts $fptr "set setConvertK2 $setConvertK2"
puts $fptr ".setConvertS2 set $setConvertK2"
}
callback_setConvert
callback_send_dl
}
scale .setConvertS3 -label K3 -from 0 -to 255 -length 130 -orient vertical \
-command CsetConvertK3
entry .setConvertE3 -width 3 -relief sunken -textvariable setConvertK3
#set setConvertK3 128
#.setConvertS3 set 128
bind .setConvertE3 <Return> {
if {$setConvertK3 > 255} {set setConvertK3 255}
if {$setConvertK3 < 0} {set setConvertK3 0}
.setConvertS3 set $setConvertK3
focus none
if {$record == 1} {
puts $fptr "set setConvertK3 $setConvertK3"
puts $fptr ".setConvertS3 set $setConvertK3"
}
}
proc CsetConvertK3 value {
global setConvertK3
global fptr record
set setConvertK3 $value
if {$record == 1} {
puts $fptr "set setConvertK3 $setConvertK3"
puts $fptr ".setConvertS3 set $setConvertK3"
}
callback_setConvert
callback_send_dl
}
scale .setConvertS4 -label K4 -from 0 -to 255 -length 130 -orient vertical \
-command CsetConvertK4
entry .setConvertE4 -width 3 -relief sunken -textvariable setConvertK4
#set setConvertK4 128
#.setConvertS4 set 128
bind .setConvertE4 <Return> {
if {$setConvertK4 > 255} {set setConvertK4 255}
if {$setConvertK4 < 0} {set setConvertK4 0}
.setConvertS4 set $setConvertK4
.cc.convertK4S set $setConvertK4
focus none
if {$record == 1} {
puts $fptr "set setConvertK4 $setConvertK4"
puts $fptr ".setConvertS4 set $setConvertK4"
puts $fptr ".cc.convertK4S set $setConvertK4"
}
callback_setConvert
callback_send_dl
}
proc CsetConvertK4 value {
global setConvertK4 ccConvertK4
global fptr record
set setConvertK4 $value
.cc.convertK4S set $setConvertK4
if {$record == 1} {
puts $fptr "set setConvertK4 $setConvertK4"
puts $fptr ".setConvertS4 set $setConvertK4"
puts $fptr ".cc.convertK4S set $setConvertK4"
}
callback_setConvert
callback_send_dl
}
scale .setConvertS5 -label K5 -from 0 -to 255 -length 130 -orient vertical \
-command CsetConvertK5
entry .setConvertE5 -width 3 -relief sunken -textvariable setConvertK5
#set setConvertK5 128
#.setConvertS5 set 128
bind .setConvertE5 <Return> {
if {$setConvertK5 > 255} {set setConvertK5 255}
if {$setConvertK5 < 0} {set setConvertK5 0}
.setConvertS5 set $setConvertK5
.cc.convertK5S set $setConvertK5
focus none
if {$record == 1} {
puts $fptr "set setConvertK5 $setConvertK5"
puts $fptr "CsetConvertK5 $setConvertK5"
puts $fptr ".setConvertS5 set $setConvertK5"
puts $fptr ".cc.convertK5S set $setConvertK5"
}
}
proc CsetConvertK5 value {
global setConvertK5 ccConvertK4
global fptr record
set setConvertK5 $value
.cc.convertK5S set $setConvertK5
if {$record == 1} {
puts $fptr "set setConvertK5 $setConvertK5"
puts $fptr "CsetConvertK5 $setConvertK5"
puts $fptr ".setConvertS5 set $setConvertK5"
puts $fptr ".cc.convertK5S set $setConvertK5"
}
callback_setConvert
callback_send_dl
}
set setConvertK1 128