On 5/19/05, rpgoldman@real-time.com rpgoldman@real-time.com wrote:
If one wanted to draw curvy lines in McCLIM, is there any way of doing this? I had assumed, foolish me, that this could be done using Bezier curves, but now I see that those were an Allegro extension to the standard, and not part of CLIM 2.0....
Lacking any better ideas, I'd break the curves down into line segments and draw them as such.
Also, has anyone been thinking about the possibility of dynamic graphs? I.e., graphs where one might want to enter leaves? Or the possibility of having a fixed graph where a user might move the nodes around to make the graph more readable. CLIM doesn't have any sort of "smart link" object that would support this, does it?
I don't have any thoughts on dynamic graphs, but 'adjustable' graphs are a fine idea. I've been interested in such a thing for a while now, but lacked any real immediate need for it. Now that someone else has mentioned it, I've been inspired to take a little time to bash out an implementation.
I started with Tim Moore's dragndrop example, extending the basic ide aby implementing draggable presentations via a new draggable-presentation and a command and translator to invoke the dragging. Adding :record-type 'draggable-presentation in calls to clim:present makes presentaitons draggable. This allowed me to drag presentations within graph nodes around, but with no knowledge of the graph edges. Clearly some work on the graph formatter is need. (this code is attached as draggable-presentations.lisp)
To remedy this, I've attached an experimental patch which refactors graph edge layout and incorporates the needed bookkeeping to associate a graph node with its edges. This allowed my second attempt, also attached, to drag graph nodes around, updating the edges correctly.
Perhaps this is of some interest.