Re: GDK_POINTER_MOTION_HINT_MASK has no effect
- From: jcupitt gmail com
- To: stewart weiss acm org
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: GDK_POINTER_MOTION_HINT_MASK has no effect
- Date: Wed, 28 Nov 2007 08:53:11 +0000
On Nov 28, 2007 4:27 AM, Stewart Weiss <stewart weiss acm org> 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]