drag and drop graphics-pane nodes and tree-view nodes
I'm trying to build a drag-and-drop application using capi:graph-pane and capi:tree-view. So far I can't find any sample code showing how to drag-and-drop nodes of these panes, so I've resorted to a workaround of selecting nodes to copy source nodes and double-clicking target nodes to paste what's copied. Of course this is much less easy to explain and less natural than drag-and-drop, plus it uses up the double-click gesture that I'd like to use for better things like making a node 'execute' or editing a node's name. Does anybody have some example code to enable a really simple drag-and-drop for capi:graph-pane and capi:tree-view? It's good enough to just draw a rectangle outline of inverted-pixels sized to the objected dragged while dragging, and generating a call-back to a function with args of dragged-node, dragged-onto-node. (Inverting pixels to outline a dragged object may save the effort of actually drawing the dragged object on the screen) This is the approach Macintosh Common Lisp (MCL) took with their simple GUI interface builder; it was only a few pages of code in MCL and produced a highly robust, intuitive interface builder. -- Lawrence