-
Notifications
You must be signed in to change notification settings - Fork 0
/
TextConverter.tcl
316 lines (302 loc) · 13.7 KB
/
TextConverter.tcl
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
#############################################################################
# Generated by PAGE version 4.9
# in conjunction with Tcl version 8.6
set vTcl(timestamp) ""
set vTcl(actual_gui_bg) #d9d9d9
set vTcl(actual_gui_fg) #000000
set vTcl(actual_gui_menu_bg) #d9d9d9
set vTcl(actual_gui_menu_fg) #000000
set vTcl(complement_color) #d9d9d9
set vTcl(analog_color_p) #d9d9d9
set vTcl(analog_color_m) #d9d9d9
set vTcl(active_fg) #000000
set vTcl(actual_gui_menu_active_bg) #d8d8d8
set vTcl(active_menu_fg) #000000
#############################################################################
# vTcl Code to Load User Fonts
vTcl:font:add_font \
"-family Plump -size 15 -weight bold -slant roman -underline 0 -overstrike 0" \
user \
vTcl:font10
vTcl:font:add_font \
"-family Plump -size 20 -weight bold -slant roman -underline 0 -overstrike 0" \
user \
vTcl:font9
#################################
#LIBRARY PROCEDURES
#
if {[info exists vTcl(sourcing)]} {
proc vTcl:project:info {} {
set base .top37
namespace eval ::widgets::$base {
set dflt,origin 0
set runvisible 1
}
namespace eval ::widgets_bindings {
set tagslist _TopLevel
}
namespace eval ::vTcl::modules::main {
set procs {
}
set compounds {
}
set projectType single
}
}
}
#################################
# USER DEFINED PROCEDURES
#
#################################
# GENERATED GUI PROCEDURES
#
proc vTclWindow.top37 {base} {
if {$base == ""} {
set base .top37
}
if {[winfo exists $base]} {
wm deiconify $base; return
}
set top $base
###################
# CREATING WIDGETS
###################
vTcl::widgets::core::toplevel::createCmd $top -class Toplevel \
-background {#000000} -highlightbackground {#f0f0f0f0f0f0} \
-highlightcolor black
wm focusmodel $top passive
wm geometry $top 1920x1018+256+275
update
# set in toplevel.wgt.
global vTcl
set vTcl(save,dflt,origin) 0
wm maxsize $top 1920 1018
wm minsize $top 116 1
wm overrideredirect $top 0
wm resizable $top 1 1
wm iconify $top
wm title $top "Text Converter"
vTcl:DefineAlias "$top" "Cryptage" vTcl:Toplevel:WidgetProc "" 1
label $top.lab46 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#000000} -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font9,object) -foreground {#ffffff} \
-height 10 -highlightbackground {#d9d9d9} -highlightcolor black \
-text {Convert to :}
vTcl:DefineAlias "$top.lab46" "Label1" vTcl:WidgetProc "Cryptage" 1
button $top.but47 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.but47" "Button1" vTcl:WidgetProc "Cryptage" 1
button $top.cpd55 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd55" "Button2" vTcl:WidgetProc "Cryptage" 1
button $top.cpd56 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd56" "Button3" vTcl:WidgetProc "Cryptage" 1
button $top.cpd57 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd57" "Button4" vTcl:WidgetProc "Cryptage" 1
button $top.cpd58 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd58" "Button5" vTcl:WidgetProc "Cryptage" 1
button $top.cpd59 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd59" "Button6" vTcl:WidgetProc "Cryptage" 1
button $top.cpd60 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd60" "Button7" vTcl:WidgetProc "Cryptage" 1
button $top.cpd61 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd61" "Button8" vTcl:WidgetProc "Cryptage" 1
button $top.cpd70 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd70" "Button9" vTcl:WidgetProc "Cryptage" 1
button $top.cpd71 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd71" "Button10" vTcl:WidgetProc "Cryptage" 1
button $top.cpd72 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd72" "Button11" vTcl:WidgetProc "Cryptage" 1
button $top.cpd73 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd73" "Button12" vTcl:WidgetProc "Cryptage" 1
button $top.cpd74 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd74" "Button13" vTcl:WidgetProc "Cryptage" 1
button $top.cpd75 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd75" "Button14" vTcl:WidgetProc "Cryptage" 1
button $top.cpd76 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd76" "Button15" vTcl:WidgetProc "Cryptage" 1
button $top.cpd77 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#ffffff} -command change -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -padx 0 -pady 0 \
-text {Convert Text to Binary} -width 30
vTcl:DefineAlias "$top.cpd77" "Button16" vTcl:WidgetProc "Cryptage" 1
text $top.tex37 \
-background white -font $::vTcl(fonts,vTcl:font10,object) \
-foreground black -height 454 -highlightbackground {#d9d9d9} \
-highlightcolor black -insertbackground black \
-selectbackground {#c4c4c4} -selectforeground black -undo 1 \
-width 1254 -wrap word
.top37.tex37 configure -font font10
.top37.tex37 insert end text
vTcl:DefineAlias "$top.tex37" "Text1" vTcl:WidgetProc "Cryptage" 1
text $top.tex38 \
-background white -font $::vTcl(fonts,vTcl:font10,object) \
-foreground black -height 454 -highlightbackground {#d9d9d9} \
-highlightcolor black -insertbackground black \
-selectbackground {#c4c4c4} -selectforeground black -undo 1 \
-width 1254 -wrap word
.top37.tex38 configure -font font10
.top37.tex38 insert end text
vTcl:DefineAlias "$top.tex38" "Text2" vTcl:WidgetProc "Cryptage" 1
canvas $top.can40 \
-background white -borderwidth 2 -closeenough 1.0 -height 1 \
-insertbackground black -relief ridge -selectbackground {#c4c4c4} \
-selectforeground black -width 556
vTcl:DefineAlias "$top.can40" "Canvas1" vTcl:WidgetProc "Cryptage" 1
###################
# SETTING GEOMETRY
###################
place $top.lab46 \
-in $top -x 550 -y 490 -width 210 -relwidth 0 -height 29 -relheight 0 \
-anchor nw -bordermode ignore
place $top.but47 \
-in $top -x 1420 -y 20 -anchor nw -bordermode ignore
place $top.cpd55 \
-in $top -x 1420 -y 80 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd56 \
-in $top -x 1420 -y 140 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd57 \
-in $top -x 1420 -y 200 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd58 \
-in $top -x 1420 -y 260 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd59 \
-in $top -x 1420 -y 320 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd60 \
-in $top -x 1420 -y 380 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd61 \
-in $top -x 1420 -y 440 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd70 \
-in $top -x 1420 -y 540 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd71 \
-in $top -x 1420 -y 600 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd72 \
-in $top -x 1420 -y 660 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd73 \
-in $top -x 1420 -y 720 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd74 \
-in $top -x 1420 -y 780 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd75 \
-in $top -x 1420 -y 840 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd76 \
-in $top -x 1420 -y 900 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.cpd77 \
-in $top -x 1420 -y 960 -width 428 -height 38 -anchor nw \
-bordermode inside
place $top.tex37 \
-in $top -x 20 -y 20 -width 1250 -relwidth 0 -height 450 -relheight 0 \
-anchor nw -bordermode ignore
place $top.tex38 \
-in $top -x 20 -y 540 -width 1250 -relwidth 0 -height 450 \
-relheight 0 -anchor nw -bordermode ignore
place $top.can40 \
-in $top -x 1360 -y 510 -width 556 -relwidth 0 -height 1 -relheight 0 \
-anchor nw -bordermode ignore
vTcl:FireEvent $base <<Ready>>
}
#############################################################################
## Binding tag: _TopLevel
bind "_TopLevel" <<Create>> {
if {![info exists _topcount]} {set _topcount 0}; incr _topcount
}
bind "_TopLevel" <<DeleteWindow>> {
if {[set ::%W::_modal]} {
vTcl:Toplevel:WidgetProc %W endmodal
} else {
destroy %W; if {$_topcount == 0} {exit}
}
}
bind "_TopLevel" <Destroy> {
if {[winfo toplevel %W] == "%W"} {incr _topcount -1}
}
Window show .
Window show .top37