Merge branch 'master' into bug-4403-remove-polyfill
[maxima.git] / interfaces / xmaxima / Tkmaxima / Private.tcl
blob592903479ce6e5d41398d1564ea36c31c8ffe062
1 # -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
3 # $Id: Private.tcl,v 1.3 2006-06-30 15:04:58 villate Exp $
5 ###### private.tcl ######
6 ############################################################
7 # Netmath Copyright (C) 1998 William F. Schelter #
8 # For distribution under GNU public License. See COPYING. #
9 ############################################################
11 # a private way of storing variables on a window by window
12 # basis
13 #mike FIXME: these stay in memory when the window is destroyed
15 proc makeLocal { win args } {
16 foreach v $args {
17 uplevel 1 set $v \[oget $win $v\]
21 proc linkLocal { win args } {
22 foreach v $args {
23 uplevel 1 upvar #0 _WinInfo${win}\($v) $v
27 proc clearLocal { win } {
28 global _WinInfo$win
29 # puts "clearing info for $win in [info level 1]"
30 catch { unset _WinInfo$win }
34 proc oset { win var val } {
35 global _WinInfo$win
36 set _WinInfo[set win]($var) $val
39 proc oarraySet { win vals } {
40 global _WinInfo$win
41 array set _WinInfo$win $vals
44 proc oloc { win var } {
45 return _WinInfo[set win]($var)
48 proc oarray { win } {
49 return _WinInfo[set win]
52 proc oget { win var } {
53 global _WinInfo$win
54 return [set _WinInfo[set win]($var)]
57 ## endsource private.tcl