Widget.setClip

Sets the widget’s clip. This must not be used directly, but from within a widget’s size_allocate method.

The clip set should be the area that @widget draws on. If @widget is a #GtkContainer, the area must contain all children's clips.

If this function is not called by @widget during a ::size-allocate handler, it is assumed to be equal to the allocation. However, if the function is not called, certain features that might extend a widget's allocation will not be available:

* The #GtkWidget::draw signal will be clipped to the widget's allocation to avoid overdraw. * Calling gtk_render_background() will not draw outset shadows.

It is therefore suggested that you always call gtk_widget_set_clip() during a ::size-allocate handler.

class Widget
void
setClip

Parameters

clip GtkAllocation*

a pointer to a #GtkAllocation to copy from

Meta

Since

3.14