Re: How to make a new "goodie"?

Steve Lamont (spl@szechuan.ucsd.edu)
Thu, 21 Nov 96 12:37:55 PST

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

> What is the simplest way to make a new `goodie'?
> E.g. create a function that pops up a new form and returs at some
> point.

You should be able to create the goodie with fdesign in pretty much
the standard manner.

> /* Forms active Forms inactive */
> ...bla bla bla... /* A B */
> i = my_goodie(); /* my_goodie_form A,B */
> ... bla bla bla.. /* A B */
>
> This is simple by using `fl_deactivate_all_form()' and
> `fl_activate_all_forms()' and works if all forms before the entry of
> `my_goodie()' are active.
>
> Is there a simple solution, or do I have to create a list of the
> active forms inside `my_goodie()' (by looking at FL_FORM.deactivated)?

That's probably the best way to do it, although it involves some
slightly messy bookkeeping.

The other way to do it, if you're not concerned with interacting with
any *other* windows while your goodie is popped, would be to do a
GrabModeAsync on the pointer with XGrabPointer() for the goodie's form
Window. This will effectively direct all input from the pointer to
the goodie.

I'm not sure, offhand, whether you also need to grab the keyboard
(XGrabKeyboard())

You could also grab the entire server with XGrabServer() but that's
kind of antisocial.

spl

To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html