Widget.getSize

int getSize(gtk.types.Orientation orientation)

Returns the content width or height of the widget.

Which dimension is returned depends on orientation.

This is equivalent to calling [gtk.widget.Widget.getWidth] for [gtk.types.Orientation.Horizontal] or [gtk.widget.Widget.getHeight] for [gtk.types.Orientation.Vertical], but can be used when writing orientation-independent code, such as when implementing [gtk.orientable.Orientable] widgets.

To learn more about widget sizes, see the coordinate system overview.

Parameters

orientationthe orientation to query

Returns

The size of widget in orientation.