Re: Dragging multiple objects from a TreeView
- From: "Freddie Unpenstein" <fredderic excite com>
- To: chris cvine freeserve co uk, gtk-app-devel-list gnome org
- Subject: Re: Dragging multiple objects from a TreeView
- Date: Mon, 23 Oct 2006 06:49:52 -0400 (EDT)
Someone said some stuff...
GTK+ does not work like, say, KDE or windows. You have to drag
when you have finished your multiple selection without clicking
again (keep your finger on the mouse button). If you click again,
as you say your multiple selection will have gone.
Does GtkTreeView also have an issue with double-clicks?
I'm getting the distinct feeling that GTK needs a general solution to multi-clicking.
An algorithm I've often used, is to count the number of clicks, resetting a 250ms timeout each time. When
the timeout finally fires, I negate the result if the mouse button is still held. I've implemented it myself
with a convenience function that mimics g_signal_connect and friends, taking your function (obviously with
its own arguments) and data, and binding them via a buffering function. It does have some issues, though; I
should probably add a grab during the timeout and be sensitive to mouse movement away from the initial click.
It DOES reset if you swap buttons, or drift over to another widget also using the click handler, but
triggers both if your clicks drift onto another widget that doesn't use it). The best feature of all,
though, is that it filters out all those excess single-click messages (and eats up excess clicks once it does
a reset). But it basically works very well... Though you do need to pass the button number seperately,
which is a slight bit of a
pain.
If built into GTK from the ground up, widgets would simply have to listen to the synthetic click event, and
leave the raw ones for special cases. Applications could then grab double clicks and whatever else, with
absolutely no impact on the widgets default functionality. (I am hoping, of course, that there isn't already
a standard way to do all this... ;) )
Fredderic
_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]