chickenpox: dia in LWN (again)



Hi folks, hopefully $SUBJECT won't trigger or poison bayesian filters.

I just noticed this great article http://lwn.net/Articles/75198/, which
obviously uses dia for its schemas (OK, I know Jonathan Corbet is using
dia; keep up the awesome work, Jon!).

Anyway, I'd like to bring back something which has been discussed in the
past, but was never actually implemented, and which is starting to
itch me enough that I might be willing to give it a shot soon.

Look at the filled-circle end of the brown arrows. Notice how they are
unaligned? Yes, we're lacking connection points in most of our objects.
Well, not always, sometimes we have too many of them, but here's my point:
we frequently end up in a scenario where we don't have an adequate number or
placement of connection points.

Enter "chickenpox-mode", the thing I'd like to implement. In a nutshell,
this would be the ability to dynamically create connection points anywhere
within an object (or shape -- anything here would apply to the base
classe(s)) instance when one finds the existing CP's are inadequate, and
later delete them (when they're no longer useful).

I think from the UI point of view, it needs to be close to the "snap to
grid" switch; except that it should be a three-way switch:
        1. No dynamic CP creation (current behaviour, default)
        2. Add CP on edges (this, in effect, would snap on the intersection
of the snap grid and any lines (straight or otherwise) from the object: drop
a connector end on an object's line, and it will add a dynamic CP to that
object and bind the connector; the exact placement of the object will be
guaranteed to be on an edge, and if the snap grid is applicable, on the snap
grid as well)
        3. Add CP on body: anywhere within the object's shape or edge (*NOT*
bounding box -- if we're talking about an ellipse, only the fillable area
applies), and subject to "snap to grid".

        (add CP on body would be, of course, synonymous to add CP on edges
for "matchstick-like" objects).

Once a dynamic CP has been created, it is unmovable, and keeps its relative
position when the object is resized (the grid applies only during the
initial CP creation). dynamic CPs will have to be deletable (probably some
"CP eraser" tool, which you'd use to point and click at each unwanted CP,
and the default, old-style CPs will need to become invisible (this way, we
can conceal the UI inconsistency between old-style CP and new-style) (it may
be that once created, a dynamic CP exists forever and can just be concealed,
I wonder if it's a big deal from the memory point of view, if that brings
about a real implementation simplification).
A menu entry "remove all unused connection points" (which will actually hide
unused old-style CPs) will complete the design.

Finally, to ease the transition, ConnPoint_Line will become effectively
dead-wood code, as I don't see who would want to use this style of dynamic
CP addition-removal anymore, but I'm afraid we won't be able to get rid of
all of it: we need to support reloading older diagrams, and I guess the
easiest way to do this is to dispose of the middle-click menu entries and
support routines (actual "dynamic addition/removal"), while keeping the
load/save capabilities.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]