-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodelselect.tcl
216 lines (201 loc) · 7.58 KB
/
modelselect.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
#############################################################################
# Generated by PAGE version 4.13
# in conjunction with Tcl version 8.6
set vTcl(timestamp) ""
if {!$vTcl(borrow)} {
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 {Segoe UI Black} -size 16 -weight bold -slant roman -underline 0 -overstrike 0" \
user \
vTcl:font10
vTcl:font:add_font \
"-family {Segoe UI} -size 14 -weight normal -slant roman -underline 0 -overstrike 0" \
user \
vTcl:font9
#################################
#LIBRARY PROCEDURES
#
if {[info exists vTcl(sourcing)]} {
proc vTcl:project:info {} {
set base .top37
global vTcl
set base $vTcl(btop)
if {$base == ""} {
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
}
}
}
#################################
# 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 \
-menu "$top.m47" -background {#d9d9d9} -highlightbackground {#d9d9d9} \
-highlightcolor black
wm focusmodel $top passive
wm geometry $top 736x962+650+17
update
# set in toplevel.wgt.
global vTcl
global img_list
set vTcl(save,dflt,origin) 0
wm maxsize $top 1924 1055
wm minsize $top 148 1
wm overrideredirect $top 0
wm resizable $top 1 1
wm deiconify $top
wm title $top "Model Selection"
vTcl:DefineAlias "$top" "Toplevel1" vTcl:Toplevel:WidgetProc "" 1
button $top.but38 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-foreground {#000000} -highlightbackground {#d9d9d9} \
-highlightcolor black -pady 0 -text {Load CSV File}
vTcl:DefineAlias "$top.but38" "Button1" vTcl:WidgetProc "Toplevel1" 1
label $top.lab39 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font10,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black \
-text {Model Selection}
vTcl:DefineAlias "$top.lab39" "Label1" vTcl:WidgetProc "Toplevel1" 1
button $top.but40 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-foreground {#000000} -highlightbackground {#d9d9d9} \
-highlightcolor black -pady 0 -text Apply
vTcl:DefineAlias "$top.but40" "Button2" vTcl:WidgetProc "Toplevel1" 1
label $top.lab41 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-foreground {#000000} -highlightbackground {#d9d9d9} \
-highlightcolor black -text {Select Algorithm:}
vTcl:DefineAlias "$top.lab41" "Label2" vTcl:WidgetProc "Toplevel1" 1
listbox $top.lis42 \
-background white -disabledforeground {#a3a3a3} -font TkFixedFont \
-foreground {#000000} -height 118 -highlightbackground {#d9d9d9} \
-highlightcolor black -selectbackground {#c4c4c4} \
-selectforeground black -width 284 -listvariable classVar
.top37.lis42 configure -font TkFixedFont
.top37.lis42 insert end text
vTcl:DefineAlias "$top.lis42" "Listbox1" vTcl:WidgetProc "Toplevel1" 1
button $top.but56 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-foreground {#000000} -highlightbackground {#d9d9d9} \
-highlightcolor black -pady 0 -text Close
vTcl:DefineAlias "$top.but56" "Button7" vTcl:WidgetProc "Toplevel1" 1
set site_3_0 $top.m47
menu $site_3_0 \
-activebackground {#d8d8d8} -activeforeground {#000000} \
-background {#d9d9d9} -font TkMenuFont -foreground {#000000} \
-tearoff 0
label $top.lab49 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font $::vTcl(fonts,vTcl:font9,object) -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black \
-text {Clustering Algorithm Details}
vTcl:DefineAlias "$top.lab49" "Label3" vTcl:WidgetProc "Toplevel1" 1
label $top.lab51 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-foreground {#000000} -highlightbackground {#d9d9d9} \
-highlightcolor black -text {Select algoirthm first}
vTcl:DefineAlias "$top.lab51" "Label5" vTcl:WidgetProc "Toplevel1" 1
button $top.but53 \
-activebackground {#d9d9d9} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-foreground {#000000} -highlightbackground {#d9d9d9} \
-highlightcolor black -pady 0 -text Save
vTcl:DefineAlias "$top.but53" "Button3" vTcl:WidgetProc "Toplevel1" 1
###################
# SETTING GEOMETRY
###################
place $top.but38 \
-in $top -x 60 -y 80 -anchor nw -bordermode ignore
place $top.lab39 \
-in $top -x 280 -y 20 -anchor nw -bordermode ignore
place $top.but40 \
-in $top -x 530 -y 140 -width 62 -relwidth 0 -height 33 -relheight 0 \
-anchor nw -bordermode ignore
place $top.lab41 \
-in $top -x 80 -y 140 -anchor nw -bordermode ignore
place $top.lis42 \
-in $top -x 220 -y 130 -width 284 -relwidth 0 -height 118 \
-relheight 0 -anchor nw -bordermode ignore
place $top.but56 \
-in $top -x 620 -y 140 -anchor nw -bordermode ignore
place $top.lab49 \
-in $top -x 210 -y 300 -anchor nw -bordermode ignore
place $top.lab51 \
-in $top -x 300 -y 430 -anchor nw -bordermode ignore
place $top.but53 \
-in $top -x 530 -y 200 -width 66 -relwidth 0 -height 33 -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}
}
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 .top37 $btop
if {$vTcl(borrow)} {
$btop configure -background plum
}