-
Notifications
You must be signed in to change notification settings - Fork 0
/
gui.tcl
139 lines (127 loc) · 4.3 KB
/
gui.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
#############################################################################
# Generated by PAGE version 4.24.1
# in conjunction with Tcl version 8.6
# May 18, 2020 03:43:32 PM CEST platform: Windows NT
set vTcl(timestamp) ""
if {!$vTcl(borrow)} {
set vTcl(actual_gui_bg) #d9d9d9
set vTcl(actual_gui_fg) #000000
set vTcl(actual_gui_analog) #ececec
set vTcl(actual_gui_menu_analog) #ececec
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) #ececec
set vTcl(active_fg) #000000
set vTcl(actual_gui_menu_active_bg) #ececec
set vTcl(active_menu_fg) #000000
}
if {[info exists vTcl(sourcing)]} {
proc vTcl:project:info {} {
set base .top42
global vTcl
set base $vTcl(btop)
if {$base == ""} {
set base .top42
}
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
}
}
}
proc vTclWindow.top42 {base} {
if {$base == ""} {
set base .top42
}
if {[winfo exists $base]} {
wm deiconify $base; return
}
set top $base
###################
# CREATING WIDGETS
###################
vTcl::widgets::core::toplevel::createCmd $top -class Toplevel \
-background {#d9d9d9} -highlightbackground {#d9d9d9} \
-highlightcolor black
wm focusmodel $top passive
wm geometry $top 600x450+818+171
update
# set in toplevel.wgt.
global vTcl
global img_list
set vTcl(save,dflt,origin) 0
wm maxsize $top 3972 1137
wm minsize $top 88 1
wm overrideredirect $top 0
wm resizable $top 1 1
wm deiconify $top
wm title $top "New Toplevel"
vTcl:DefineAlias "$top" "Toplevel1" vTcl:Toplevel:WidgetProc "" 1
ttk::combobox $top.tCo44 \
-values {{"sk","en","pl","jp","kr"}} -font TkTextFont -foreground {} \
-background {} -takefocus {}
vTcl:DefineAlias "$top.tCo44" "TCombobox1" vTcl:WidgetProc "Toplevel1" 1
text $top.tex46 \
-background white -font TkTextFont -foreground black -height 406 \
-highlightbackground {#d9d9d9} -highlightcolor black \
-insertbackground black -selectbackground {#c4c4c4} \
-selectforeground black -width 584 -wrap word
.top42.tex46 configure -font "TkTextFont"
.top42.tex46 insert end text
vTcl:DefineAlias "$top.tex46" "Text1" vTcl:WidgetProc "Toplevel1" 1
button $top.but47 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -pady 0 \
-text Save
vTcl:DefineAlias "$top.but47" "Button1" vTcl:WidgetProc "Toplevel1" 1
label $top.lab43 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -justify left \
-relief groove -text {Word count:}
vTcl:DefineAlias "$top.lab43" "Label1" vTcl:WidgetProc "Toplevel1" 1
###################
# SETTING GEOMETRY
###################
place $top.tCo44 \
-in $top -x 10 -y 10 -width 63 -relwidth 0 -height 19 -relheight 0 \
-anchor nw -bordermode ignore
place $top.tex46 \
-in $top -x 10 -y 30 -width 584 -relwidth 0 -height 406 -relheight 0 \
-anchor nw -bordermode ignore
place $top.but47 \
-in $top -x 510 -y 10 -width 80 -relwidth 0 -height 21 -relheight 0 \
-anchor nw -bordermode ignore
place $top.lab43 \
-in $top -x 80 -y 10 -width 425 -relwidth 0 -height 19 -relheight 0 \
-anchor nw -bordermode ignore
vTcl:FireEvent $base <<Ready>>
}
set btop ""
if {$vTcl(borrow)} {
set btop .bor[expr int([expr rand() * 100])]
while {[lsearch $btop $vTcl(tops)] != -1} {
set btop .bor[expr int([expr rand() * 100])]
}
}
set vTcl(btop) $btop
Window show .
Window show .top42 $btop
if {$vTcl(borrow)} {
$btop configure -background plum
}