Re: XForms: Now problems with colors

Steve Lamont (spl@szechuan.ucsd.edu)
Thu, 22 Jan 98 06:02:21 PST

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

> Well, the thing is that FL_BLUE, for example, sometimes is not what it
> should be, I experienced this in fl_line, don't know if it also happens on
> other :-? ...

This clearly shouldn't happen. Can you provide a small piece of
example code which exhibits this behavior?

> Another thing I'd like to know (as you can see I'm just starting in X and
> in Xforms) is how can I know if the aplication is deiconified to draw
> again those lines I had drawn and that went away becouse of the user
> iconifying the window?

When the Window is deiconified, an Expose event should be generated by
X which should, in turn, generate an FL_DRAW event to all objects,
telling them to redraw themselves.

How are you using fl_line(), etc? Are you drawing with a Free object,
a Canvas object, or have you created your own object class?

In the case of a Free object or your own object class, you should be
getting the FL_DRAW event automatically.

In Canvas objects, it is a little more complicated, since XForms
doesn't propagate FL_DRAW events. You should set up your own Expose
XEvent handler to do whatever redrawing is needed to update your
display. The mechanics of this are a little more complicated than I
can go into here but you should read the Canvas chapter carefully and
probably consult some Xlib references as well (I always recommend the
O'Reilly and Associates volumes -- they are the most lucidly written
of all the manuals I've used).

> PS: I have managed to "bypass" the problem with the scroller by freeing
> the form and creating it again.

This is definitely the *wrong* answer. If I may be a bit direct, if
you have to resort to this kind of kluge, there is something very
wrong with your program design. Can you provide a piece of self
contained example code which exhibits the behavior of which you
complained earlier? It might help in diagnosing what's wrong.

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