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

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.

>From an implementation point of view, I think I'll use a custom renderer to
ask objects where their edges and bodies are; this way all existing and
future objects should be able to take advantage of this in a reasonably
generic way (I think).

Back to the LWN article, and in particular the "Page table" box. Here's how
I think Jon could have done, had chickenpox-mode been implemented then:
	1. draw the "page" boxes and the "page table" box
	2. create the first brown line, set attributes
	3. copy & paste twice 
	4. enable "add CP on body", "snap to grid", and move the filled
circle ends of the brown lines to nicely aligned places somewhat within the
page table box
	5. disable "add CP on body" mode, carry on the rest of the diagram
(unless, of course, the filled triangle ends of the brown lines are still
currently loose; in that case I guess adding a CP at the desired spot on the
edge of the first "page" box plus some cut&paste job would be required).


Now, the questions:
	1. Does this make any sense from a user interface and user
expectation point of view?  Does this solve a real problem, and does it
appear to solve it in a desirable way?
	2. From the few implementation details I gave, does this sound
reasonable?
	3. Lars, do you feel this is the right time frame for me to commit
stuff if I get something running (or at least, non-dangerous intermediary
patches), or do you prefer that I stick to either a branch or a floating
patch for the moment? (I'm concerned with the release schedule you have in
mind).

	-- Cyrille

-- 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK