Re: on_style_changed signal



On Sun, Dec 12, 2004 at 21:39:24 -0600, Rob Benton wrote:
> Paul Davis wrote:
> >>When exactly does this signal get emitted?  I'm trying to repaint my 
> >>Gtk::DrawingArea when this happens but it looks like this signal gets 
> >>emitted before the Gtk::DrawingArea is realized.
> >
> >
> >Repeat the Golden Mantra of all X Window toolkits:
> >
> >       ONLY DRAW IN SOMETHING THAT HANDLES A (real or synthetic)
> >       EXPOSE EVENT.
> >
> >If you want to draw because of something detected elsewhere in the
> >program, cause a synthetic expose event to be sent. In gtkmm, its done
> >like this:
> >
> >     widget.queue_draw ()
> >
> >--p
> >
> >       
> >
> >
> I have a Gtk::DrawingArea and a Gdk::Pixmap that share a Gdk::GC.  I 
> want to draw the new style bg color to the pixmap , then draw the pixmap 
> to the drawingarea.  But how can I make these changes before I call 
> queue_draw() ?

If the Gdk::GC is only shared by those two, and no others, you just do
the changes and they will persist. But I believe there are some Gdk::GCs
in the style, that you can use so you don't need to create your own and
set it up.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb ucw cz>

Attachment: signature.asc
Description: Digital signature



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