Gtk/Perl Drag-n-Drop



Ok, I am trying to write a Gtk Perl based app that uses Drag-n-Drop for a few things.
At this point all dnd will be internal to the application.  I want to drag items from a CList,
onto a CTree.  I want to then have a routine that knows what rows on the CList where selected,
and what row on the CTree they where dropped on.  I also want to duplicate the functionality
of Gtk::CTree->set_reorderable('1'); on the CTree, except I need to be able to do some of
my own processing once the CTree has been re-ordered.  Can I use set_reorderable() and
just attach a signal_connect() to the CTree to handle my custom code... If so, what signals are
emited by the various DnD methods of set_reorderable()

I have never done DnD before, and although I have read through the source for dndtest.c
in the gtk source, I am very much at a loss as to how to proceed.  For one thing, it looks
like there are only three DnD methods available under Perl::Gtk, these being dnd_data_set(),
dnd_drag_set(), and dnd_drop_set() .. What do I set for SV * type_name on the latter
two functions?  What event's do I set to dnd_data_set() ?

I would love to look at example source code, but the dnd example for test.pl (from the CVS
gnome-perl) is non-existing (the item is commented / greyed out.)

Anyway, any help implimenting DnD under Perl/Gtk would be greatly appreciated.

-Steven Kordik



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