Hello,
I have commited the connector context to CVS. At the moment it can be used to create basic straight-line connectors and interact with and modify existing connectors, i.e., reroute, detach, or attach to new shapes. At the moment connectors can just be attached to the center of shapes (though user placeable connection points are something I will work on later). This interface works works with loading and saving files, undo and redo, etc.
Click and drag anywhere to create a connector. If you start or finish over a highlighted connection point, then the connector will be attached to that shape. Dragging the endpoint of any existing connector will alter its endpoint, and attach to a shape if dropped on a connection point.
It is usable, but there are some issues. Partly this is because I originally chose to build it on top of the DrawContext and having that underneath is now preventing the exact interaction I want. I've done most of the work of removing this dependency but will finish it later. The current interaction doesn't use the standard selection mechanism. One of the choices I made was that I didn't want the user to have to select a shape to show its connection point, select another for the same reason, and then have to click or drag between the two shapes to draw the actual connector. For this reason the connection points for shapes are shown when the mouse is moved over them. Play with this for a while and I think you'll find it quite natural.
At the moment though, due to the draw context stuff, the same behaviour is true for the actual connectors -- they are 'selected' by moving the mouse over them. This is bad since the connector focus jumps around as you move your mouse over different connectors. The true selection mechanism is ignored and the selection cleared when the context is entered. Also bad.
The planned solution is to use the standard selection mechanism and show endpoints for the first selected connector, much like the node tool. This means the same selection will be maintained swapping into and out of the connector context. Also, if you've just drawn a connector and want to change its stroke style, another connector isn't going to be selected on your way to the dialog, as Peter pointed out to me today. The mouseover displays connection point behaviour will be kept for shapes but will be completely independant of the selection.
Anyway, I thought it important to commit this now, even though I'd love to perfect the interface a little more before showing it off. It's already suffered a fair amount of slippage due to many little unforeseen issues, and my complete ignorance for the complexity of the Inkscape internals. :-) Plus, I feel its important to focus on the integration of the autorouting code, the other main 'goal' of my Summer of Code application.
Comments and bug reports welcome!
(The src/connector-context.cpp file contains my rough todo list, e.g., I've done some work towards drawing connectors to object edges rather than bounding boxes, but this isn't there yet.)
Cheers, Michael