First in a series of commits aimed at (ab)using TCL namespaces for
removing configuration and per-object (node, link, canvas, annotation)
variables from the global namespace. Once completed, this storage
reorganization should allow us to manage multiple independent IMUNES
configs in parallel and simplify implementation of cut/copy/paste
functionality in the GUI.
This change introduces a new top-level namespace ::cf, which holds
all configuration instances in subordinated namespaces. So far only
::cf::cfg0 is used.
The new global variable "curconf" selects the working configuration
instance. Inside most procedures, access to previously global
variables is replaced by variable aliasing to the appropriate
::cf namespace. The change typically looks like this:
- global $target
+ upvar 0 ::cf::[set ::curcfg]::$target $target
So far only storage for objects visible in a canvas has beend pushed out
of the global namespace. Deciding on how to deal with the various GUI
options (option show) needs more thought.