Re: Equivalent to gtk_drag_get_source_widget()?



> > in fact, for the TreeView, you can *only* drag to yourself given the
> > default configuration of a treeview. i posted here recently about tricky
> > ways to workaround this.
> 
> That is not right.  Or at least, only right if you are talking about the 
> high-level Gtk::TreeView drag and drop API.  If you go to the low level GDK + 
> GTK+ + GtkWidget (gdkmm + Gtk::Widget) drag and drop functions you can drag 
> and drop between any GTK+ widgets, including between different TreeViews (and 
> indeed between GTK+ widgets and non-GTK+ widgets which use the Xdnd or Motif 
> protocols).

the treeview defines itself as a drag source only for "same widget" DnD.
if you do not take several complex steps to alter this, you cannot drag
out of the treeview. that's mostly because the only target the treeview
accepts/sends by default is a string representation of the path within
an unnamed treemodel. its so unutterably braindead as to be
unbearable :)

fortunately, you can hack around it, although it took me the better part
of a day to work out all the wrinkles.

the examples in the docs (GTK + gtkmm) only cover extending the targets
the treeview can accept as a drop destination, not extending the targets
it can generate as the drag source.

--p






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