From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,be6e28f854440947 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!t20g2000yqa.googlegroups.com!not-for-mail From: tolkamp Newsgroups: comp.lang.ada Subject: Re: How to get the mouse position with JEWL? Date: Wed, 20 Oct 2010 10:20:53 -0700 (PDT) Organization: http://groups.google.com Message-ID: <057188e8-a7c9-4aeb-968c-ccdf720bd0fc@t20g2000yqa.googlegroups.com> References: NNTP-Posting-Host: 62.163.210.190 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1287595253 7127 127.0.0.1 (20 Oct 2010 17:20:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 20 Oct 2010 17:20:53 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: t20g2000yqa.googlegroups.com; posting-host=62.163.210.190; posting-account=nZAcngoAAACcfYM9wDw3w9Z1XR3bObfs User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.1; .NET4.0C),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:15601 Date: 2010-10-20T10:20:53-07:00 List-Id: On 20 okt, 13:42, Manuel Collado wrote: > El 20/10/2010 11:04, tolkamp escribi=F3: > > > I use JEWL in several of my applications. > > Now I try to get the mouse position within a JEWL canvas by using the > > function "End_Point(Canavas)". > > The resulting mouse position (x,y) is always zero. What is going wrong? > > Please try: > > =A0 point :=3D Start_Point( canvas ); > > It works for me. > > -- > Manuel Collado -http://lml.ls.fi.upm.es/~mcollado Also when I try: point :=3D Start_Point( canvas ); the x and y position remains zero. Here is the code: task body Task_2Hz is My_Frame : Frame_Type; My_Canvas : Canvas_Type; My_Mouse_Position : Point_Type; begin accept Start do My_Frame :=3D Frame (1200, 500, "", 0); My_Canvas :=3D Canvas (Frame, (850,10), 300, 300); loop My_Mouse_Position :=3D Start_Point(My_Canvas); Put("Mouse-x =3D "); Int_Io.Put(My_Mouse_Position.x); New_Line; Put("Mouse-y =3D "); Int_Io.Put(My_Mouse_Position.y); New_Line; delay 0.5; end loop; end Task_2Hz;