XForms: XForms - problem with display of user defined objects

Richard Kent (rk@quadstone.com)
Mon, 22 Dec 1997 10:14:46 +0000

To subscribers of the xforms list from Richard Kent <rk@quadstone.com> :

Hi all,

For a long while now I have been working around a couple of problems with
user-defined objects within xforms and was wondering whether anyone else had
experienced such problems. I have a user defined xforms object and within the
FL_DRAW section in the handler :-

* If I set the attributes of any other xforms object within the FL_DRAW bit (eg
set a slider value) then this other object gets drawn over my current object
(rather than where it is supposed to be). My current work around is to
temporarily switch on clipping when setting these attributes :-

case FL_DRAW :
....
fl_set_clipping (0,0,0,0);
fl_set_slider_value (mainForm->scrollSlider,0.5);
fl_unset_clipping ();
....

which stops the slider being redrawn incorrectly and mucking things up. Not very
efficient though because I then need to manually redraw the slider later after
the handler has finished.

* If I try to redraw an object on a different form then the drawing "focus"
switches to that other form and any further draw commands go to the wrong form.
For example, for an object which is on the mainForm form :-

case FL_DRAW:
....
fl_set_slider_value (mainForm->scrollSlider,0.5);
fl_set_slider_value (zoomForm->scrollSlider,0.5);
fl_line (0,0,100,0,FL_BLACK);
....

This makes the line command draw to the zoomForm - not the current object on
mainForm. My current work around is to always "finish" on a call for the current
form (ie in the example above I change the order of the calls to
fl_set_slider_value).

I can work around both problems OK but is it possible to correct these seemingly
strange behaviours within the xforms library (or are the implications of being
able to redraw other objects from within user defined objects too complex ?).

Cheers,

TicH

-------------------------------------------------------------------------------
Name - Richard Kent (Tich)
EMail (work) - rk@quadstone.com
EMail (home) - richardk@cee.hw.ac.uk
WWW - http://www.cee.hw.ac.uk/~richardk
-------------------------------------------------------------------------------
_________________________________________________
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://bloch.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/