Re: XForms: Screen Coordinates for a OpenGL canvas

Steve Lamont (spl@szechuan.ucsd.edu)
Fri, 20 Jun 97 21:30:28 PDT

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> I built a GUI that has a canvas for rendering OpenGL based graphics (and it
> works fine). I would like to be able to obtain the screen coordinates of a
> point (on the canvas) where the mouse button is clicked. Please let me know
> if you have any good suggestion or know any routine that would handle this
> task.

Enable the ButtonPress event (or ButtonRelease event, as you prefer)
with fl_add_canvas_handler().

Refer to the manual and a good Xlib reference (for discussion of the
ButtonPress/ButtonRelease events).

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/