Re: How not to start a drag process.



Dominik Smogor <duce math put poznan pl> writes:
> I'm just wondering ...
> Is it possible to have additional conditions on whether to start DND
> process in GTK+? I mean that I only know how to make a windowed widget a
> permanent drag source, but what I'd like to do is to allow it start DND
> (drag) depending on ,say, actual cursor position (making some kind of
> in-widget sites user can drag from).
> 
> By the way. Are there any docs/info on Gtk+ DND. URL's I found in list
> archives seems to be not existant and api docs on developer.gnome.org are
> partially empty. 
> 

The DND API has a couple of layers, on one layer you do everything
yourself and on the other layer you say something high-level like
"this widget is a drag source" and GTK does it for you.

So basically you want to call gtk_drag_begin() yourself in say a
button press event, instead of using gtk_drag_source_set(), IIRC.
The new text widget in the devel tree has an example (gtktextview.c).

Havoc




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