1 |
johnpye |
571 |
# 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 |
ben.allan |
659 |
-command ascplot_loaddata \ |
218 |
|
|
-label {Open data set} \ |
219 |
|
|
-accelerator {Alt-f o} \ |
220 |
|
|
-underline 0 |
221 |
|
|
.ascplot.menubar.file add command \ |
222 |
johnpye |
571 |
-command ascplot_savedata \ |
223 |
|
|
-label {Save data set} \ |
224 |
|
|
-accelerator {Alt-f s} \ |
225 |
|
|
-underline 0 |
226 |
|
|
.ascplot.menubar.file add command \ |
227 |
|
|
-command {ascplot_reloaddata 1} \ |
228 |
|
|
-accelerator {Alt-f l} \ |
229 |
|
|
-label {Reload data set} \ |
230 |
|
|
-underline 2 |
231 |
|
|
.ascplot.menubar.file add command \ |
232 |
|
|
-command {ascplot_unloaddata 1} \ |
233 |
|
|
-label {Unload data set} \ |
234 |
|
|
-accelerator {Alt-f u} \ |
235 |
|
|
-underline 0 |
236 |
|
|
.ascplot.menubar.file add separator |
237 |
|
|
.ascplot.menubar.file add command \ |
238 |
|
|
-command {ascplot_dook} \ |
239 |
|
|
-accelerator {Alt-f c} \ |
240 |
|
|
-label {Close window} \ |
241 |
|
|
-underline 0 |
242 |
|
|
|
243 |
|
|
|
244 |
|
|
# The Help menu |
245 |
|
|
menu .ascplot.menubar.help \ |
246 |
|
|
-tearoffcommand .ASCPLOT.MENUBAR.HELP \ |
247 |
|
|
-tearoff 0 |
248 |
|
|
.ascplot.menubar.help add command \ |
249 |
|
|
-command ascplot_sshelp \ |
250 |
|
|
-label {Using the data table} |
251 |
|
|
.ascplot.menubar.help add command \ |
252 |
|
|
-command ascplot_ssbinds \ |
253 |
|
|
-label {Data table key bindings} |
254 |
|
|
.ascplot.menubar.help add command \ |
255 |
|
|
-command ascplot_credits \ |
256 |
|
|
-label {Whodunnit} |
257 |
|
|
.ascplot.menubar.help add command \ |
258 |
|
|
-command ascplot_sources \ |
259 |
|
|
-label {Where to get it} |
260 |
|
|
|
261 |
|
|
|
262 |
|
|
# The Options menu |
263 |
|
|
menu .ascplot.menubar.options \ |
264 |
|
|
-tearoffcommand .ASCPLOT.MENUBAR.OPTIONS \ |
265 |
|
|
-tearoff 0 |
266 |
|
|
.ascplot.menubar.options add command \ |
267 |
|
|
-command ascplot_grill \ |
268 |
|
|
-accelerator {Alt-o o} \ |
269 |
|
|
-label {See options...} \ |
270 |
|
|
-underline 4 |
271 |
|
|
.ascplot.menubar.options add separator |
272 |
|
|
.ascplot.menubar.options add cascade \ |
273 |
|
|
-menu {.ascplot.menubar.options.graph} \ |
274 |
|
|
-accelerator {Alt-o g} \ |
275 |
|
|
-label {Select grapher} \ |
276 |
|
|
-underline 7 |
277 |
|
|
|
278 |
|
|
# the Grapher submenu under the Options menu |
279 |
|
|
menu .ascplot.menubar.options.graph \ |
280 |
|
|
-tearoffcommand .ASCPLOT.MENUBAR.EDIT.GRAPH \ |
281 |
|
|
-tearoff 0 |
282 |
|
|
.ascplot.menubar.options.graph add command \ |
283 |
|
|
-command "ascplot_selplotter xgraph" \ |
284 |
|
|
-label {Xgraph} \ |
285 |
|
|
-underline 0 |
286 |
|
|
.ascplot.menubar.options.graph add command \ |
287 |
|
|
-command "ascplot_selplotter xmgr" \ |
288 |
|
|
-label {XMGR} \ |
289 |
|
|
-underline 1 |
290 |
|
|
.ascplot.menubar.options.graph add command \ |
291 |
|
|
-command "ascplot_selplotter gnuplot" \ |
292 |
|
|
-label {gnuplot} \ |
293 |
|
|
-underline 0 |
294 |
|
|
|
295 |
|
|
|
296 |
|
|
# |
297 |
|
|
# Add the menus as cascades of the toplevel's menu; |
298 |
|
|
# add the toplevel's menu to the toplevel |
299 |
|
|
# |
300 |
|
|
.ascplot.menubar add cascade \ |
301 |
|
|
-menu .ascplot.menubar.file \ |
302 |
|
|
-label {File} \ |
303 |
|
|
-underline 0 |
304 |
|
|
.ascplot.menubar add cascade \ |
305 |
|
|
-menu .ascplot.menubar.edit \ |
306 |
|
|
-label {Edit} \ |
307 |
|
|
-underline 0 |
308 |
|
|
.ascplot.menubar add cascade \ |
309 |
|
|
-menu .ascplot.menubar.execute \ |
310 |
|
|
-label {Execute} \ |
311 |
|
|
-underline 1 |
312 |
|
|
.ascplot.menubar add cascade \ |
313 |
|
|
-menu .ascplot.menubar.display \ |
314 |
|
|
-label {Display} \ |
315 |
|
|
-underline 0 |
316 |
|
|
.ascplot.menubar add cascade \ |
317 |
|
|
-menu .ascplot.menubar.options \ |
318 |
|
|
-label {Options} \ |
319 |
|
|
-underline 0 |
320 |
|
|
.ascplot.menubar add cascade \ |
321 |
|
|
-menu .ascplot.menubar.help \ |
322 |
|
|
-underline 0 \ |
323 |
|
|
-label {Help} |
324 |
|
|
.ascplot configure \ |
325 |
|
|
-menu .ascplot.menubar |
326 |
|
|
|
327 |
|
|
|
328 |
|
|
# build widget .ascplot.bot_frm.message |
329 |
|
|
frame .ascplot.bot_frm.message |
330 |
|
|
|
331 |
|
|
# build widget .ascplot.bot_frm.message.scrollbar1 |
332 |
|
|
scrollbar .ascplot.bot_frm.message.scrollbar1 \ |
333 |
|
|
-command {.ascplot.bot_frm.message.text2 yview} |
334 |
|
|
|
335 |
|
|
# build widget .ascplot.bot_frm.message.text2 |
336 |
|
|
text .ascplot.bot_frm.message.text2 \ |
337 |
|
|
-exportselection {0} \ |
338 |
|
|
-width {28} \ |
339 |
|
|
-wrap {word} \ |
340 |
|
|
-yscrollcommand {.ascplot.bot_frm.message.scrollbar1 set} |
341 |
|
|
|
342 |
|
|
# bindings |
343 |
|
|
bind .ascplot.bot_frm.message.text2 <Any-Key> {} |
344 |
|
|
|
345 |
|
|
# pack widget .ascplot.bot_frm.message |
346 |
|
|
pack append .ascplot.bot_frm.message \ |
347 |
|
|
.ascplot.bot_frm.message.scrollbar1 {left frame center filly} \ |
348 |
|
|
.ascplot.bot_frm.message.text2 {top frame center expand fill} |
349 |
|
|
|
350 |
|
|
# build widget .ascplot.bot_frm.table_frm |
351 |
|
|
frame .ascplot.bot_frm.table_frm |
352 |
|
|
|
353 |
|
|
# build widget .ascplot.bot_frm.table_frm.datatable |
354 |
|
|
frame .ascplot.bot_frm.table_frm.datatable |
355 |
|
|
|
356 |
|
|
# build widget .ascplot.bot_frm.table_frm.datatable.scrollbar2 |
357 |
|
|
scrollbar .ascplot.bot_frm.table_frm.datatable.scrollbar2 \ |
358 |
|
|
-command {.ascplot.bot_frm.table_frm.datatable.table1 yview} |
359 |
|
|
|
360 |
|
|
# build widget .ascplot.bot_frm.table_frm.datatable.scrollbar3 |
361 |
|
|
scrollbar .ascplot.bot_frm.table_frm.datatable.scrollbar3 \ |
362 |
|
|
-command {.ascplot.bot_frm.table_frm.datatable.table1 xview} \ |
363 |
|
|
-orient {horizontal} |
364 |
|
|
|
365 |
|
|
# build widget .ascplot.bot_frm.table_frm.datatable.table1 |
366 |
|
|
table .ascplot.bot_frm.table_frm.datatable.table1 \ |
367 |
|
|
-exportselection 0 \ |
368 |
|
|
-titlerows 3 \ |
369 |
|
|
-titlecols 1 \ |
370 |
|
|
-font $ascplotvect(textfont) \ |
371 |
|
|
-roworigin -3 \ |
372 |
|
|
-colorigin -1 \ |
373 |
|
|
-height 0 \ |
374 |
|
|
-width 10 \ |
375 |
|
|
-variable $ascplotvect(dummyvar) \ |
376 |
|
|
-rows 6 \ |
377 |
|
|
-cols 6 \ |
378 |
|
|
-colseparator "\t" \ |
379 |
|
|
-rowseparator "\n" \ |
380 |
|
|
-selectmode extended \ |
381 |
|
|
-colstretch all \ |
382 |
|
|
-rowstretch all \ |
383 |
|
|
-browsecommand {set table(current) %S} \ |
384 |
|
|
-xscrollcommand {.ascplot.bot_frm.table_frm.datatable.scrollbar3 set} \ |
385 |
|
|
-yscrollcommand {.ascplot.bot_frm.table_frm.datatable.scrollbar2 set} |
386 |
|
|
# -batchmode 1 \ |
387 |
|
|
|
388 |
|
|
# pack widget .ascplot.bot_frm.table_frm.datatable |
389 |
|
|
pack append .ascplot.bot_frm.table_frm.datatable \ |
390 |
|
|
.ascplot.bot_frm.table_frm.datatable.scrollbar3 {top frame center fillx} \ |
391 |
|
|
.ascplot.bot_frm.table_frm.datatable.scrollbar2 {left frame center filly} \ |
392 |
|
|
.ascplot.bot_frm.table_frm.datatable.table1 {left frame center fill} |
393 |
|
|
|
394 |
|
|
# pack widget .ascplot.bot_frm.table_frm |
395 |
|
|
pack append .ascplot.bot_frm.table_frm \ |
396 |
|
|
.ascplot.bot_frm.table_frm.datatable {top frame center fill} |
397 |
|
|
|
398 |
|
|
# build widget .ascplot.top_frm.varfrm |
399 |
|
|
frame .ascplot.top_frm.varfrm |
400 |
|
|
|
401 |
|
|
# build widget .ascplot.top_frm.varfrm.varlbl |
402 |
|
|
frame .ascplot.top_frm.varfrm.varlbl |
403 |
|
|
label .ascplot.top_frm.varfrm.varlbl.left \ |
404 |
|
|
-font $ascplotvect(btnfont) \ |
405 |
|
|
-text "unused variables" |
406 |
|
|
|
407 |
|
|
label .ascplot.top_frm.varfrm.varlbl.right \ |
408 |
|
|
-font $ascplotvect(btnfont) \ |
409 |
|
|
-text "plotted variables" |
410 |
|
|
|
411 |
|
|
pack append .ascplot.top_frm.varfrm.varlbl \ |
412 |
|
|
.ascplot.top_frm.varfrm.varlbl.left {left frame center expand fill} \ |
413 |
|
|
.ascplot.top_frm.varfrm.varlbl.right {right frame center expand fill} |
414 |
|
|
# build widget .ascplot.top_frm.varfrm.indepvar |
415 |
|
|
frame .ascplot.top_frm.varfrm.indepvar |
416 |
|
|
|
417 |
|
|
# build widget .ascplot.top_frm.varfrm.indepvar.entry5 |
418 |
|
|
entry .ascplot.top_frm.varfrm.indepvar.entry5 \ |
419 |
|
|
-state disabled \ |
420 |
|
|
-font $ascplotvect(textfont) |
421 |
|
|
|
422 |
|
|
# build widget .ascplot.top_frm.varfrm.indepvar.label4 |
423 |
|
|
label .ascplot.top_frm.varfrm.indepvar.label4 \ |
424 |
|
|
-font $ascplotvect(btnfont) \ |
425 |
|
|
-text {Independent:} |
426 |
|
|
|
427 |
|
|
# pack widget .ascplot.top_frm.varfrm.indepvar |
428 |
|
|
pack append .ascplot.top_frm.varfrm.indepvar \ |
429 |
|
|
.ascplot.top_frm.varfrm.indepvar.label4 {left frame center} \ |
430 |
|
|
.ascplot.top_frm.varfrm.indepvar.entry5 {top frame center expand fill} |
431 |
|
|
|
432 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel |
433 |
|
|
frame .ascplot.top_frm.varfrm.varsel |
434 |
|
|
|
435 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel.ctrbtns |
436 |
|
|
frame .ascplot.top_frm.varfrm.varsel.ctrbtns |
437 |
|
|
|
438 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel.ctrbtns.bleft |
439 |
|
|
button .ascplot.top_frm.varfrm.varsel.ctrbtns.bleft \ |
440 |
|
|
-font $ascplotvect(btnfont) \ |
441 |
|
|
-command ascplot_selindependentleft \ |
442 |
|
|
-text {V} |
443 |
|
|
|
444 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel.ctrbtns.bmid |
445 |
|
|
button .ascplot.top_frm.varfrm.varsel.ctrbtns.bmid \ |
446 |
|
|
-font $ascplotvect(btnfont) \ |
447 |
|
|
-command ascplot_unseldependent \ |
448 |
|
|
-text {<<} |
449 |
|
|
|
450 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel.ctrbtns.bright |
451 |
|
|
button .ascplot.top_frm.varfrm.varsel.ctrbtns.bright \ |
452 |
|
|
-font $ascplotvect(btnfont) \ |
453 |
|
|
-command ascplot_selindependentright \ |
454 |
|
|
-text {V} |
455 |
|
|
|
456 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel.ctrbtns.btop |
457 |
|
|
button .ascplot.top_frm.varfrm.varsel.ctrbtns.btop \ |
458 |
|
|
-font $ascplotvect(btnfont) \ |
459 |
|
|
-command ascplot_seldependent \ |
460 |
|
|
-text {>>} |
461 |
|
|
|
462 |
|
|
# pack widget .ascplot.top_frm.varfrm.varsel.ctrbtns |
463 |
|
|
pack append .ascplot.top_frm.varfrm.varsel.ctrbtns \ |
464 |
|
|
.ascplot.top_frm.varfrm.varsel.ctrbtns.btop {top frame center expand fill}\ |
465 |
|
|
.ascplot.top_frm.varfrm.varsel.ctrbtns.bmid {top frame center expand fill}\ |
466 |
|
|
.ascplot.top_frm.varfrm.varsel.ctrbtns.bleft \ |
467 |
|
|
{left frame center expand fill} \ |
468 |
|
|
.ascplot.top_frm.varfrm.varsel.ctrbtns.bright \ |
469 |
|
|
{left frame center expand fill} |
470 |
|
|
|
471 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel.depvar |
472 |
|
|
frame .ascplot.top_frm.varfrm.varsel.depvar |
473 |
|
|
|
474 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel.depvar.scrollbar2 |
475 |
|
|
scrollbar .ascplot.top_frm.varfrm.varsel.depvar.scrollbar2 \ |
476 |
|
|
-command {.ascplot.top_frm.varfrm.varsel.depvar.listbox1 yview} |
477 |
|
|
|
478 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel.depvar.scrollbar3 |
479 |
|
|
scrollbar .ascplot.top_frm.varfrm.varsel.depvar.scrollbar3 \ |
480 |
|
|
-command {.ascplot.top_frm.varfrm.varsel.depvar.listbox1 xview} \ |
481 |
|
|
-orient {horizontal} |
482 |
|
|
|
483 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel.depvar.listbox1 |
484 |
|
|
listbox .ascplot.top_frm.varfrm.varsel.depvar.listbox1 \ |
485 |
|
|
-width {20} \ |
486 |
|
|
-height {2} \ |
487 |
|
|
-xscrollcommand {.ascplot.top_frm.varfrm.varsel.depvar.scrollbar3 set} \ |
488 |
|
|
-yscrollcommand {.ascplot.top_frm.varfrm.varsel.depvar.scrollbar2 set} \ |
489 |
|
|
-font $ascplotvect(textfont) \ |
490 |
|
|
-selectmode extended \ |
491 |
|
|
|
492 |
|
|
# pack widget .ascplot.top_frm.varfrm.varsel.depvar |
493 |
|
|
pack append .ascplot.top_frm.varfrm.varsel.depvar \ |
494 |
|
|
.ascplot.top_frm.varfrm.varsel.depvar.scrollbar2 \ |
495 |
|
|
{right frame center filly} \ |
496 |
|
|
.ascplot.top_frm.varfrm.varsel.depvar.listbox1 \ |
497 |
|
|
{top frame center expand fill} \ |
498 |
|
|
.ascplot.top_frm.varfrm.varsel.depvar.scrollbar3 \ |
499 |
|
|
{bottom frame center fillx} |
500 |
|
|
|
501 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel.varlist |
502 |
|
|
frame .ascplot.top_frm.varfrm.varsel.varlist |
503 |
|
|
|
504 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel.varlist.scrollbar2 |
505 |
|
|
scrollbar .ascplot.top_frm.varfrm.varsel.varlist.scrollbar2 \ |
506 |
|
|
-command {.ascplot.top_frm.varfrm.varsel.varlist.listbox1 yview} |
507 |
|
|
|
508 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel.varlist.scrollbar3 |
509 |
|
|
scrollbar .ascplot.top_frm.varfrm.varsel.varlist.scrollbar3 \ |
510 |
|
|
-command {.ascplot.top_frm.varfrm.varsel.varlist.listbox1 xview} \ |
511 |
|
|
-orient {horizontal} |
512 |
|
|
|
513 |
|
|
# build widget .ascplot.top_frm.varfrm.varsel.varlist.listbox1 |
514 |
|
|
listbox .ascplot.top_frm.varfrm.varsel.varlist.listbox1 \ |
515 |
|
|
-width {20} \ |
516 |
|
|
-height {2} \ |
517 |
|
|
-xscrollcommand {.ascplot.top_frm.varfrm.varsel.varlist.scrollbar3 set} \ |
518 |
|
|
-yscrollcommand {.ascplot.top_frm.varfrm.varsel.varlist.scrollbar2 set} \ |
519 |
|
|
-font $ascplotvect(textfont) \ |
520 |
|
|
-selectmode extended |
521 |
|
|
|
522 |
|
|
|
523 |
|
|
# pack widget .ascplot.top_frm.varfrm.varsel.varlist |
524 |
|
|
pack append .ascplot.top_frm.varfrm.varsel.varlist \ |
525 |
|
|
.ascplot.top_frm.varfrm.varsel.varlist.scrollbar2 \ |
526 |
|
|
{left frame center filly} \ |
527 |
|
|
.ascplot.top_frm.varfrm.varsel.varlist.listbox1 \ |
528 |
|
|
{top frame center expand fill} \ |
529 |
|
|
.ascplot.top_frm.varfrm.varsel.varlist.scrollbar3 \ |
530 |
|
|
{bottom frame center fillx} |
531 |
|
|
|
532 |
|
|
# pack widget .ascplot.top_frm.varfrm.varsel |
533 |
|
|
pack append .ascplot.top_frm.varfrm.varsel \ |
534 |
|
|
.ascplot.top_frm.varfrm.varsel.varlist {left frame center expand fill} \ |
535 |
|
|
.ascplot.top_frm.varfrm.varsel.ctrbtns {left frame center filly} \ |
536 |
|
|
.ascplot.top_frm.varfrm.varsel.depvar {left frame center expand fill} |
537 |
|
|
|
538 |
|
|
# pack widget .ascplot.top_frm.varfrm |
539 |
|
|
pack append .ascplot.top_frm.varfrm \ |
540 |
|
|
.ascplot.top_frm.varfrm.varlbl {top frame center fillx} \ |
541 |
|
|
.ascplot.top_frm.varfrm.varsel {top frame center expand fill} \ |
542 |
|
|
.ascplot.top_frm.varfrm.indepvar {top frame center fill} |
543 |
|
|
|
544 |
|
|
# pack widget .ascplot.top_frm |
545 |
|
|
pack append .ascplot.top_frm \ |
546 |
|
|
.ascplot.top_frm.datasets {top frame center expand fill} \ |
547 |
|
|
.ascplot.top_frm.varfrm {top frame center expand fill} |
548 |
|
|
|
549 |
|
|
# pack widget .ascplot.bot_frm |
550 |
|
|
pack append .ascplot.bot_frm \ |
551 |
|
|
.ascplot.bot_frm.message {top frame center expand fill} \ |
552 |
|
|
.ascplot.bot_frm.table_frm {top frame center fill} |
553 |
|
|
|
554 |
|
|
# pack widget .ascplot |
555 |
|
|
pack append .ascplot \ |
556 |
|
|
.ascplot.top_frm {top frame center expand fill} \ |
557 |
|
|
.ascplot.bot_frm {top frame center expand fill} |
558 |
|
|
|
559 |
|
|
.ascplot.bot_frm.message.text2 insert end {} |
560 |
|
|
.ascplot.top_frm.varfrm.indepvar.entry5 insert end {ivar} |
561 |
|
|
|
562 |
|
|
|
563 |
|
|
|
564 |
|
|
if {"[info procs XFEdit]" != ""} { |
565 |
|
|
catch "XFMiscBindWidgetTree .ascplot" |
566 |
|
|
after 2 "catch {XFEditSetShowWindows}" |
567 |
|
|
} |
568 |
|
|
} |
569 |
|
|
|
570 |
|
|
proc DestroyWindow.ascplot {} {# xf ignore me 7 |
571 |
|
|
if {"[info procs XFEdit]" != ""} { |
572 |
|
|
if {"[info commands .ascplot]" != ""} { |
573 |
|
|
global xfShowWindow.ascplot |
574 |
|
|
set xfShowWindow.ascplot 0 |
575 |
|
|
XFEditSetPath . |
576 |
|
|
after 2 "XFSaveAsProc .ascplot; XFEditSetShowWindows" |
577 |
|
|
} |
578 |
|
|
} { |
579 |
|
|
catch "destroy .ascplot" |
580 |
|
|
update |
581 |
|
|
} |
582 |
|
|
} |
583 |
|
|
|
584 |
|
|
|
585 |
|
|
# User defined procedures |
586 |
|
|
|
587 |
|
|
|
588 |
|
|
# Internal procedures |
589 |
|
|
|
590 |
|
|
# eof |
591 |
|
|
# |
592 |
|
|
|