Re: XForms: drawing on my canvas with the mouse

Trent Piepho (xyzzy@u.washington.edu)
Tue, 17 Feb 1998 17:20:16 -0800 (PST)

# To subscribers of the xforms list from Trent Piepho <xyzzy@u.washington.edu> :

On Tue, 17 Feb 1998, AMIT BHATNAGAR wrote:
> # To subscribers of the xforms list from AMIT BHATNAGAR <amit@cs.dal.ca> :
> Now.. I have (so far) 2 notify handlers.. a button press handler which
> will execute my line/circle/polygon algos with the proper x & y values
> necessary.
>

If you only want to pointer motion while a button is being help down, you can
use ButtonMotionMask when you select which events you want to receive. If you
use PointerMotionMask then you get pointer motion events all the time and it's
somewhat inefficient.

> My second is a motion notify handler.. and what I would like to do is
> this: Print out the current position of the mouse somewhere on my form
> itself.. not to stdout, (and not to the canvas either). I can accomplish
> this by printing to stdout.. but I'd rather print to the program window. I
> can't seem to get fl_draw_text to work..

Why not make a text object where you want to position, and then use
fl_set_object_label to change the text to the position?

|Gazing up to the breeze of the heavens \ on a quest, meaning, reason |
|came to be, how it begun \ all alone in the family of the sun |
|curiosity teasing everyone \ on our home, third stone from the sun. |
|Trent Piepho (xyzzy@u.washington.edu) -- Metallica |

_________________________________________________
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://bloch.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/