Re: How to make a new "goodie"?

Mats Bergstrom (mb@talws10.nbi.dk)
Fri, 22 Nov 1996 10:21:22 GMT

To subscribers of the xforms list from mb@talws10.nbi.dk (Mats Bergstrom) :

>> 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.
Very messy indeed, the big problem is that there is no way (judging
from my version of `forms.h') to traverse the forms used by an
application to build the table.

> 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
Well, I think that any grab (in the manner you mention) is totally
unusable as (as you also say) its antisocial.

Would it be too much to ask for a version of `fl_do_forms()' that
manages a set of forms only:
FL_OBJECT* fl_do_xxx_forms(FL_FORM* form_array[], int arrray_length);

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