Re: GDK_POINTER_MOTION_HINT_MASK has no effect

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

 



On Nov 28, 2007 4:27 AM, Stewart Weiss <stewart.weiss@xxxxxxx> wrote:
> Aha!  I did not know that I could configure the GC to draw using
> various functions of the source and dest pixels values. Thanks !

I posted a mail about rubberbanding a couple of months ago:

http://mail.gnome.org/archives/gtk-app-devel-list/2007-October/msg00007.html

Might be helpful. In my opinion, you should structure your program like this:

- appstate should have a flag for "displaying rubberband line", plus
start/end points
- in your expose handler, first draw the background for the exposed
area, then draw the rubberband liine on top
- in your button-press handler, set the rubber band flag and note the
start position
- in mouse-motion, if rubberband is set and this is a button drag
event, queue a draw for the old position of the rubber band line,
update appstate with the new position, and queue a draw there too
- in button-release, unset the rubber flag and queue a draw for the
position of the line

John
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux