Re: XForms: drawing on my canvas with the mouse

AMIT BHATNAGAR (amit@cs.dal.ca)
Fri, 13 Feb 1998 13:28:32 -0400 (AST)

# To subscribers of the xforms list from AMIT BHATNAGAR <amit@cs.dal.ca> :

Thanks Steve for yur response, but a few more questions...

> If you're using a Canvas, you will need to register a ButtonPress and
> ButtonRelease handler and probably a MotionNotify handler as well:
>
> fl_add_canvas_handler( canvas, ButtonPress,
> button_event_handler, NULL );
> fl_add_canvas_handler( canvas, ButtonRelease,
> button_event_handler, NULL );
>
> [...]
>
> fl_add_canvas_handler( canvas, MotionNotify,
> motion_event_handler, NULL );
>
> fl_remove_selected_xevent( FL_ObjWin( canvas ), PointerMotionHintMask );

would I make these function calls before I fl_do_forms()? Or just in the
callback where I need canvas interaction?

ButtonPress..., is that to determine which button will do what? Ie: left,
mid, right (for 1,2,3 respectively?)

I have no experience in those handlers.. any demo programs with similar
handlers?

_________________________________________________
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/