/[ascend]/trunk/ascend4/TK/debug.tcl
ViewVC logotype

Contents of /trunk/ascend4/TK/debug.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download) (as text)
Fri Oct 29 20:54:12 2004 UTC (17 years, 1 month ago) by aw0a
File MIME type: text/x-tcl
File size: 9747 byte(s)
Setting up web subdirectory in repository
1 # debug.tcl
2 # by Benjamin A. Allan and Kirk A. Abbott
3 # Created: January 1994
4 # Part of ASCEND
5 # Revision: $Revision: 1.9 $
6 # Last modified on: $Date: 1998/06/18 15:55:23 $
7 # Last modified by: $Author: mthomas $
8 # Revision control file: $RCSfile: debug.tcl,v $
9 #
10 # This file is part of the ASCEND Tcl/Tk Interface.
11 #
12 # Copyright (C) 1994-1998 Carnegie Mellon University
13 #
14 # The ASCEND Tcl/Tk Interface is free software; you can redistribute
15 # it and/or modify it under the terms of the GNU General Public
16 # License as published by the Free Software Foundation; either
17 # version 2 of the License, or (at your option) any later version.
18 #
19 # The ASCEND Tcl/Tk Interface is distributed in hope that it will be
20 # useful, but WITHOUT ANY WARRANTY; without even the implied warranty
21 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
23 #
24 # You should have received a copy of the GNU General Public License
25 # along with the program; if not, write to the Free Software
26 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the
27 # file named COPYING. COPYING is found in ../compiler.
28
29 # Module: debug.tcl
30 # Tcl version: 7.1 (Tcl/Tk/XF)
31 # Tk version: 3.4
32 # XF version: 2.2
33 #
34
35 # module contents
36 global moduleList
37 global autoLoadList
38 set moduleList(debug.tcl) { .debug}
39 set autoLoadList(debug.tcl) {1}
40
41 # procedures to show toplevel windows
42
43
44 # procedure to show window .debug
45 # proc ShowWindow.debug {args}
46 proc ShowWindow.debug {args} {# xf ignore me 7
47
48 global ascDebuVect ascGlobalVect ascSolvVect
49 # build widget .debug
50 if {"[info procs XFEdit]" != ""} {
51 catch "XFDestroy .debug"
52 } {
53 catch "destroy .debug"
54 }
55 toplevel .debug
56
57 # Window manager configurations
58 wm positionfrom .debug user
59 wm sizefrom .debug user
60 wm minsize .debug 128 458
61 wm title .debug {A4 System Debugger}
62 wm iconname .debug {Debugger}
63 wm geometry .debug $ascDebuVect(geometry)
64 wm protocol .debug WM_DELETE_WINDOW {Debug_do_OK}
65
66 catch {font create debuggerfont}
67 set ascDebuVect(font) debuggerfont
68
69 # build widget .debug.btn_hlp
70 button .debug.btn_hlp \
71 -command {Debug_do_Help} \
72 -font $ascDebuVect(font) \
73 -text { Help }
74
75 # build widget .debug.btn_attr_eqn
76 button .debug.btn_attr_eqn \
77 -borderwidth {0} \
78 -font $ascDebuVect(font) \
79 -command {Debug_do_EqnAttr} \
80 -text {Attributes}
81
82 # build widget .debug.btn_attr_var
83 button .debug.btn_attr_var \
84 -borderwidth {0} \
85 -command {Debug_do_VarAttr} \
86 -font $ascDebuVect(font) \
87 -text {Attributes}
88
89 # build widget .debug.btn_blk_eqns
90 menubutton .debug.btn_blk_eqns \
91 -font $ascDebuVect(font) \
92 -menu {.debug.btn_blk_eqns.m} \
93 -text {Equations}
94
95 # build widget .debug.btn_blk_eqns.m
96 menu .debug.btn_blk_eqns.m \
97 -tearoffcommand .DEBUG.BTN_BLK_EQNS.M -font $ascDebuVect(font) \
98 -tearoff 0
99
100 .debug.btn_blk_eqns.m add command \
101 -command {Debug_do_BlkEqnResids} \
102 -label {Residuals} \
103 -state {active}
104 .debug.btn_blk_eqns.m add command \
105 -command {Debug_do_BlkEqnAttr} \
106 -label {Attributes}
107 .debug.btn_blk_eqns.m add command \
108 -command {Debug_do_BlkEqnDep} \
109 -label {Find Dependent}
110 .debug.btn_blk_eqns.m add command \
111 -command {Debug_do_BlkEqn2Probe} \
112 -label {Export to Probe}
113
114 global ascDebuVect
115 # build widget .debug.btn_blk_size
116 label .debug.btn_blk_size \
117 -font $ascDebuVect(font) \
118 -textvariable ascDebuVect(blksizes)
119
120 # build widget .debug.btn_blk_var
121 menubutton .debug.btn_blk_var \
122 -menu {.debug.btn_blk_var.m} \
123 -font $ascDebuVect(font) \
124 -text {Variables}
125
126 # build widget .debug.btn_blk_var.m
127 menu .debug.btn_blk_var.m \
128 -tearoffcommand .DEBUG.BTN_BLK_VAR.M -font $ascDebuVect(font) \
129 -tearoff 0
130
131 .debug.btn_blk_var.m add command \
132 -command {Debug_do_BlkVarVal} \
133 -label {Values} \
134 -state {active}
135 .debug.btn_blk_var.m add command \
136 -command {Debug_do_BlkVarAttr} \
137 -label {Attributes}
138 .debug.btn_blk_var.m add command \
139 -command {Debug_do_BlkVar2Probe} \
140 -label {Probe}
141
142 # build widget .debug.btn_expo_blk
143 button .debug.btn_expo_blk \
144 -borderwidth {0} \
145 -command {Debug_do_Blk2Probe} \
146 -font $ascDebuVect(font) \
147 -text {Export to probe}
148
149 # build widget .debug.btn_expo_eqn
150 menubutton .debug.btn_expo_eqn \
151 -menu {.debug.btn_expo_eqn.m} \
152 -font $ascDebuVect(font) \
153 -text {Export}
154
155 # build widget .debug.btn_expo_eqn.m
156 menu .debug.btn_expo_eqn.m \
157 -tearoffcommand .DEBUG.BTN_EXPO_EQN.M -font $ascDebuVect(font) \
158 -tearoff 0
159
160 .debug.btn_expo_eqn.m add command \
161 -command {Debug_do_Eqn2Browser} \
162 -label {Browser}
163 .debug.btn_expo_eqn.m add command \
164 -command {Debug_do_Eqn2Probe} \
165 -label {Probe}
166
167 # build widget .debug.btn_expo_sys
168 button .debug.btn_expo_sys \
169 -font $ascDebuVect(font) \
170 -command {Debug_do_Sys2Probe} \
171 -text {Export to probe}
172
173 # build widget .debug.btn_expo_var
174 menubutton .debug.btn_expo_var \
175 -font $ascDebuVect(font) \
176 -menu {.debug.btn_expo_var.m} \
177 -text {Export}
178
179 # build widget .debug.btn_expo_var.m
180 menu .debug.btn_expo_var.m \
181 -tearoffcommand .DEBUG.BTN_EXPO_VAR.M -font $ascDebuVect(font) \
182 -tearoff 0
183
184 .debug.btn_expo_var.m add command \
185 -command {Debug_do_Var2Browser} \
186 -label {Browser}
187 .debug.btn_expo_var.m add command \
188 -command {Debug_do_Var2Probe} \
189 -label {Probe}
190
191 # build widget .debug.btn_name_eqn
192 button .debug.btn_name_eqn \
193 -font $ascDebuVect(font) \
194 -command {Debug_do_EqnName} \
195 -text {Name}
196
197 # build widget .debug.btn_name_var
198 button .debug.btn_name_var \
199 -font $ascDebuVect(font) \
200 -command {Debug_do_VarName} \
201 -text {Name}
202
203 # build widget .debug.btn_ok
204 button .debug.btn_ok \
205 -font $ascDebuVect(font) \
206 -command {Debug_do_OK} \
207 -text { OK }
208
209 # build widget .debug.btn_sys_var
210 menubutton .debug.btn_sys_var \
211 -menu {.debug.btn_sys_var.m} \
212 -font $ascDebuVect(font) \
213 -text {Variables}
214
215 # build widget .debug.btn_sys_var.m
216 menu .debug.btn_sys_var.m \
217 -tearoffcommand .DEBUG.BTN_SYS_VAR.M -font $ascDebuVect(font) \
218 -tearoff 0
219
220 .debug.btn_sys_var.m add command \
221 -command {Debug_do_SysVarVal} \
222 -label {Values} \
223 -state {active}
224 .debug.btn_sys_var.m add command \
225 -command {Debug_do_SysVarAttr} \
226 -label {Attributes}
227 .debug.btn_sys_var.m add command \
228 -command {Debug_do_SysVar2Nom} \
229 -label {Reset Values}
230 .debug.btn_sys_var.m add command \
231 -command {Debug_do_SysNom2Var} \
232 -label {Reset Nominals}
233
234 # build widget .debug.entry_blk
235 entry .debug.entry_blk \
236 -exportselection {0} \
237 -font $ascSolvVect(font) \
238 -textvariable {ascDebuVect(blkcur)}
239
240 # build widget .debug.entry_eqn
241 entry .debug.entry_eqn \
242 -exportselection {0} \
243 -font $ascSolvVect(font) \
244 -textvariable {ascDebuVect(eqncur)}
245
246 # build widget .debug.entry_var
247 entry .debug.entry_var \
248 -exportselection {0} \
249 -font $ascSolvVect(font) \
250 -relief {groove} \
251 -textvariable {ascDebuVect(varcur)}
252
253 # build widget .debug.label_blank
254 label .debug.label_blank \
255 -text {}
256
257 # build widget .debug.label_blk
258 label .debug.label_blk \
259 -anchor {w} \
260 -font $ascDebuVect(font) \
261 -height {2} \
262 -text { Block:}
263
264 # build widget .debug.label_eqn
265 label .debug.label_eqn \
266 -anchor {w} \
267 -font $ascDebuVect(font) \
268 -text { Equation:}
269 # bindings
270 bind .debug.label_eqn <Button-2> {
271 MenuPopupPost .debug.label_eqn.poptest %X %Y
272 }
273 bind .debug.label_eqn <ButtonRelease-2> {
274 MenuPopupRelease .debug.label_eqn.poptest %W
275 }
276
277 # build widget .debug.label_sys
278 label .debug.label_sys \
279 -anchor {w} \
280 -font $ascDebuVect(font) \
281 -height {2} \
282 -relief {raised} \
283 -text { System:}
284
285 # build widget .debug.label_var
286 label .debug.label_var \
287 -anchor {w} \
288 -font $ascDebuVect(font) \
289 -foreground {black} \
290 -height {2} \
291 -text { Variable:}
292
293 # pack widget .debug
294 pack append .debug \
295 .debug.label_var {top frame center fillx} \
296 .debug.entry_var {top frame center fillx} \
297 .debug.btn_name_var {top frame center fillx} \
298 .debug.btn_attr_var {top frame center fillx} \
299 .debug.btn_expo_var {top frame center fillx} \
300 .debug.label_eqn {top frame center fillx} \
301 .debug.entry_eqn {top frame center fillx} \
302 .debug.btn_name_eqn {top frame center fillx} \
303 .debug.btn_attr_eqn {top frame center fillx} \
304 .debug.btn_expo_eqn {top frame center fillx} \
305 .debug.label_blk {top frame center fillx} \
306 .debug.entry_blk {top frame center fillx} \
307 .debug.btn_blk_size {top frame center fillx} \
308 .debug.btn_blk_var {top frame center fillx} \
309 .debug.btn_blk_eqns {top frame center fillx} \
310 .debug.btn_expo_blk {top frame center fillx} \
311 .debug.label_sys {top frame center fillx} \
312 .debug.btn_sys_var {top frame center fillx} \
313 .debug.btn_expo_sys {top frame center fillx} \
314 .debug.label_blank {top frame center fillx} \
315 .debug.btn_ok {left frame center expand fill} \
316 .debug.btn_hlp {left frame center expand fill}
317
318 if {"[info procs XFEdit]" != ""} {
319 catch "XFMiscBindWidgetTree .debug"
320 after 2 "catch {XFEditSetShowWindows}"
321 }
322 }
323
324 # proc DestroyWindow.debug {}
325 proc DestroyWindow.debug {} {# xf ignore me 7
326 if {"[info procs XFEdit]" != ""} {
327 if {"[info commands .debug]" != ""} {
328 global xfShowWindow.debug
329 set xfShowWindow.debug 0
330 XFEditSetPath .
331 after 2 "XFSaveAsProc .debug; XFEditSetShowWindows"
332 }
333 } {
334 catch "destroy .debug"
335 update
336 }
337 }
338
339 # User defined procedures
340
341
342 # Internal procedures
343
344 # eof
345 #
346

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