Re: Enable drag and drop for treeview?
- From: Chris Vine <chris cvine freeserve co uk>
- To: paul linuxaudiosystems com
- Cc: Jef Driesen <jefdriesen hotmail com>, gtkmm-list gnome org
- Subject: Re: Enable drag and drop for treeview?
- Date: Sat, 05 May 2007 01:12:00 +0100
On Thu, 2007-05-03 at 21:05 -0400, Paul Davis wrote:
> 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.
>
> .....
>
> 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.
I don't really understand what you mean, because the "much like the
low-level DnD works" is the approach I mentioned, and is pretty well the
standard way of doing it; and the destination always has to understand
what is being passed to it by the drag source, you always have to "pull
the data out of the source", and the standard way of determining at the
destination whether the source data is meaningful is by a key of some
kind (in your case, a string).
Anyway, I am glad you have got the high level interface to work across
widgets.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]