Widget.getSize

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.

class Widget
int
getSize

Parameters

orientation gtk.types.Orientation

the orientation to query

Return Value

Type: int

The size of widget in orientation.