Quicky module to make handling of object drag-and-drop more like having the source window send a richly-configured event to the target window.
Details:
The module defines a PyCommandEvent sub-class which provides information about the drag-and-drop operation. The event is partially configured by the drop source, passed through the drag-and-drop system as a key into a global store, then is finalised and passed to the target window as an event in the pending events queue.
Mix-in classes are provided for both source and target windows, making it very easy to get basic functionality with a few simple calls and an event mapping.
The implementation is fairly straightforward and simple (naive), but it does make the process of creating drag-and-drop systems which trade Python objects fairly easy. Consider it a proof-of-concept or neat idea, rather than a professional-quality utility module. There's lots of things left to do, but I thought others might want to play with it even in its primitive state.
Available at:
http://members.rogers.com/mcfletch/programming/objectdnd.py
Enjoy all,
Mike
···
_______________________________________
Mike C. Fletcher
http://members.rogers.com/mcfletch/