Re: expose event & pixmap question



Ron

Thanks for the reply.  It seems that NOTHING should be
done in configure event handler.  I'm wondering why
even bind it to ANY function!?!?!?

This is why I'm confused by suggestion to add
gdk_draw_pixmap to configure event handler.  Do you
mean (or is it OK) to do drawing in expose event
and add gdk_draw_pixmap *there*???

This would mean I could call this expose event handler
*even when there is no expose event* to do some drawing
right???

Is it true that gdk_draw_pixmap is one of the functions
that gets called "behind the scenes" when there is an
expose event and that that is why event_handler doesn't
always need to call gdk_draw_pixmap?

Thanks again,

Chris

On Tue, Mar 12, 2002 at 11:56:45AM -0800, rsteinke w-link net wrote:
> From: Christian Seberino <seberino spawar navy mil>
> >
> > Paul
> >
> > It is slowly becoming clearer thanks to you. We can draw
> > on a pixmap which is associated with a window which
> > is part of a drawing area.
> >
> > Configure/Expose events that *just* modify pixmaps work
> > great.  I assume at the end of one of those callbacks
> > that some hidden routine says, "OK, now we need
> > to DISPLAY this pixmap on the window" and does it???
> >
> > The reason I am asking is that I made one of these callbacks
> > be called at other times when a configure/expose event
> > was NOT fired -- with gtk_idle_add.  Drawing on a pixmap
> > does NOT automagically change what is seen on GUI right???
> > How can I make these changes appear then (outside of a
> > configure/expose event)??
> 
> Connect to the configure event of the widget, and in the event
> handler do gdk_draw_pixmap() (gdk_draw_drawable() in 2.0) to
> blit the pixmap to the window. That's what the expose event is for.
> 
> Ron Steinke

-- 
=======================================================
| Dr. Christian Seberino  || (619) 553-7940  (office) |
| SPAWARSYSCEN 2363       || (619) 553-2836  (fax)    |
| 53560 HULL ST           ||                          |
| SAN DIEGO CA 92152-5001 || seberino spawar navy mil |
=======================================================



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]