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

Re: How to repaint widgets??



>>Carlos Pereira <carlos@pehoe.civil.ist.utl.pt> writes:
>>
>> Could someone explain the differences between
>> gtk_widget_draw(drawing_area, &area) and
>> gtk_widget_queue_draw(drawing_area)?
>>
>> Both seem to work fine for me, I am wondering what
>> the >queue< word means in gtk_widget_queue_draw
>>
>
>gtk_widget_draw() simply invokes the draw virtual method on the
>widget, immediately.
>
>gtk_widget_queue_draw() schedules the widget to be redrawn in an idle
>handler.
>
>The practical difference is that you can call queue_draw() several
>times and still get only one draw when you return to the event loop,
>while calling gtk_widget_draw() will draw once every time you call
>it. Also, gtk_widget_draw() is deprecated in GTK 2.0, and queue_draw()
>is not. So you want to use queue_draw() pretty much always.
>
> Havoc

Thanks!

Carlos




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