Re: Enable drag and drop for treeview?



On Thu, 2007-05-03 at 20:42 +0100, Chris Vine wrote:

> Except in the simplest usage, I use the basic gtk/gtkwidget drag and
> drop stuff.  It is in my experience pretty easy to use once you get the
> hang of it, and it can do more or less anything.  I notice that Paul
> "Audio" Davis managed to get cross-TreeView row drag and drop to work
> using the high level interface.  I gave up trying to do that (probably
> because I am more of a quitter than he is), and I adopt the more
> straightforward approach of using the low level gtk+ drag and drop
> interface and recreating the relevant row in the receiving widget from
> the data transferred.  [ ... ]

the problem with that approach is that it means that the drag
destination has to understand the data structure of the drag source. by
contrast, my derived stuff pulls the data out of the source before
offering it to the destination. much like the way X and low-level GTK
DnD works, actually.

> When all is said and done, dragging between different widgets is not
> always meaningful.  The receiving widget may or may not be designed to
> receive and interpret the data that is being dragged onto it.  That is a
> problem that has to be solved whatever approach is adopted.

thats why my derived DnDTreeView's extra signal tells you, as a string,
what type of object the drop consists of. if you can't handle it, you
just do nothing.

--p






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