Instructions for the use of the Pseudo-Scientific Visualizer:

[Warning: This is an early release of half-baked code with an arcane
user interface. When it becomes obsolete, please print it out and burn
it. -Don]

Load in all the necessary PostScript code:

Note: piemenu.ps, neatwin.ps, and pullout.ps are in ../../utilities/piemenus/
      object-browser.ps is in ../../utilities/object-browser/

psh piemenu.ps
psh neatwin.ps
psh object-browser.ps
psh pullout.ps
psh visualizer.ps

This will define various classes, installing pie menus, and neat
windows.  Subsequently created windows will have a frame pie menu,
with various window managment items, including an "Etc..." submenu (to
the SW).  To pop up the frame pie menu, move the mouse over the frame,
and click (press and release) the right button, move into the slice
you want, and click again to make the selection. Once you're used to a
pie menu, you can press down and holding the menu button, move in the
appropriate direction, and release, in one swift motion, without
waiting for the menu to be displayed. (If you press down and hold,
instead of clicking, there is a delay to give you a chance to mouse
ahead to the selection, so click down and up if you want to see it
right away.)  [This effect is called "mouse-ahead display
supression".] Clicking the middle button in a pie menu pops you back a
level.

Once you get all the stuff loaded in, pop up the root menu and create
a new window. Psterm's a good one to run. Pop up the frame menu on the
new window. Select the "Etc..." submenu. Select "userdict", to pop up
a object browser on the private dictionary of that process. It will
beam in, and the next click determines its lower left corner. The
browser will display the keys in that window's userdict, and the
values they're bound to. Clicking the left mouse button on a composite
object (array, dictionary, canvas, process, event, etc..) will open up
another browser window on that object. Clicking the middle button on
any entry will pop up an edit window, used to change its value.
Clicking the right menu button in the object browser window gets a
menu of things to do to the dict or array. The menu depends on the
object's type. Processes, canvases, fonts, etc, which look like
dictionares, have selections that do various things to them. Each
browser menu has a "Visualize" entry, which pops up a
Pseudo-Scientific visualizer window on the object. The next two clicks
determine its corners. Open up a visualizer window on userdict. 

The visualizer will draw the tree of PostScript objects to a certian
depth. Whenever you reshape it or repaint it (the painting hand icon
on the frame pie menu), it is redrawn. It's most effective in color!
After it's done painting, there will be a slight pause while it wires
up its nervous system, and then you will be able to point at the blobs
with the mouse, and they'll highlight, and their value is shown in the
bottom border of the window. Clicking left on a blob pops up an object
browser on it. Clicking the middle button on a blob "zooms" the view
to the corresponding object and repaints the display.  Pressing the
left button in the visualizer window, when the cursor is not in a
blob, highlights all the mouse sensitive blobs, until you release the
button. Clicking the right menu button anywhere in the window pops up
a pull-out pie menu controling the view.  "Thing..." is a submenu of
some of my favorite objects to visualize. DrawDepth controls the
maximum depth that the visualizer recurses into the object, when
drawing it. TargetDepth controls the maximum depth (no greater than
DrawDepth) that dictionaries and arrays will be made mouse sensitive.
If this is a to big number, and you draw a deep complex object, it can
takes a long time to make those gazillions of tiny round target
canvases mouse sensitive.  "ColorFrob..." controls the Hue,
Saturation, and Brightness deviation that happens at each recursion.
MaxProcs controls the maximum number of concurrent processes used to
draw the data structure.  (As it draws, it occasonally forks off
PostScript processes to draw sub-stuctures, so there's lots of action
going on at once, and the overlapping is different every time it's
drawn.)  And of course, "Foo" is a metasyntactic variable. ;-)

The guts implementing the Visualizer are pretty foul -- it's a Rube
Goldberg device inside and out. I have plans to reimplement it so you
can switch between various views of different data types. (i.e.  the
dictionary-esque types (processes, canvases, etc) could either be
shown as icons, or opened up like dictionaries.) It should also tell
the name of an object in its parent dict, when you point at it. Send
me any ideas for improvements! Most needed are graphical ways in which
to represent data. Right now arrays are rings with their elements
around them; dictionaries are rings with a dot in the middle, their
keys around them, and the key values out past the keys. Strings are
thick lines whose length is proportional to the number of characters.
Built-in operators are circles with square holes. Numbers are squares
whose color is some crazy function of their value. Nulls are obscene
gestures. Processes are boots. Events are envelopes.  Everything else
is a triangle, right now. Lots more could be added. How can the
pictures be parameterized by the values of the objects they represent?
(one obviously parameterizable picture would be of the color type!) 

