Re: Reading mouse input from an x11 graphics window

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 9 Nov 2005 17:51:09 -0700 (MST)

Hi Ray,

I'm sorry we haven't responded to this sooner. We discussed this question
informally at lunch yesterday, and don't have any current way to
do something like this in PyNGL.

We do have a C/HLU library example (the HLU library is something that
PyNGL is built on top of) in which you can click on the X11 window,
and it returns the data coordinates. This is "ng4ex" example "xy13c"
for those of you that might have the HLUs installed on your system.

It requires the X11 "Xm" library in order to compile.

Does anybody know of some Python/X11 modules? It might be possible to
convert this example to PyNGL and use similar X11 calls as in the
xy13c.c example.


On Mon, 7 Nov 2005, Raymond P. wrote:

> This may be too much to hope for, but here goes....
> For some courseware I'm writing, I'd like to write a script that can read the
> coordinates of a mouse click on a PyNGL x11 window, and use that
> to initialize an equation for further plotting on the window. I know how to
> do this sort of thing in tkinter, but I wonder if NGL has some facility for
> doing this, or if perhaps somebody knows some hack for getting
> the screen coordinates using tkinter calls and translating to the NGL
> graphics space. It would be a handy sort of thing to be able to do for
> all sorts of interactive graphics applications.
> Thanks,
> Ray
> _______________________________________________
> pyngl-talk mailing list
pyngl-talk mailing list
Received on Wed Nov 09 2005 - 17:51:09 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 19 2006 - 21:31:54 MST