🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #518

Re: Unidraw Connections

#518
From: John Vlissides
Date: Fri, 21 Aug 1992 14:09
46 lines
2792 bytes
In article <1992Aug19.003516.21913@iitmax.iit.edu>, you write:

> Well, since my last beginner question was answered, I am encouraged
> to try again.  In my Unidraw editor, the user can connect items
> together.  The connections should be displayed as lines or something,
> and when one of the items is moved, the connections should be updated.
> I have been trying to use the Connector and ConnectTool, but either
> I am using them wrongly or they don't mean what I think they mean.
> When I use the ConnectTool, click on a Pin in one item, and drag
> to the Pin in another item, it just seems to remove the first Pin
> from the screen.

The first pin (the "source") is not being removed; it has been
connected to the second pin (the "target").  Their centers now
coincide, so it only looks as though there is only one connector. (Try
rubberband-selecting the remaining pin---the handles won't appear!
That's because the handles are xor-drawn, so the coincident pins'
handles cancel each other out.)

Connectors (and components in general) define a notion of "mobility."
A component can have "fixed" mobility, "floating" mobility, or
"undefined" mobility.  Fixed mobility means that the component's
position CANNOT be affected by connections in which it participates;
floating mobility means that the connections CAN affect its position.
Undefined mobility implies that the component doesn't care about
connections.  (Connections only make sense for connectors, but a
composite component containing connectors may define a mobility that
is somehow dependent on---or completely independent of---its
connectors'.)

The ConnectTool affects the mobility of the source---it sets its
mobility to floating.  The ConnectTool does not affect the mobility of
the target.  Connectors generally have fixed mobility when you create
them.  Thus after you click on the source pin with the ConnectTool and
drag to the target, the source's mobility is floating while the
target's remains fixed---and the source moves to satisfy the
connectivity semantics.

(This and other aspects of connector semantics are described in the
most detail in my thesis, which you can order from
<schulman@shasta.stanford.edu> for a nominal charge.  Ask for
technical report CSL-TR-90-427.)

--
John Vlissides / IBM T.J. Watson Research / vlis@watson.ibm.com
Technical Details
Message-ID: <9208211409.AA06084@aurora.watson.ibm.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!WATSON.IBM.COM!vlis

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!WATSON.IBM.COM!vlis
From: vlis@WATSON.IBM.COM (John Vlissides)
Subject: Re: Unidraw Connections
Message-ID: <9208211409.AA06084@aurora.watson.ibm.com>
Sender: news@shelby.stanford.edu (USENET News System)
Reply-To: vlis@watson.ibm.com
Organization: Internet-USENET Gateway at Stanford University
Date: Fri, 21 Aug 1992 14:09:44 GMT
Lines: 46