1 |
# ascplot.tcl: a columnar data manipulator |
2 |
# by Benjamin Allan |
3 |
# August 1995 |
4 |
# Part of ASCEND |
5 |
# Revision: $Revision: 1.20 $ |
6 |
# Last modified on: $Date: 2003/02/06 13:49:43 $ |
7 |
# Last modified by: $Author: ballan $ |
8 |
# Revision control file: $RCSfile: ascplot.tcl,v $ |
9 |
# |
10 |
# This file is part of the ASCEND Tcl/Tk Interface. |
11 |
# |
12 |
# Copyright (C) 1995-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: ascplot.tcl |
30 |
# Tcl version: 7.1 (Tcl/Tk/XF) |
31 |
# Tk version: 3.4 |
32 |
# XF version: 2.2 |
33 |
# |
34 |
# This file requires the tkTable extension by Roland King, |
35 |
# Copyright (c) 1994 by Roland King. This has been included in the |
36 |
# ASCEND guiadd sources. |
37 |
# Anyone may use and modify this code so long as this notice is |
38 |
# kept intact. Bug reports to ballan@cs.cmu.edu. |
39 |
# This code is used in the ASCEND project at CMU and as such |
40 |
# can be considered ~75% supported. |
41 |
# |
42 |
# The idea here is that we can take ASCII numeric data files |
43 |
# in a columnar format and feed various bizarre x/unix plot |
44 |
# programs. If there is direct access to a decent spreadsheet |
45 |
# or real plot package, this isn't needed. Limited spreadsheetlike |
46 |
# functionality is supported. |
47 |
|
48 |
# module contents |
49 |
global moduleList |
50 |
global autoLoadList |
51 |
set moduleList(ascplot.tcl) { .ascplot} |
52 |
set autoLoadList(ascplot.tcl) {0} |
53 |
|
54 |
# procedures to show toplevel windows |
55 |
|
56 |
|
57 |
# procedure to show window .ascplot |
58 |
global ascplotvect |
59 |
set ascplotvect(dummyvar) apv.dummy |
60 |
proc ShowWindow.ascplot {args} {# xf ignore me 7 |
61 |
|
62 |
global ascplotvect |
63 |
|
64 |
# build widget .ascplot |
65 |
if {"[info procs XFEdit]" != ""} { |
66 |
catch "XFDestroy .ascplot" |
67 |
} { |
68 |
catch "destroy .ascplot" |
69 |
} |
70 |
toplevel .ascplot |
71 |
|
72 |
# Window manager configurations |
73 |
set minw [lindex [split $ascplotvect(minsize) x] 0] |
74 |
set minh [lindex [split $ascplotvect(minsize) x] 1] |
75 |
set maxw [lindex [split $ascplotvect(maxsize) x] 0] |
76 |
set maxh [lindex [split $ascplotvect(maxsize) x] 1] |
77 |
|
78 |
wm positionfrom .ascplot "" |
79 |
wm sizefrom .ascplot "" |
80 |
wm maxsize .ascplot $maxw $maxh |
81 |
wm minsize .ascplot $minw $minh |
82 |
wm title .ascplot {A4 Plot} |
83 |
wm protocol .ascplot WM_DELETE_WINDOW {ascplot_dook} |
84 |
|
85 |
|
86 |
# build widget .ascplot.top_frm |
87 |
frame .ascplot.top_frm |
88 |
frame .ascplot.bot_frm |
89 |
|
90 |
# build widget .ascplot.top_frm.datasets |
91 |
frame .ascplot.top_frm.datasets |
92 |
|
93 |
# build widget .ascplot.top_frm.datasets.scrollbar2 |
94 |
scrollbar .ascplot.top_frm.datasets.scrollbar2 \ |
95 |
-command {.ascplot.top_frm.datasets.listbox1 yview} \ |
96 |
-relief {raised} |
97 |
|
98 |
# build widget .ascplot.top_frm.datasets.scrollbar3 |
99 |
scrollbar .ascplot.top_frm.datasets.scrollbar3 \ |
100 |
-command {.ascplot.top_frm.datasets.listbox1 xview} \ |
101 |
-orient {horizontal} \ |
102 |
-relief {raised} |
103 |
|
104 |
# build widget .ascplot.top_frm.datasets.listbox1 |
105 |
listbox .ascplot.top_frm.datasets.listbox1 \ |
106 |
-width {40} \ |
107 |
-height {2} \ |
108 |
-relief {raised} \ |
109 |
-selectmode extended \ |
110 |
-xscrollcommand {.ascplot.top_frm.datasets.scrollbar3 set} \ |
111 |
-yscrollcommand {.ascplot.top_frm.datasets.scrollbar2 set} \ |
112 |
-font $ascplotvect(textfont) |
113 |
|
114 |
# pack widget .ascplot.top_frm.datasets |
115 |
pack append .ascplot.top_frm.datasets \ |
116 |
.ascplot.top_frm.datasets.scrollbar2 {left frame center filly} \ |
117 |
.ascplot.top_frm.datasets.scrollbar3 {bottom frame center fillx} \ |
118 |
.ascplot.top_frm.datasets.listbox1 {left frame center expand fill} |
119 |
|
120 |
|
121 |
# |
122 |
# Build the menu bar and submenus |
123 |
# |
124 |
menu .ascplot.menubar \ |
125 |
-tearoffcommand .ASCPLOT.MENUBAR \ |
126 |
-tearoff 0 |
127 |
|
128 |
# The Display menu |
129 |
menu .ascplot.menubar.display \ |
130 |
-tearoffcommand .ASCPLOT.MENUBAR.DISPLAY \ |
131 |
-tearoff 0 |
132 |
.ascplot.menubar.display add command \ |
133 |
-command { |
134 |
global ascplotvect |
135 |
ascplot_showdata $ascplotvect(showdata) |
136 |
} \ |
137 |
-label {Show data} \ |
138 |
-accelerator {Alt-d s} \ |
139 |
-underline 0 |
140 |
.ascplot.menubar.display add separator |
141 |
.ascplot.menubar.display add command \ |
142 |
-command ascplot_defineplot \ |
143 |
-label {Set plot titles} \ |
144 |
-accelerator {Alt-d t} \ |
145 |
-underline 9 |
146 |
.ascplot.menubar.display add command \ |
147 |
-command ascplot_loadplot \ |
148 |
-label {Load old plot} \ |
149 |
-accelerator {Alt-d l} \ |
150 |
-underline 0 |
151 |
.ascplot.menubar.display add command \ |
152 |
-command ascplot_updateplot \ |
153 |
-label {Update plot} \ |
154 |
-accelerator {Alt-d u} \ |
155 |
-underline 0 |
156 |
.ascplot.menubar.display add command \ |
157 |
-command ascplot_deleteplot \ |
158 |
-label {Delete plot} \ |
159 |
-accelerator {Alt-d d} \ |
160 |
-underline 0 |
161 |
|
162 |
|
163 |
# The Edit menu |
164 |
menu .ascplot.menubar.edit \ |
165 |
-tearoffcommand .ASCPLOT.MENUBAR.EDIT \ |
166 |
-tearoff 0 |
167 |
.ascplot.menubar.edit add command \ |
168 |
-command ascplot_mergedata \ |
169 |
-accelerator {Alt-e m} \ |
170 |
-label {Merge data sets} \ |
171 |
-underline 0 |
172 |
|
173 |
|
174 |
# the Execute menu |
175 |
menu .ascplot.menubar.execute \ |
176 |
-tearoffcommand .ASCPLOT.MENUBAR.EXECUTE \ |
177 |
-tearoff 0 |
178 |
.ascplot.menubar.execute add command \ |
179 |
-command ascplot_viewgraph \ |
180 |
-label {View plot file} \ |
181 |
-accelerator {Alt-x v} \ |
182 |
-underline 0 |
183 |
.ascplot.menubar.execute add command \ |
184 |
-command ascplot_writegraph \ |
185 |
-label {Write plot file} \ |
186 |
-accelerator {Alt-x w} \ |
187 |
-underline 0 |
188 |
.ascplot.menubar.execute add separator |
189 |
.ascplot.menubar.execute add command \ |
190 |
-command {ascplot_insert col} \ |
191 |
-label {Insert column} \ |
192 |
-accelerator {Alt-x c} \ |
193 |
-underline 7 |
194 |
.ascplot.menubar.execute add command \ |
195 |
-command {ascplot_recalc col} \ |
196 |
-label {Recalculate column} |
197 |
.ascplot.menubar.execute add command \ |
198 |
-command {ascplot_insert row} \ |
199 |
-label {Insert row} \ |
200 |
-accelerator {Alt-x r} \ |
201 |
-underline 7 |
202 |
.ascplot.menubar.execute add command \ |
203 |
-command {ascplot_recalc col} \ |
204 |
-label {Recalculate row} |
205 |
|
206 |
|
207 |
# The File menu |
208 |
menu .ascplot.menubar.file \ |
209 |
-tearoffcommand .ASCPLOT.MENUBAR.FILE \ |
210 |
-tearoff 0 |
211 |
.ascplot.menubar.file add command \ |
212 |
-command ascplot_loaddata \ |
213 |
-label {Read data set} \ |
214 |
-accelerator {Alt-f r} \ |
215 |
-underline 0 |
216 |
.ascplot.menubar.file add command \ |
217 |
-command ascplot_savedata \ |
218 |
-label {Save data set} \ |
219 |
-accelerator {Alt-f s} \ |
220 |
-underline 0 |
221 |
.ascplot.menubar.file add command \ |
222 |
-command {ascplot_reloaddata 1} \ |
223 |
-accelerator {Alt-f l} \ |
224 |
-label {Reload data set} \ |
225 |
-underline 2 |
226 |
.ascplot.menubar.file add command \ |
227 |
-command {ascplot_unloaddata 1} \ |
228 |
-label {Unload data set} \ |
229 |
-accelerator {Alt-f u} \ |
230 |
-underline 0 |
231 |
.ascplot.menubar.file add separator |
232 |
.ascplot.menubar.file add command \ |
233 |
-command {ascplot_dook} \ |
234 |
-accelerator {Alt-f c} \ |
235 |
-label {Close window} \ |
236 |
-underline 0 |
237 |
|
238 |
|
239 |
# The Help menu |
240 |
menu .ascplot.menubar.help \ |
241 |
-tearoffcommand .ASCPLOT.MENUBAR.HELP \ |
242 |
-tearoff 0 |
243 |
.ascplot.menubar.help add command \ |
244 |
-command ascplot_sshelp \ |
245 |
-label {Using the data table} |
246 |
.ascplot.menubar.help add command \ |
247 |
-command ascplot_ssbinds \ |
248 |
-label {Data table key bindings} |
249 |
.ascplot.menubar.help add command \ |
250 |
-command ascplot_credits \ |
251 |
-label {Whodunnit} |
252 |
.ascplot.menubar.help add command \ |
253 |
-command ascplot_sources \ |
254 |
-label {Where to get it} |
255 |
|
256 |
|
257 |
# The Options menu |
258 |
menu .ascplot.menubar.options \ |
259 |
-tearoffcommand .ASCPLOT.MENUBAR.OPTIONS \ |
260 |
-tearoff 0 |
261 |
.ascplot.menubar.options add command \ |
262 |
-command ascplot_grill \ |
263 |
-accelerator {Alt-o o} \ |
264 |
-label {See options...} \ |
265 |
-underline 4 |
266 |
.ascplot.menubar.options add separator |
267 |
.ascplot.menubar.options add cascade \ |
268 |
-menu {.ascplot.menubar.options.graph} \ |
269 |
-accelerator {Alt-o g} \ |
270 |
-label {Select grapher} \ |
271 |
-underline 7 |
272 |
|
273 |
# the Grapher submenu under the Options menu |
274 |
menu .ascplot.menubar.options.graph \ |
275 |
-tearoffcommand .ASCPLOT.MENUBAR.EDIT.GRAPH \ |
276 |
-tearoff 0 |
277 |
.ascplot.menubar.options.graph add command \ |
278 |
-command "ascplot_selplotter xgraph" \ |
279 |
-label {Xgraph} \ |
280 |
-underline 0 |
281 |
.ascplot.menubar.options.graph add command \ |
282 |
-command "ascplot_selplotter xmgr" \ |
283 |
-label {XMGR} \ |
284 |
-underline 1 |
285 |
.ascplot.menubar.options.graph add command \ |
286 |
-command "ascplot_selplotter gnuplot" \ |
287 |
-label {gnuplot} \ |
288 |
-underline 0 |
289 |
|
290 |
|
291 |
# |
292 |
# Add the menus as cascades of the toplevel's menu; |
293 |
# add the toplevel's menu to the toplevel |
294 |
# |
295 |
.ascplot.menubar add cascade \ |
296 |
-menu .ascplot.menubar.file \ |
297 |
-label {File} \ |
298 |
-underline 0 |
299 |
.ascplot.menubar add cascade \ |
300 |
-menu .ascplot.menubar.edit \ |
301 |
-label {Edit} \ |
302 |
-underline 0 |
303 |
.ascplot.menubar add cascade \ |
304 |
-menu .ascplot.menubar.execute \ |
305 |
-label {Execute} \ |
306 |
-underline 1 |
307 |
.ascplot.menubar add cascade \ |
308 |
-menu .ascplot.menubar.display \ |
309 |
-label {Display} \ |
310 |
-underline 0 |
311 |
.ascplot.menubar add cascade \ |
312 |
-menu .ascplot.menubar.options \ |
313 |
-label {Options} \ |
314 |
-underline 0 |
315 |
.ascplot.menubar add cascade \ |
316 |
-menu .ascplot.menubar.help \ |
317 |
-underline 0 \ |
318 |
-label {Help} |
319 |
.ascplot configure \ |
320 |
-menu .ascplot.menubar |
321 |
|
322 |
|
323 |
# build widget .ascplot.bot_frm.message |
324 |
frame .ascplot.bot_frm.message |
325 |
|
326 |
# build widget .ascplot.bot_frm.message.scrollbar1 |
327 |
scrollbar .ascplot.bot_frm.message.scrollbar1 \ |
328 |
-command {.ascplot.bot_frm.message.text2 yview} |
329 |
|
330 |
# build widget .ascplot.bot_frm.message.text2 |
331 |
text .ascplot.bot_frm.message.text2 \ |
332 |
-exportselection {0} \ |
333 |
-width {28} \ |
334 |
-wrap {word} \ |
335 |
-yscrollcommand {.ascplot.bot_frm.message.scrollbar1 set} |
336 |
|
337 |
# bindings |
338 |
bind .ascplot.bot_frm.message.text2 <Any-Key> {} |
339 |
|
340 |
# pack widget .ascplot.bot_frm.message |
341 |
pack append .ascplot.bot_frm.message \ |
342 |
.ascplot.bot_frm.message.scrollbar1 {left frame center filly} \ |
343 |
.ascplot.bot_frm.message.text2 {top frame center expand fill} |
344 |
|
345 |
# build widget .ascplot.bot_frm.table_frm |
346 |
frame .ascplot.bot_frm.table_frm |
347 |
|
348 |
# build widget .ascplot.bot_frm.table_frm.datatable |
349 |
frame .ascplot.bot_frm.table_frm.datatable |
350 |
|
351 |
# build widget .ascplot.bot_frm.table_frm.datatable.scrollbar2 |
352 |
scrollbar .ascplot.bot_frm.table_frm.datatable.scrollbar2 \ |
353 |
-command {.ascplot.bot_frm.table_frm.datatable.table1 yview} |
354 |
|
355 |
# build widget .ascplot.bot_frm.table_frm.datatable.scrollbar3 |
356 |
scrollbar .ascplot.bot_frm.table_frm.datatable.scrollbar3 \ |
357 |
-command {.ascplot.bot_frm.table_frm.datatable.table1 xview} \ |
358 |
-orient {horizontal} |
359 |
|
360 |
# build widget .ascplot.bot_frm.table_frm.datatable.table1 |
361 |
table .ascplot.bot_frm.table_frm.datatable.table1 \ |
362 |
-exportselection 0 \ |
363 |
-titlerows 3 \ |
364 |
-titlecols 1 \ |
365 |
-font $ascplotvect(textfont) \ |
366 |
-roworigin -3 \ |
367 |
-colorigin -1 \ |
368 |
-height 0 \ |
369 |
-width 10 \ |
370 |
-variable $ascplotvect(dummyvar) \ |
371 |
-rows 6 \ |
372 |
-cols 6 \ |
373 |
-colseparator "\t" \ |
374 |
-rowseparator "\n" \ |
375 |
-selectmode extended \ |
376 |
-colstretch all \ |
377 |
-rowstretch all \ |
378 |
-browsecommand {set table(current) %S} \ |
379 |
-xscrollcommand {.ascplot.bot_frm.table_frm.datatable.scrollbar3 set} \ |
380 |
-yscrollcommand {.ascplot.bot_frm.table_frm.datatable.scrollbar2 set} |
381 |
# -batchmode 1 \ |
382 |
|
383 |
# pack widget .ascplot.bot_frm.table_frm.datatable |
384 |
pack append .ascplot.bot_frm.table_frm.datatable \ |
385 |
.ascplot.bot_frm.table_frm.datatable.scrollbar3 {top frame center fillx} \ |
386 |
.ascplot.bot_frm.table_frm.datatable.scrollbar2 {left frame center filly} \ |
387 |
.ascplot.bot_frm.table_frm.datatable.table1 {left frame center fill} |
388 |
|
389 |
# pack widget .ascplot.bot_frm.table_frm |
390 |
pack append .ascplot.bot_frm.table_frm \ |
391 |
.ascplot.bot_frm.table_frm.datatable {top frame center fill} |
392 |
|
393 |
# build widget .ascplot.top_frm.varfrm |
394 |
frame .ascplot.top_frm.varfrm |
395 |
|
396 |
# build widget .ascplot.top_frm.varfrm.varlbl |
397 |
frame .ascplot.top_frm.varfrm.varlbl |
398 |
label .ascplot.top_frm.varfrm.varlbl.left \ |
399 |
-font $ascplotvect(btnfont) \ |
400 |
-text "unused variables" |
401 |
|
402 |
label .ascplot.top_frm.varfrm.varlbl.right \ |
403 |
-font $ascplotvect(btnfont) \ |
404 |
-text "plotted variables" |
405 |
|
406 |
pack append .ascplot.top_frm.varfrm.varlbl \ |
407 |
.ascplot.top_frm.varfrm.varlbl.left {left frame center expand fill} \ |
408 |
.ascplot.top_frm.varfrm.varlbl.right {right frame center expand fill} |
409 |
# build widget .ascplot.top_frm.varfrm.indepvar |
410 |
frame .ascplot.top_frm.varfrm.indepvar |
411 |
|
412 |
# build widget .ascplot.top_frm.varfrm.indepvar.entry5 |
413 |
entry .ascplot.top_frm.varfrm.indepvar.entry5 \ |
414 |
-state disabled \ |
415 |
-font $ascplotvect(textfont) |
416 |
|
417 |
# build widget .ascplot.top_frm.varfrm.indepvar.label4 |
418 |
label .ascplot.top_frm.varfrm.indepvar.label4 \ |
419 |
-font $ascplotvect(btnfont) \ |
420 |
-text {Independent:} |
421 |
|
422 |
# pack widget .ascplot.top_frm.varfrm.indepvar |
423 |
pack append .ascplot.top_frm.varfrm.indepvar \ |
424 |
.ascplot.top_frm.varfrm.indepvar.label4 {left frame center} \ |
425 |
.ascplot.top_frm.varfrm.indepvar.entry5 {top frame center expand fill} |
426 |
|
427 |
# build widget .ascplot.top_frm.varfrm.varsel |
428 |
frame .ascplot.top_frm.varfrm.varsel |
429 |
|
430 |
# build widget .ascplot.top_frm.varfrm.varsel.ctrbtns |
431 |
frame .ascplot.top_frm.varfrm.varsel.ctrbtns |
432 |
|
433 |
# build widget .ascplot.top_frm.varfrm.varsel.ctrbtns.bleft |
434 |
button .ascplot.top_frm.varfrm.varsel.ctrbtns.bleft \ |
435 |
-font $ascplotvect(btnfont) \ |
436 |
-command ascplot_selindependentleft \ |
437 |
-text {V} |
438 |
|
439 |
# build widget .ascplot.top_frm.varfrm.varsel.ctrbtns.bmid |
440 |
button .ascplot.top_frm.varfrm.varsel.ctrbtns.bmid \ |
441 |
-font $ascplotvect(btnfont) \ |
442 |
-command ascplot_unseldependent \ |
443 |
-text {<<} |
444 |
|
445 |
# build widget .ascplot.top_frm.varfrm.varsel.ctrbtns.bright |
446 |
button .ascplot.top_frm.varfrm.varsel.ctrbtns.bright \ |
447 |
-font $ascplotvect(btnfont) \ |
448 |
-command ascplot_selindependentright \ |
449 |
-text {V} |
450 |
|
451 |
# build widget .ascplot.top_frm.varfrm.varsel.ctrbtns.btop |
452 |
button .ascplot.top_frm.varfrm.varsel.ctrbtns.btop \ |
453 |
-font $ascplotvect(btnfont) \ |
454 |
-command ascplot_seldependent \ |
455 |
-text {>>} |
456 |
|
457 |
# pack widget .ascplot.top_frm.varfrm.varsel.ctrbtns |
458 |
pack append .ascplot.top_frm.varfrm.varsel.ctrbtns \ |
459 |
.ascplot.top_frm.varfrm.varsel.ctrbtns.btop {top frame center expand fill}\ |
460 |
.ascplot.top_frm.varfrm.varsel.ctrbtns.bmid {top frame center expand fill}\ |
461 |
.ascplot.top_frm.varfrm.varsel.ctrbtns.bleft \ |
462 |
{left frame center expand fill} \ |
463 |
.ascplot.top_frm.varfrm.varsel.ctrbtns.bright \ |
464 |
{left frame center expand fill} |
465 |
|
466 |
# build widget .ascplot.top_frm.varfrm.varsel.depvar |
467 |
frame .ascplot.top_frm.varfrm.varsel.depvar |
468 |
|
469 |
# build widget .ascplot.top_frm.varfrm.varsel.depvar.scrollbar2 |
470 |
scrollbar .ascplot.top_frm.varfrm.varsel.depvar.scrollbar2 \ |
471 |
-command {.ascplot.top_frm.varfrm.varsel.depvar.listbox1 yview} |
472 |
|
473 |
# build widget .ascplot.top_frm.varfrm.varsel.depvar.scrollbar3 |
474 |
scrollbar .ascplot.top_frm.varfrm.varsel.depvar.scrollbar3 \ |
475 |
-command {.ascplot.top_frm.varfrm.varsel.depvar.listbox1 xview} \ |
476 |
-orient {horizontal} |
477 |
|
478 |
# build widget .ascplot.top_frm.varfrm.varsel.depvar.listbox1 |
479 |
listbox .ascplot.top_frm.varfrm.varsel.depvar.listbox1 \ |
480 |
-width {20} \ |
481 |
-height {2} \ |
482 |
-xscrollcommand {.ascplot.top_frm.varfrm.varsel.depvar.scrollbar3 set} \ |
483 |
-yscrollcommand {.ascplot.top_frm.varfrm.varsel.depvar.scrollbar2 set} \ |
484 |
-font $ascplotvect(textfont) \ |
485 |
-selectmode extended \ |
486 |
|
487 |
# pack widget .ascplot.top_frm.varfrm.varsel.depvar |
488 |
pack append .ascplot.top_frm.varfrm.varsel.depvar \ |
489 |
.ascplot.top_frm.varfrm.varsel.depvar.scrollbar2 \ |
490 |
{right frame center filly} \ |
491 |
.ascplot.top_frm.varfrm.varsel.depvar.listbox1 \ |
492 |
{top frame center expand fill} \ |
493 |
.ascplot.top_frm.varfrm.varsel.depvar.scrollbar3 \ |
494 |
{bottom frame center fillx} |
495 |
|
496 |
# build widget .ascplot.top_frm.varfrm.varsel.varlist |
497 |
frame .ascplot.top_frm.varfrm.varsel.varlist |
498 |
|
499 |
# build widget .ascplot.top_frm.varfrm.varsel.varlist.scrollbar2 |
500 |
scrollbar .ascplot.top_frm.varfrm.varsel.varlist.scrollbar2 \ |
501 |
-command {.ascplot.top_frm.varfrm.varsel.varlist.listbox1 yview} |
502 |
|
503 |
# build widget .ascplot.top_frm.varfrm.varsel.varlist.scrollbar3 |
504 |
scrollbar .ascplot.top_frm.varfrm.varsel.varlist.scrollbar3 \ |
505 |
-command {.ascplot.top_frm.varfrm.varsel.varlist.listbox1 xview} \ |
506 |
-orient {horizontal} |
507 |
|
508 |
# build widget .ascplot.top_frm.varfrm.varsel.varlist.listbox1 |
509 |
listbox .ascplot.top_frm.varfrm.varsel.varlist.listbox1 \ |
510 |
-width {20} \ |
511 |
-height {2} \ |
512 |
-xscrollcommand {.ascplot.top_frm.varfrm.varsel.varlist.scrollbar3 set} \ |
513 |
-yscrollcommand {.ascplot.top_frm.varfrm.varsel.varlist.scrollbar2 set} \ |
514 |
-font $ascplotvect(textfont) \ |
515 |
-selectmode extended |
516 |
|
517 |
|
518 |
# pack widget .ascplot.top_frm.varfrm.varsel.varlist |
519 |
pack append .ascplot.top_frm.varfrm.varsel.varlist \ |
520 |
.ascplot.top_frm.varfrm.varsel.varlist.scrollbar2 \ |
521 |
{left frame center filly} \ |
522 |
.ascplot.top_frm.varfrm.varsel.varlist.listbox1 \ |
523 |
{top frame center expand fill} \ |
524 |
.ascplot.top_frm.varfrm.varsel.varlist.scrollbar3 \ |
525 |
{bottom frame center fillx} |
526 |
|
527 |
# pack widget .ascplot.top_frm.varfrm.varsel |
528 |
pack append .ascplot.top_frm.varfrm.varsel \ |
529 |
.ascplot.top_frm.varfrm.varsel.varlist {left frame center expand fill} \ |
530 |
.ascplot.top_frm.varfrm.varsel.ctrbtns {left frame center filly} \ |
531 |
.ascplot.top_frm.varfrm.varsel.depvar {left frame center expand fill} |
532 |
|
533 |
# pack widget .ascplot.top_frm.varfrm |
534 |
pack append .ascplot.top_frm.varfrm \ |
535 |
.ascplot.top_frm.varfrm.varlbl {top frame center fillx} \ |
536 |
.ascplot.top_frm.varfrm.varsel {top frame center expand fill} \ |
537 |
.ascplot.top_frm.varfrm.indepvar {top frame center fill} |
538 |
|
539 |
# pack widget .ascplot.top_frm |
540 |
pack append .ascplot.top_frm \ |
541 |
.ascplot.top_frm.datasets {top frame center expand fill} \ |
542 |
.ascplot.top_frm.varfrm {top frame center expand fill} |
543 |
|
544 |
# pack widget .ascplot.bot_frm |
545 |
pack append .ascplot.bot_frm \ |
546 |
.ascplot.bot_frm.message {top frame center expand fill} \ |
547 |
.ascplot.bot_frm.table_frm {top frame center fill} |
548 |
|
549 |
# pack widget .ascplot |
550 |
pack append .ascplot \ |
551 |
.ascplot.top_frm {top frame center expand fill} \ |
552 |
.ascplot.bot_frm {top frame center expand fill} |
553 |
|
554 |
.ascplot.bot_frm.message.text2 insert end {} |
555 |
.ascplot.top_frm.varfrm.indepvar.entry5 insert end {ivar} |
556 |
|
557 |
|
558 |
|
559 |
if {"[info procs XFEdit]" != ""} { |
560 |
catch "XFMiscBindWidgetTree .ascplot" |
561 |
after 2 "catch {XFEditSetShowWindows}" |
562 |
} |
563 |
} |
564 |
|
565 |
proc DestroyWindow.ascplot {} {# xf ignore me 7 |
566 |
if {"[info procs XFEdit]" != ""} { |
567 |
if {"[info commands .ascplot]" != ""} { |
568 |
global xfShowWindow.ascplot |
569 |
set xfShowWindow.ascplot 0 |
570 |
XFEditSetPath . |
571 |
after 2 "XFSaveAsProc .ascplot; XFEditSetShowWindows" |
572 |
} |
573 |
} { |
574 |
catch "destroy .ascplot" |
575 |
update |
576 |
} |
577 |
} |
578 |
|
579 |
|
580 |
# User defined procedures |
581 |
|
582 |
|
583 |
# Internal procedures |
584 |
|
585 |
# eof |
586 |
# |
587 |
|