Re: XForms: canvas problem

Dr. T.C. Zhao (zhao@bragg.phys.uwm.edu)
Sat, 26 Jul 1997 00:35:21 -0500

To subscribers of the xforms list from "Dr. T.C. Zhao" <zhao@bragg.phys.uwm.edu> :

I do agree you have a point in that the current
API makes implementing it impossible.
(I am probably misunderstanding things,
you still can do the binding, just that you
think the API is deficient, right ?).

There are couple of things that I can do.
One is to add a void * field to the FL_PUP_ENTRY
structure so the item callback defined by
that structure has a prototypes of item_callback(int n, void *).
This means V0.88 will break V0.87. If this path
is taken, I will do an update very soon and wipe out
V0.87 completely before it becomes widely used.
Another thing that I can do is add a function
fl_get_current_pup that returns the current top-level
active pup ID, callable say from an item callback,
not quite the same as getting the menu object,
but should be a workable and less troublesome solution.
I will sit on this for a few days and think a little more.
If you have any preference/suggestions, please let me
know.

Thanks for your message. It is the kind of message
that makes the whole testing business worthwhile.

Regards, -TC
PS: whenever you'd like to have the source of xforms,
just let me know.

TC wrote
>>from lamparts@ee.uwa.edu.au (Thomas Lampart) :
>> fl_set_canvas_attributes(fdui->maincanvas, CWBackingStore,&attributes);
>If this is called before the canvas is visible, it wipes
>the default attributes (Exposure etc is gone). So
>call it after the canvas window becomes visible, which
>happens when the form is shown. In any case, this
>behavior is a bug and will be fixed.

I re-checked the documentation and code, I am not
sure this is really a bug. set_canvas_attributes
is intended to provide a means for the application
program to completely reset the default canvas attributes,
i.e., wipe whatever is set by xforms and should be
called before the canvas is visible.
I do see the value and consistency of making
set_canvas_attributes to be "change/augument canvas attributes"
instead of reset so it works as expected regardless
when (before or after the canvas is shown) it is called.
I think I will make this change.

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