Package: gtk

Accessor gtk-widget-hexpand

Lambda List

gtk-widget-hexpand (object)

Syntax

(gtk-widget-hexpand object) => setting
(setf (gtk-widget-hexpand object) setting)

Arguments

object -- a gtk-widget object
setting -- a boolean whether to expand horizontally

Details

Accessor of the hexpand slot of the gtk-widget class.

The gtk-widget-hexpand slot access function gets whether the widget would like any available extra horizontal space. This function only looks at the own hexpand flag of the widget, rather than computing whether the entire widget tree rooted at this widget wants to expand.

The (setf gtk-widget-hexpand) slot access function sets whether the widget would like any available extra horizontal space. Call this function to set the expand flag if you would like your widget to become larger horizontally when the window has extra room.

By default, widgets automatically expand if any of their children want to expand. To see if a widget will automatically expand given its current children and state, call the gtk-widget-compute-expand function. A container can decide how the expandability of children affects the expansion of the container by overriding the compute_expand virtual method on the gtk-widget class.

Setting the hexpand property explicitly with this function will override the automatic expand behavior. This function forces the widget to expand or not to expand, regardless of children. The override occurs because the gtk-widget-hexpand function sets the hexpand-set property, which causes the hexpand property of the widget to be used, rather than looking at children and widget state.
 

See also

2021-9-15