🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #476

plot glyph with multiple views and rubberbands

#476
From: Michael Hines
Date: Sat, 15 Aug 1992 12:11
63 lines
3714 bytes
I have put a compressed tar file on interviews.stanford.edu:pub/contrib
called hinesgraph.tar.Z
It is a set of classes for plotting curves and written using 3.1beta.
In fact it's much more general and based on the idea of many views into
a scene of glyphs. When a glyph in the scene changes, all the views get
updated. Also rubberbands are handled somewhat like actions. When the 
pick method of a glyph wants to do something it installs a rubber band
handler with the action to execute when the rubber band is done.

I am hoping that one of two things will happen. First, people will like it
and start adding functionality and send me their improvements. That way
instead of all of us doing the same thing we can use each others work and
move forward. But that is probably too much to hope for. Second, Marc
or John will take a look at it, be horified, and very quickly come out with
a version of Unidraw that lives in the 3.1 universe in order to prevent
the  adoption of my classes by others -- or at least give constructive
criticism to help me do better next time. I consider myself a semi-advanced
3.1 interviews programmer but I think I'm still shaky about whether to use
inputhandler glyphs or have the pick method install a special handler when a 
glyph wants to do something.

Here is a portion of the README file:

This makes a demo program showing two sine waves of different frequencies.

In a graph window one can use the right mouse button to start a rubber
rectangle to select a portion of the graph. A new graph window will be
created which is filled with the selected portion. When one resizes a graph
window, the plot is scaled to fill the window.

With the  mouse on a curve, the left mouse button will start
a rubber crosshair with the coordinates of the point displayed. Dragging
the mouse will move the crosshairs along the curve.

You also get a ``Print Window Manager'' that allows one to organize the windows
that appear on the screen onto a page for printing. The manager contains
two scenes representing the screen and a piece of paper. The location and
relative size of each window appears on the screen scene.

To specify which subset of windows is to be printed
you click on the relevant rectangles in
the screen scene. A rectangle representing the relative location and size
on the page will appear in the page scene.

Windows selected for printing may be manipulated in the page scene. Place
the mouse cursor over the desired window rectangle in the page scene and:

Right button --- remove the window from the page. If one clicks again on
that window in the screen scene then the  window will return
to the same location and relative size on the page as when it was removed.

Middle button --- resize the window. This resizes not the window on the screen
but how large the window will appear on the page. The window always maintains
the same aspect ratio as the window on the console screen. To resize, drag
the mouse with the button down til the desired size is reached.

Left button --- move the window. Drag the mouse to the desired position
and release the button.

On my machine iconifying the printwindowmanager will unmap all the windows.
The manager is a toplevel window and the group leader for all the graph
windows which are transient windows.
Technical Details
Message-ID: <4579@news.duke.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!concert!duke!news.duke.edu!neuro.duke.edu!hines

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!concert!duke!news.duke.edu!neuro.duke.edu!hines
From: hines@neuro.duke.edu (Michael Hines)
Newsgroups: comp.windows.interviews
Subject: plot glyph with multiple views and rubberbands
Message-ID: <4579@news.duke.edu>
Date: 15 Aug 92 12:11:49 GMT
Sender: news@news.duke.edu
Lines: 63
Nntp-Posting-Host: timshel.neuro.duke.edu