-
Notifications
You must be signed in to change notification settings - Fork 0
/
rename.tcl
291 lines (278 loc) · 11.9 KB
/
rename.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
#############################################################################
# Generated by PAGE version 4.7
# in conjunction with Tcl version 8.6
# Jul 24, 2016 11:34:44 AM
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) #111111
#################################
#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 {#d9d9d9} -highlightcolor black
wm focusmodel $top passive
wm geometry $top 623x436+594+359
update
# set in toplevel.wgt.
global vTcl
set vTcl(save,dflt,origin) 0
wm maxsize $top 1905 1050
wm minsize $top 1 1
wm overrideredirect $top 0
wm resizable $top 1 1
wm deiconify $top
wm title $top "Rename utility"
vTcl:DefineAlias "$top" "Toplevel1" vTcl:Toplevel:WidgetProc "" 1
checkbutton $top.che39 \
-activebackground {#d9d9d9} -activeforeground black \
-background {#d9d9d9} -foreground {#000000} -highlightcolor black \
-justify left -text Prepend -variable prepend_checked
vTcl:DefineAlias "$top.che39" "prepend_checkbox" vTcl:WidgetProc "Toplevel1" 1
text $top.tex40 \
-background white -font TkTextFont -foreground black -height 22 \
-highlightcolor black -insertbackground black \
-selectbackground {#c4c4c4} -selectforeground black -state disabled \
-width 146 -wrap none
.top37.tex40 configure -font TkTextFont
.top37.tex40 insert end text
vTcl:DefineAlias "$top.tex40" "prepend_text" vTcl:WidgetProc "Toplevel1" 1
checkbutton $top.che41 \
-activebackground {#d9d9d9} -activeforeground black \
-background {#d9d9d9} -foreground {#000000} -highlightcolor black \
-justify left -text Append -variable append_checked
vTcl:DefineAlias "$top.che41" "append_checkbox" vTcl:WidgetProc "Toplevel1" 1
text $top.tex42 \
-background white -font TkTextFont -foreground black -height 22 \
-highlightcolor black -insertbackground black \
-selectbackground {#c4c4c4} -selectforeground black -state disabled \
-width 146 -wrap word
.top37.tex42 configure -font TkTextFont
.top37.tex42 insert end text
vTcl:DefineAlias "$top.tex42" "append_text" vTcl:WidgetProc "Toplevel1" 1
checkbutton $top.che43 \
-activebackground {#d9d9d9} -activeforeground black \
-background {#d9d9d9} -foreground {#000000} -highlightcolor black \
-justify left -text {Append before ext} \
-variable append_before_ext_checked
vTcl:DefineAlias "$top.che43" "append_before_ext_checkbox" vTcl:WidgetProc "Toplevel1" 1
text $top.tex44 \
-background white -font TkTextFont -foreground black -height 22 \
-highlightcolor black -insertbackground black \
-selectbackground {#c4c4c4} -selectforeground black -state disabled \
-width 146 -wrap word
.top37.tex44 configure -font TkTextFont
.top37.tex44 insert end text
vTcl:DefineAlias "$top.tex44" "append_before_ext_text" vTcl:WidgetProc "Toplevel1" 1
text $top.tex46 \
-background white -font TkTextFont -foreground black -height 22 \
-highlightcolor black -insertbackground black \
-selectbackground {#c4c4c4} -selectforeground black -state disabled \
-width 526 -wrap word
.top37.tex46 configure -font TkTextFont
.top37.tex46 insert end text
vTcl:DefineAlias "$top.tex46" "match_text" vTcl:WidgetProc "Toplevel1" 1
checkbutton $top.che48 \
-activebackground {#d9d9d9} -activeforeground black \
-background {#d9d9d9} -foreground {#000000} -highlightcolor black \
-justify left -text {Match and replace} \
-variable match_and_replace_checked
vTcl:DefineAlias "$top.che48" "match_and_replace_checkbox" vTcl:WidgetProc "Toplevel1" 1
text $top.tex49 \
-background white -font TkTextFont -foreground black -height 22 \
-highlightcolor black -insertbackground black \
-selectbackground {#c4c4c4} -selectforeground black -state disabled \
-width 526 -wrap word
.top37.tex49 configure -font TkTextFont
.top37.tex49 insert end text
vTcl:DefineAlias "$top.tex49" "replace_text" vTcl:WidgetProc "Toplevel1" 1
checkbutton $top.che50 \
-activebackground {#d9d9d9} -activeforeground black \
-background {#d9d9d9} -foreground {#000000} -highlightcolor black \
-justify left -text {Match and replace (Perl regex)} \
-variable match_and_replace_regex_checked
vTcl:DefineAlias "$top.che50" "match_and_replace_regex_checkbox" vTcl:WidgetProc "Toplevel1" 1
text $top.tex53 \
-background white -font TkTextFont -foreground black -height 22 \
-highlightcolor black -insertbackground black \
-selectbackground {#c4c4c4} -selectforeground black -state disabled \
-width 526 -wrap word
.top37.tex53 configure -font TkTextFont
.top37.tex53 insert end text
vTcl:DefineAlias "$top.tex53" "match_regex_text" vTcl:WidgetProc "Toplevel1" 1
text $top.tex54 \
-background white -font TkTextFont -foreground black -height 22 \
-highlightcolor black -insertbackground black \
-selectbackground {#c4c4c4} -selectforeground black -state disabled \
-width 526 -wrap word
.top37.tex54 configure -font TkTextFont
.top37.tex54 insert end text
vTcl:DefineAlias "$top.tex54" "replace_regex_text" vTcl:WidgetProc "Toplevel1" 1
button $top.but55 \
-activebackground {#d9d9d9} -activeforeground black \
-background {#d9d9d9} -foreground {#000000} -highlightcolor black \
-text Apply
vTcl:DefineAlias "$top.but55" "apply_button" vTcl:WidgetProc "Toplevel1" 1
button $top.but56 \
-activebackground {#d9d9d9} -activeforeground black \
-background {#d9d9d9} -foreground {#000000} -highlightcolor black \
-state active -text {Patternify selection}
vTcl:DefineAlias "$top.but56" "patternify_selection_button" vTcl:WidgetProc "Toplevel1" 1
label $top.lab60 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#d9d9d9} -foreground {#000000} -highlightcolor black \
-text Preview
vTcl:DefineAlias "$top.lab60" "preview_label" vTcl:WidgetProc "Toplevel1" 1
label $top.lab61 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#d9d9d9} -foreground {#000000} -highlightcolor black \
-text {Current directory}
vTcl:DefineAlias "$top.lab61" "current_directory_label" vTcl:WidgetProc "Toplevel1" 1
text $top.tex62 \
-background white -font TkTextFont -foreground black -height 22 \
-highlightcolor black -insertbackground black \
-selectbackground {#c4c4c4} -selectforeground black -width 366 \
-wrap word
.top37.tex62 configure -font TkTextFont
.top37.tex62 insert end text
vTcl:DefineAlias "$top.tex62" "current_directory_text" vTcl:WidgetProc "Toplevel1" 1
button $top.but63 \
-activebackground {#d9d9d9} -activeforeground black \
-background {#d9d9d9} -foreground {#000000} -highlightcolor black \
-text Browse
vTcl:DefineAlias "$top.but63" "browse_button" vTcl:WidgetProc "Toplevel1" 1
checkbutton $top.che36 \
-activebackground {#d9d9d9} -activeforeground black \
-background {#d9d9d9} -foreground {#000000} -highlightcolor black \
-justify left -text {Rename files} -variable rename_files_checkbox
vTcl:DefineAlias "$top.che36" "rename_files_checkbox" vTcl:WidgetProc "Toplevel1" 1
checkbutton $top.che37 \
-activebackground {#d9d9d9} -activeforeground black \
-background {#d9d9d9} -foreground {#000000} -highlightcolor black \
-justify left -text {Rename directories} \
-variable rename_directories_checkbox
vTcl:DefineAlias "$top.che37" "rename_directories_checkbox" vTcl:WidgetProc "Toplevel1" 1
text $top.tex36 \
-background white -font TkTextFont -foreground black -height 82 \
-highlightcolor black -insertbackground black \
-selectbackground {#c4c4c4} -selectforeground black -width 526 \
-wrap word
.top37.tex36 configure -font TkTextFont
.top37.tex36 insert end text
vTcl:DefineAlias "$top.tex36" "preview_text" vTcl:WidgetProc "Toplevel1" 1
###################
# SETTING GEOMETRY
###################
place $top.che39 \
-in $top -x 40 -y 210 -anchor nw -bordermode ignore
place $top.tex40 \
-in $top -x 50 -y 230 -width 146 -height 22 -anchor nw \
-bordermode ignore
place $top.che41 \
-in $top -x 200 -y 210 -anchor nw -bordermode ignore
place $top.tex42 \
-in $top -x 210 -y 230 -width 146 -height 22 -anchor nw \
-bordermode ignore
place $top.che43 \
-in $top -x 360 -y 210 -anchor nw -bordermode ignore
place $top.tex44 \
-in $top -x 370 -y 230 -width 146 -height 22 -anchor nw \
-bordermode ignore
place $top.tex46 \
-in $top -x 50 -y 70 -width 526 -height 22 -anchor nw \
-bordermode ignore
place $top.che48 \
-in $top -x 40 -y 50 -anchor nw -bordermode ignore
place $top.tex49 \
-in $top -x 50 -y 90 -width 526 -height 22 -anchor nw \
-bordermode ignore
place $top.che50 \
-in $top -x 40 -y 130 -anchor nw -bordermode ignore
place $top.tex53 \
-in $top -x 50 -y 150 -width 526 -height 22 -anchor nw \
-bordermode ignore
place $top.tex54 \
-in $top -x 50 -y 170 -width 526 -height 22 -anchor nw \
-bordermode ignore
place $top.but55 \
-in $top -x 440 -y 390 -width 130 -height 26 -anchor nw \
-bordermode ignore
place $top.but56 \
-in $top -x 260 -y 120 -width 127 -height 26 -anchor nw \
-bordermode ignore
place $top.lab60 \
-in $top -x 50 -y 270 -anchor nw -bordermode ignore
place $top.lab61 \
-in $top -x 50 -y 20 -anchor nw -bordermode ignore
place $top.tex62 \
-in $top -x 170 -y 20 -width 366 -height 22 -anchor nw \
-bordermode ignore
place $top.but63 \
-in $top -x 540 -y 10 -width 67 -height 36 -anchor nw \
-bordermode ignore
place $top.che36 \
-in $top -x 180 -y 390 -anchor nw -bordermode ignore
place $top.che37 \
-in $top -x 280 -y 390 -anchor nw -bordermode ignore
place $top.tex36 \
-in $top -x 50 -y 290 -width 526 -height 82 -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