-
Notifications
You must be signed in to change notification settings - Fork 0
/
trainschedule.tcl
232 lines (216 loc) · 7.73 KB
/
trainschedule.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
#############################################################################
# Generated by PAGE version 4.7
# in conjunction with Tcl version 8.6
# Apr 23, 2016 04:42:59 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
#############################################################################
# vTcl Code to Load User Fonts
vTcl:font:add_font \
"-family {DejaVu Sans} -size 10 -weight normal -slant roman -underline 0 -overstrike 0" \
user \
vTcl:font10
vTcl:font:add_font \
"-family {DejaVu Sans} -size 20 -weight normal -slant roman -underline 0 -overstrike 0" \
user \
vTcl:font11
#################################
#LIBRARY PROCEDURES
#
if {[info exists vTcl(sourcing)]} {
proc vTcl:project:info {} {
set base .top36
namespace eval ::widgets::$base {
set dflt,origin 0
set runvisible 1
}
set site_3_0 $base.fra42
set site_4_0 $site_3_0.fra61
set site_5_0 $site_4_0.scr64
#Updating ttreeview attributes
.top36.fra42.fra61.scr64.01 configure\
-columns "Col2 Col3 Col4"\
-height 4
#heading options.
.top36.fra42.fra61.scr64.01 heading Col2 \
-text "Arrival Time" \
-anchor center
#heading options.
.top36.fra42.fra61.scr64.01 heading Col3 \
-text "Departure time" \
-anchor center
#heading options.
.top36.fra42.fra61.scr64.01 heading Col4 \
-text "Station" \
-anchor center
#heading options.
.top36.fra42.fra61.scr64.01 heading #0 \
-text "Train" \
-anchor center
#column options.
.top36.fra42.fra61.scr64.01 column Col2 \
-width 103 \
-minwidth 20 \
-stretch 1 \
-anchor w
#column options.
.top36.fra42.fra61.scr64.01 column Col3 \
-width 103 \
-minwidth 20 \
-stretch 1 \
-anchor w
#column options.
.top36.fra42.fra61.scr64.01 column Col4 \
-width 153 \
-minwidth 20 \
-stretch 1 \
-anchor w
#column options.
.top36.fra42.fra61.scr64.01 column #0 \
-width 123 \
-minwidth 20 \
-stretch 1 \
-anchor w
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.top36 {base} {
if {$base == ""} {
set base .top36
}
if {[winfo exists $base]} {
wm deiconify $base; return
}
set top $base
###################
# CREATING WIDGETS
###################
vTcl::widgets::core::toplevel::createCmd $top -class Toplevel \
-background {#d9d9d9}
wm focusmodel $top passive
wm geometry $top 600x450+294+135
update
# set in toplevel.wgt.
global vTcl
set vTcl(save,dflt,origin) 0
wm maxsize $top 1165 768
wm minsize $top 1 1
wm overrideredirect $top 0
wm resizable $top 1 1
wm deiconify $top
wm title $top "Train Schedules"
vTcl:DefineAlias "$top" "Toplevel2" vTcl:Toplevel:WidgetProc "" 1
frame $top.fra42 \
-borderwidth 2 -relief groove -background {#d9d9d9} -height 415 \
-width 565
vTcl:DefineAlias "$top.fra42" "Frame1-2" vTcl:WidgetProc "Toplevel2" 1
set site_3_0 $top.fra42
label $site_3_0.cpd43 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#d9d9d9} -font $::vTcl(fonts,vTcl:font11,object) \
-foreground {#ffb600} -highlightcolor black \
-text {View Train Schedule}
vTcl:DefineAlias "$site_3_0.cpd43" "Label3" vTcl:WidgetProc "Toplevel2" 1
entry $site_3_0.cpd45 \
-background white -font TkFixedFont -foreground {#000000} \
-highlightcolor black -insertbackground black \
-selectbackground {#c4c4c4} -selectforeground black
vTcl:DefineAlias "$site_3_0.cpd45" "Entrytrain#1" vTcl:WidgetProc "Toplevel2" 1
entry $site_3_0.cpd46 \
-background white -font TkFixedFont -foreground {#000000} \
-highlightcolor black -insertbackground black \
-selectbackground {#c4c4c4} -selectforeground black
vTcl:DefineAlias "$site_3_0.cpd46" "Entrytrain#2" vTcl:WidgetProc "Toplevel2" 1
label $site_3_0.cpd47 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#d9d9d9} -font $::vTcl(fonts,vTcl:font10,object) \
-foreground {#000000} -highlightcolor black -text {Train #}
vTcl:DefineAlias "$site_3_0.cpd47" "Label4" vTcl:WidgetProc "Toplevel2" 1
button $site_3_0.cpd48 \
-activebackground {#d9d9d9} -activeforeground black \
-background {#d9d9d9} -foreground {#000000} -highlightcolor black \
-text Search
vTcl:DefineAlias "$site_3_0.cpd48" "searchbutton1" vTcl:WidgetProc "Toplevel2" 1
frame $site_3_0.fra61 \
-borderwidth 2 -relief groove -background {#d9d9d9} -height 305 \
-width 515
vTcl:DefineAlias "$site_3_0.fra61" "Frame2-2" vTcl:WidgetProc "Toplevel2" 1
set site_4_0 $site_3_0.fra61
ttk::style configure Treeview.Heading -background #d9d9d9
ttk::style configure Treeview.Heading -font TkDefaultFont
vTcl::widgets::ttk::scrolledtreeview::CreateCmd $site_4_0.scr64 \
-background {#d9d9d9} -height 228 -highlightcolor black -width 460
vTcl:DefineAlias "$site_4_0.scr64" "Scrolledtreeview1" vTcl:WidgetProc "Toplevel2" 1
button $site_4_0.but66 \
-activebackground {#d9d9d9} -background {#d9d9d9} \
-foreground {#000000} -highlightcolor black -takefocus 0 -text Back
vTcl:DefineAlias "$site_4_0.but66" "backtosearch" vTcl:WidgetProc "Toplevel2" 1
place $site_4_0.scr64 \
-in $site_4_0 -x 10 -y 50 -width 496 -height 200 -anchor nw \
-bordermode ignore
place $site_4_0.but66 \
-in $site_4_0 -x 40 -y 260 -anchor nw -bordermode ignore
place $site_3_0.cpd43 \
-in $site_3_0 -x 140 -y 70 -width 257 -height 33 -anchor nw \
-bordermode inside
place $site_3_0.cpd45 \
-in $site_3_0 -x 90 -y 150 -width 196 -height -30 -anchor nw \
-bordermode inside
place $site_3_0.cpd46 \
-in $site_3_0 -x 190 -y 170 -width 216 -height 30 -anchor nw \
-bordermode inside
place $site_3_0.cpd47 \
-in $site_3_0 -x 100 -y 170 -width 56 -height 38 -anchor nw \
-bordermode inside
place $site_3_0.cpd48 \
-in $site_3_0 -x 180 -y 220 -width 68 -height 26 -anchor nw \
-bordermode inside
place $site_3_0.fra61 \
-in $site_3_0 -x 20 -y 110 -width 515 -height 305 -anchor nw \
-bordermode ignore
###################
# SETTING GEOMETRY
###################
place $top.fra42 \
-in $top -x 20 -y 20 -width 565 -height 415 -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 .top36