Re: (no subject)



It seems the DrawingArea does not get the mouse
motion events by default so the first step is:

$draw->set_events(['pointer-motion-mask', 'pointer-motion-hint-mask']);


Then seup up the callback for these pointer
movements:

$draw->signal_connect('motion_notify_event' => \&draw_motion_cb);


In the callback the event data has the cursor
position, etc.

In order for this to work for me I had to put
$widget->get_pointer() in the callback or the
mouse events would be few and far between.  I
am not sure why or what this does exactly ...


Hope this helps,
-Carl Edwards


Delivered-To: gtk-perl-list gnome org
From: "Nguyen Tran Quoc Vinh" <ntquocvinh yahoo com>
To: <gtk-perl-list gnome org>
MIME-Version: 1.0
X-Security: MIME headers sanitized on mx1.vitesse.com See 
http://www.impsec.org/email-tools/sanitizer-intro.html for details. $Revision: 
1.133 $Date: 2002-01-05 17:09:21-08 
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: (no subject)
X-BeenThere: gtk-perl-list gnome org
X-Loop: gtk-perl-list gnome org
X-Mailman-Version: 2.0.8
List-Help: <mailto:gtk-perl-list-request gnome org?subject=help>
List-Post: <mailto:gtk-perl-list gnome org>
List-Subscribe: <http://mail.gnome.org/mailman/listinfo/gtk-perl-list>, 
<mailto:gtk-perl-list-request gnome org?subject=subscribe>
List-Id: Using GTK+ with Perl <gtk-perl-list.gnome.org>
List-Unsubscribe: <http://mail.gnome.org/mailman/listinfo/gtk-perl-list>, 
<mailto:gtk-perl-list-request gnome org?subject=unsubscribe>
List-Archive: <http://mail.gnome.org/archives/gtk-perl-list/>
Date: Wed, 3 Apr 2002 08:02:22 -0800
X-DCC-vtss-Metrics: mx1.vitesse.com 1018; Body=1 Fuz1=1

I don't know how to get the coordinates of the mouse point on the DrawingArea. 
I have galde, glade-perl, gtk-perl on the Slackware 7.0. Please tell what can i 
read in this case or how to get the tutorial for DrawingArea.

 Thank you very much.
           Nguyen Tran Quoc Vinh


 Design Automation



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