XForms: more glforms to xforms

Thomas Kroc (kroc@fnal.gov)
Thu, 27 Aug 1998 09:01:16 -0500 (CDT)

# To subscribers of the xforms list from Thomas Kroc <kroc@fnal.gov> :

I've been in a short conversation with another member of the mailing list
and it seems like he has questions similar to mine. In January,I started
with a question about converting glforms to xforms in the forms designer
which the mailing list solved.
I haven't gotten around to completing the conversion but since
there is now another with the same question I guess it's time to press on.

In section 4.3 of both the glforms manual and the xforms manual it reads:

glforms:
>So the basis of a program with its own windows would look as follows:
>
> /* define the forms */
> /* open your own window(s) */
> /* display the forms */
> while (! ready)
> {
> obj = fl_check_forms(); /* or fl_do_forms() */
> if (obj == FL_EVENT)
> {
> dev = fl_qread(&val);
> /* handle the event */
> }
> else if (obj != NULL)
> /* handle the change in obj */
> /* update other things */
> }

xform:
>So the basis of a program with its own windows would look as follows:
>
> /* define the forms */
> /* display the forms */
> /* open your own window(s) */
> while (! ready)
> {
> obj = fl_do_forms(); /* or fl_check_forms() */
> if (obj == FL_EVENT)
> {
> fl_XNextEvent(&xevent);
> switch(xevent.type)
> {
> /* handle the event */
> }
> }
> else if (obj != NULL)
> /* handle the change in obj */
> /* update other things */
> }

I inherited the program from someone else and am not myself very savvy
in event handling and at this point know know nothing about X. To this point
I have been using the manual and exploiting parallels between the two libraries.
I think that converting the event handling is my final step. However,
my guesses at converting the "dev = fl_qread(&val); /* handle the event */" to
"fl_XNextEvent(&xevent); switch(xevent.type) /* handle the event */" have
not been succesful.

So my question is this: Is there a simple parallel between gl(sgi) event
handling and X event handling that I am missing and can fix with a simple
substitution or do I need to scrounge up the X manuals and start reading.
If the later, pointers to pertinent sections would be appreciated as I
understand the manual is 11 volumes(?).

Thanks,

Tom Kroc
Fermilab
Neutron Therapy Facility

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