Package: gtk

Function gtk:drawing-area-set-draw-func

Lambda List

gtk:drawing-area-set-draw-func (area func)

Arguments

area -- a gtk:drawing-area widget
func -- a gtk:drawing-area-draw-func callback function

Details

Setting a draw function is the main thing you want to do when using a drawing area. The draw function is called whenever GTK needs to draw the contents of the drawing area to the screen.

The draw function will be called during the drawing stage of GTK. In the drawing stage it is not allowed to change properties of any GTK widgets or call any functions that would cause any properties to be changed. You should restrict yourself exclusively to drawing your contents in the draw function.

If what you are drawing does change, call the gtk:widget-queue-draw function on the drawing area. This will cause a redraw and will call the draw function again.
 

See also

2024-10-26