XForms: Mouse clicks (newbe)

Sander Stoks (sanders@sci.kun.nl)
Thu, 25 Sep 1997 13:57:14 +0200

To subscribers of the xforms list from Sander Stoks <sanders@sci.kun.nl> :


I'm new to this list so excuse me if this is a FAQ. I tried to find
the answer on the xforms-archive, but couldn't.

For my graduation project, I am writing an app to do image processing.
I have an fl_canvas in there to show the image, bordered with sliders
to act as scrollbars. Everything works OK. But I'd like to be able
to click on that image and get the coordinates returned.

I tried adding fl_set_object_callback (canvas, canvas_callback, 0);
but the canvas_callback is never called. In the documentation there
is mention of mouse events, but if I understand correctly these are
only for non-xforms windows. I also tried to alter my main loop into:

while (!ready)
obj = fl_check_forms ();
printf ("Here\n");
if (obj == FL_EVENT)
printf ("There\n");

as a simple test. I got a continuous stream of "Here" printed on my
terminal, but it never got "There".

I am using version 0.81 on a Linux box.

Any hints would be appreciated a lot.

Sander Stoks
/* sanders@sci.kun.nl */ main(){char*c="2$$,$$2CD$45$$,$$5(D$4%$$,$$%(D$4%J\
int _=0,__,K;for(;_<10;_++){for(__=0;__<11;__++)for(K=0;K<6;)putchar(c[11*_+\
__]-36&1<<K++&&__*6+K<65?'#':' ');putchar(10);}} /* Dual603e-133 BeBox */
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/