/[ascend]/trunk/tcltk/TK/templates/AscMonoEntry4.t
ViewVC logotype

Contents of /trunk/tcltk/TK/templates/AscMonoEntry4.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 571 - (show annotations) (download) (as text)
Tue May 9 00:14:59 2006 UTC (18 years ago) by johnpye
File MIME type: application/x-troff
File size: 9931 byte(s)
Renaming 'tcltk98' to 'tcltk', continued...
1 # ----------------------------------------------------------------
2 # Module: ascMonoEntry4.tcl
3 # written by Kirk Abbott
4 # Date:$Date: 1998/06/16 14:07:34 $
5 # Version: $Revision: 1.6 $
6 # ----------------------------------------------------------------
7 #
8 # Module: ascMonoEntry4.tcl
9 # Tcl version: 8.0
10 # Tk version: 8.0
11 # XF version: 2.2
12 #
13 # ascMonoEntry4.tcl $Id: AscMonoEntry4.t,v 1.6 1998/06/16 14:07:34 ballan Exp $
14 #
15 #
16
17 global AscMonoEntry4
18 set AscMonoEntry4(button) 0
19 set AscMonoEntry4(resultNW) ""
20 set AscMonoEntry4(resultNE) ""
21 set AscMonoEntry4(resultSW) ""
22 set AscMonoEntry4(resultSE) ""
23 set AscMonoEntry4(font) -*-*
24 set AscMonoEntry4(count) "0"
25
26 #
27 # procedure to show window .ascMonoEntry4
28 #
29 proc VShowWindow.ascMonoEntry4 { {AscMonoEntry4Text "Find Type"}
30 {AscMonoEntry4Geom 400x100}
31 {AscMonoEntry4LabelNW "Type"} {AscMonoEntry4LabelNE "Attribute"}
32 {AscMonoEntry4LabelSW "Low Value"} {AscMonoEntry4LabelSE "High Value"}
33 {AscMonoEntry4InfoNW "Info NWbox"} {AscMonoEntry4InfoNE "Info NEbox"}
34 {AscMonoEntry4InfoSW "Info SWbox"} {AscMonoEntry4InfoSE "Info SEbox"}} {
35
36 global AscMonoEntry4
37 toplevel .ascMonoEntry4
38
39 # Window manager configurations
40 global tk_version
41 wm positionfrom .ascMonoEntry4 ""
42 wm sizefrom .ascMonoEntry4 ""
43 wm minsize .ascMonoEntry4 400 100
44 wm geometry .ascMonoEntry4 $AscMonoEntry4Geom
45 wm title .ascMonoEntry4 { }
46
47
48 # build widget .ascMonoEntry4.lbl_frm
49 frame .ascMonoEntry4.lbl_frm
50
51 # build widget .ascMonoEntry4.lbl_frm.bmcanvas
52 set tl .ascMonoEntry4.lbl_frm
53 canvas $tl.bmcanvas -width 33 -height 27
54 $tl.bmcanvas create bitmap 0 0 -background yellow \
55 -anchor nw -bitmap grablock
56 pack append $tl $tl.bmcanvas {left frame center}
57
58 # build widget .ascMonoEntry4.lbl_frm.main_lbl
59 label .ascMonoEntry4.lbl_frm.main_lbl \
60 -font $AscMonoEntry4(font) \
61 -text $AscMonoEntry4Text
62
63 # build widget .ascMonoEntry4.main_frm
64 frame .ascMonoEntry4.main_frm
65
66 # build widget .ascMonoEntry4.main_frm.top_frm
67 frame .ascMonoEntry4.main_frm.top_frm
68
69 # build widget .ascMonoEntry4.main_frm.top_frm.entry_left
70 frame .ascMonoEntry4.main_frm.top_frm.entry_left
71
72 # build widget .ascMonoEntry4.main_frm.top_frm.entry_left.label4
73 label .ascMonoEntry4.main_frm.top_frm.entry_left.label4 \
74 -text $AscMonoEntry4LabelNW: \
75 -font $AscMonoEntry4(font) \
76 -width {10}
77
78 # build widget .ascMonoEntry4.main_frm.top_frm.entry_left.entry4
79 entry .ascMonoEntry4.main_frm.top_frm.entry_left.entry4 \
80 -exportselection 0 \
81 -font $AscMonoEntry4(font) \
82 -width {15} \
83
84 # build widget .ascMonoEntry4.main_frm.bot_frm
85 frame .ascMonoEntry4.main_frm.bot_frm
86
87 # build widget .ascMonoEntry4.main_frm.bot_frm.entry_left
88 frame .ascMonoEntry4.main_frm.bot_frm.entry_left
89
90 # build widget .ascMonoEntry4.main_frm.bot_frm.entry_left.label4
91 label .ascMonoEntry4.main_frm.bot_frm.entry_left.label4 \
92 -text $AscMonoEntry4LabelSW: \
93 -font $AscMonoEntry4(font) \
94 -width {10}
95
96 # build widget .ascMonoEntry4.main_frm.bot_frm.entry_left.entry4
97 entry .ascMonoEntry4.main_frm.bot_frm.entry_left.entry4 \
98 -exportselection 0 \
99 -font $AscMonoEntry4(font) \
100 -width {15}
101
102 # build widget .ascMonoEntry4.main_frm.top_frm.entry_right
103 frame .ascMonoEntry4.main_frm.top_frm.entry_right
104
105 # build widget .ascMonoEntry4.main_frm.top_frm.entry_right.entry4
106 entry .ascMonoEntry4.main_frm.top_frm.entry_right.entry4 \
107 -exportselection 0 \
108 -font $AscMonoEntry4(font) \
109 -width {15}
110
111 # build widget .ascMonoEntry4.main_frm.top_frm.entry_right.label4
112 label .ascMonoEntry4.main_frm.top_frm.entry_right.label4 \
113 -text $AscMonoEntry4LabelNE: \
114 -font $AscMonoEntry4(font) \
115 -width {10}
116
117 # build widget .ascMonoEntry4.main_frm.bot_frm.entry_right
118 frame .ascMonoEntry4.main_frm.bot_frm.entry_right
119
120 # build widget .ascMonoEntry4.main_frm.bot_frm.entry_right.label4
121 label .ascMonoEntry4.main_frm.bot_frm.entry_right.label4 \
122 -text $AscMonoEntry4LabelSE:\
123 -font $AscMonoEntry4(font) \
124 -width {10}
125
126 # build widget .ascMonoEntry4.main_frm.bot_frm.entry_right.entry4
127 entry .ascMonoEntry4.main_frm.bot_frm.entry_right.entry4 \
128 -exportselection 0 \
129 -font $AscMonoEntry4(font) \
130 -width {15}
131
132 # pack widget .ascMonoEntry4.main_frm.top_frm.entry_left
133 pack append .ascMonoEntry4.main_frm.top_frm.entry_left \
134 .ascMonoEntry4.main_frm.top_frm.entry_left.label4 {left frame w} \
135 .ascMonoEntry4.main_frm.top_frm.entry_left.entry4 \
136 {left frame center expand fill}
137
138 # pack widget .ascMonoEntry4.main_frm.top_frm.entry_right
139 pack append .ascMonoEntry4.main_frm.top_frm.entry_right \
140 .ascMonoEntry4.main_frm.top_frm.entry_right.label4 {left frame w} \
141 .ascMonoEntry4.main_frm.top_frm.entry_right.entry4 \
142 {left frame center expand fill}
143
144 # pack widget .ascMonoEntry4.main_frm.top_frm
145 pack append .ascMonoEntry4.main_frm.top_frm \
146 .ascMonoEntry4.main_frm.top_frm.entry_left \
147 {left frame center expand fill} \
148 .ascMonoEntry4.main_frm.top_frm.entry_right \
149 {left frame center expand fill} \
150
151 # pack widget .ascMonoEntry4.main_frm.bot_frm.entry_left
152 pack append .ascMonoEntry4.main_frm.bot_frm.entry_left \
153 .ascMonoEntry4.main_frm.bot_frm.entry_left.label4 {left frame w} \
154 .ascMonoEntry4.main_frm.bot_frm.entry_left.entry4 \
155 {left frame center expand fill}
156
157 # pack widget .ascMonoEntry4.main_frm.bot_frm.entry_right
158 pack append .ascMonoEntry4.main_frm.bot_frm.entry_right \
159 .ascMonoEntry4.main_frm.bot_frm.entry_right.label4 \
160 {left frame w} \
161 .ascMonoEntry4.main_frm.bot_frm.entry_right.entry4 \
162 {top frame center expand fill}
163
164 # pack widget .ascMonoEntry4.main_frm.bot_frm
165 pack append .ascMonoEntry4.main_frm.bot_frm \
166 .ascMonoEntry4.main_frm.bot_frm.entry_left \
167 {left frame center expand fill} \
168 .ascMonoEntry4.main_frm.bot_frm.entry_right \
169 {left frame center expand fill}
170
171 # pack widget .ascMonoEntry4.main_frm
172 pack append .ascMonoEntry4.main_frm \
173 .ascMonoEntry4.main_frm.top_frm {top frame center expand fill} \
174 .ascMonoEntry4.main_frm.bot_frm {top frame center expand fill}
175
176 # pack widget .ascMonoEntry4
177 pack append .ascMonoEntry4 \
178 .ascMonoEntry4.lbl_frm {top frame center fillx} \
179 .ascMonoEntry4.main_frm {top frame center expand fill}
180
181 # build widget .ascMonoEntry4.zbtns_frm
182 frame .ascMonoEntry4.zbtns_frm
183
184 # build widget .ascMonoEntry4.zbtns_frm.ok_btn
185 button .ascMonoEntry4.zbtns_frm.ok_btn \
186 -text {OK} \
187 -width {10} \
188 -font $AscMonoEntry4(font) \
189 -command {ascMonoEntry4_StuffResults}
190
191 # build widget .ascMonoEntry4.zbtns_frm.cancel_btn
192 button .ascMonoEntry4.zbtns_frm.cancel_btn \
193 -text {Cancel} \
194 -font $AscMonoEntry4(font) \
195 -width {10} \
196 -command " \
197 global AscMonoEntry4
198 CancelCommand.ascMonoEntry4
199 set AscMonoEntry4(button) 2
200 catch {destroy .ascMonoEntry4}"
201
202 # build widget .ascMonoEntry4.zbtns_frm.help_btn
203 button .ascMonoEntry4.zbtns_frm.help_btn \
204 -text {Help} \
205 -font $AscMonoEntry4(font) \
206 -width {10} \
207 -command "global AscMonoEntry4; set AscMonoEntry4(button) 3
208 catch {destroy .ascMonoEntry4}"
209
210 # pack widget .ascMonoEntry4.zbtns_frm
211 pack append .ascMonoEntry4.zbtns_frm \
212 .ascMonoEntry4.zbtns_frm.ok_btn {left frame center expand fill} \
213 .ascMonoEntry4.zbtns_frm.cancel_btn {left frame center expand fill} \
214 .ascMonoEntry4.zbtns_frm.help_btn {left frame center expand fill}
215
216 # pack widget .ascMonoEntry4.lbl_frm
217 pack append .ascMonoEntry4.lbl_frm \
218 .ascMonoEntry4.lbl_frm.main_lbl {top frame center}
219
220 # pack widget .ascMonoEntry4
221 pack append .ascMonoEntry4 \
222 .ascMonoEntry4.zbtns_frm {top frame center fillx}
223
224 #
225 #Initial Entry
226 .ascMonoEntry4.main_frm.top_frm.entry_left.entry4 \
227 insert end "$AscMonoEntry4InfoNW"
228 .ascMonoEntry4.main_frm.bot_frm.entry_left.entry4 \
229 insert end "$AscMonoEntry4InfoSW"
230 .ascMonoEntry4.main_frm.top_frm.entry_right.entry4 \
231 insert end "$AscMonoEntry4InfoNE"
232 .ascMonoEntry4.main_frm.bot_frm.entry_right.entry4 \
233 insert end "$AscMonoEntry4InfoSE"
234
235 bind .ascMonoEntry4.main_frm.top_frm.entry_left.entry4 <Return> {
236 ascMonoEntry4_StuffResults
237 }
238 bind .ascMonoEntry4.main_frm.bot_frm.entry_left.entry4 <Return> {
239 ascMonoEntry4_StuffResults
240 }
241 bind .ascMonoEntry4.main_frm.top_frm.entry_right.entry4 <Return> {
242 ascMonoEntry4_StuffResults
243 }
244 bind .ascMonoEntry4.main_frm.bot_frm.entry_right.entry4 <Return> {
245 ascMonoEntry4_StuffResults
246 }
247
248 #
249 # Get Data and Catch response.
250 #
251 # wait for the box to be destroyed
252 focus .ascMonoEntry4.main_frm.top_frm.entry_left.entry4
253 update idletask
254 bind .ascMonoEntry4 <Visibility> {ascKeepOnTop %W}
255 grab .ascMonoEntry4
256 tkwait window .ascMonoEntry4
257 set data [list $AscMonoEntry4(button) \
258 $AscMonoEntry4(resultNW) $AscMonoEntry4(resultNE) \
259 $AscMonoEntry4(resultSW) $AscMonoEntry4(resultSE)]
260 return $data
261 }
262
263 proc DestroyWindow.ascMonoEntry4 {} {# xf ignore me 7
264
265 catch "destroy .ascMonoEntry4"
266 update
267 }
268 proc OKCommand.ascMonoEntry4 {} {
269 global AscMonoEntry4
270 }
271 proc CancelCommand.ascMonoEntry4 {} {
272 global AscMonoEntry4
273 }
274
275 proc ascMonoEntry4_StuffResults {} {
276 global AscMonoEntry4
277 set AscMonoEntry4(button) 1
278 set AscMonoEntry4(resultNW) \
279 [.ascMonoEntry4.main_frm.top_frm.entry_left.entry4 get]
280 set AscMonoEntry4(resultNE) \
281 [.ascMonoEntry4.main_frm.top_frm.entry_right.entry4 get]
282 set AscMonoEntry4(resultSW) \
283 [.ascMonoEntry4.main_frm.bot_frm.entry_left.entry4 get]
284 set AscMonoEntry4(resultSE) \
285 [.ascMonoEntry4.main_frm.bot_frm.entry_right.entry4 get]
286 OKCommand.ascMonoEntry4
287 catch {destroy .ascMonoEntry4}
288 }
289 # eof
290 #
291

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22