resizing problem




I need some hints or example code how to handle resizing a drawing area.

My little program shows a drawing area under a menu. Configure and expose events at the drawing area are 
signaled to functions config and expose.

When the window is resized, config uses gtk_window_get_size and draws a new pixmap, the drawing area is 
resized with gtk_widget_set_size_request, an expose event is triggered by gtk_widget_queue_draw, and expose 
redraws the screen with gdk_draw_drawable.

This is unstable, config gets in an infinite loop. I fixed this by setting a condition on the 
set_size_request. The condition is violated in the next config loop and restored in the expose function.

It works now, but there is another problem that I could not solve. Sizing does not work when the window 
bottom is dragged, the bottom corners must be dragged.

Robert Best  rwbest clix pt

My little program tablPlot and source code can be downloaded from rwbest.planetaclix.pt/tp.html

--
http://rwbest.planetaclix.pt/



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