Package: gtk

Function gtk:widget-measure

Lambda List

gtk:widget-measure (widget orientation for-size)

Arguments

widget -- a gtk:widget object
orientation -- a gtk:orientation value for the orientation to measure
for-size -- an integer for the size for the opposite of orientation, that is, if orientation is :horizontal, this is the height the widget should be measured with. The :vertical case is analogous. This way, both height-for-width and width-for-height requests can be implemented. If no size is known, -1 can be passed.

Return Value

minimum -- an integer with the minimum size
natural -- an integer with the natural size
minimum-baseline -- an integer with the baseline position for the minimum size
natural-baseline -- an integer with the baseline position for the natural size

Details

Measures widget in the orientation orientation and for the given for-size. As an example, if orientation is :horizontal and for-size is 300, this functions will compute the minimum and natural width of widget if it is allocated at a height of 300 pixels.
 

See also

2025-2-15