Package: gtk

Function gtk-widget-clip

Lambda List

gtk-widget-clip (widget)

Syntax

(gtk-widget-clip widget) => clip
(setf (gtk-widget-clip widget) clip)

Arguments

widget -- a gtk-widget object
clip -- a gdk-rectangle instance

Details

The gtk-widget-clip function retrieves the clip area of the widget. The (setf gtk-widget-clip function sets the clip of the widget.

The clip area is the area in which all of the drawing of the widget will happen. Other toolkits call it the bounding box.

Historically, in GTK the clip area has been equal to the allocation retrieved via the gtk-widget-allocation function.

This must not be used directly, but from within a size_allocate method of the widget. It must be called after the gtk-widget-allocation function, or after chaning up to the parent class, because that function resets the clip.

The clip set should be the area that the widget draws on. If the widget is a gtk-container widget, the area must contain all clips of the children.

If this function is not called by the widget during a "size-allocate" handler, the clip will be set to the allocation of the widget.
 

See also

2021-9-22