It derives from <GtkWidget>.
A widget constraining its child to a given size.
The <AdwClamp> widget constrains the size of the
widget it contains to a given maximum size. It will constrain the width
if it is horizontal, or the height if it is vertical. The expansion of
the child from its minimum to its maximum size is eased out for a smooth
transition.
If the child requires more than the requested maximum size, it will be allocated the minimum size it can fit in instead.
<AdwClamp> can scale with the text scale factor, use
the Clamp:unit property to enable that behavior.
See also: ClampLayout, ClampScrollable.
<AdwClamp> has a single CSS node with name
clamp.
The child widget of the <AdwClamp>.
Its value is a <GtkWidget>, or #f.
Set it with (set! (clamp:child self) value).
The maximum size allocated to the child.
It is the width if the clamp is horizontal, or the height if it is vertical.
Its value is a 32-bit integer.
Set it with (set! (clamp:maximum-size self) value).
The size above which the child is clamped.
Starting from this size, the clamp will tighten its grip on the child, slowly allocating less and less of the available size up to the maximum allocated size. Below that threshold and below the maximum size, the child will be allocated all the available size.
If the threshold is greater than the maximum size to allocate to the child, the child will be allocated all the size up to the maximum. If the threshold is lower than the minimum size to allocate to the child, that size will be used as the tightening threshold.
Effectively, tightening the grip on the child before it reaches its maximum size makes transitions to and from the maximum size smoother when resizing.
Its value is a 32-bit integer.
Set it with (set! (clamp:tightening-threshold self) value).
The length unit for maximum size and tightening threshold.
Allows the sizes to vary depending on the text scale factor.
Its value is a <AdwLengthUnit> (or, to set it,
one of its symbols).
Set it with (set! (clamp:unit self) value).
Gets the child widget of self.
Passed: a <AdwClamp>.
a clamp
Returned: a <GtkWidget>, or #f.
the child widget of self
Gets the maximum size allocated to the child.
Passed: a <AdwClamp>.
a clamp
Returned: a 32-bit integer.
the maximum size to allocate to the child
Gets the size above which the child is clamped.
Passed: a <AdwClamp>.
a clamp
Returned: a 32-bit integer.
the size above which the child is clamped
Gets the length unit for maximum size and tightening threshold.
Passed: a <AdwClamp>.
a clamp
Returned: a <AdwLengthUnit>.
the length unit
Creates a new <AdwClamp>.
Returned: a <GtkWidget>.
the newly created <AdwClamp>
Sets the child widget of self.
Passed: a <AdwClamp>.
a clamp
Passed, or left out: a <GtkWidget>, or
#f.
the child widget
Sets the maximum size allocated to the child.
It is the width if the clamp is horizontal, or the height if it is vertical.
Passed: a <AdwClamp>.
a clamp
Passed: a 32-bit integer.
the maximum size
Sets the size above which the child is clamped.
Starting from this size, the clamp will tighten its grip on the child, slowly allocating less and less of the available size up to the maximum allocated size. Below that threshold and below the maximum size, the child will be allocated all the available size.
If the threshold is greater than the maximum size to allocate to the child, the child will be allocated all the size up to the maximum. If the threshold is lower than the minimum size to allocate to the child, that size will be used as the tightening threshold.
Effectively, tightening the grip on the child before it reaches its maximum size makes transitions to and from the maximum size smoother when resizing.
Passed: a <AdwClamp>.
a clamp
Passed: a 32-bit integer.
the tightening threshold
Sets the length unit for maximum size and tightening threshold.
Allows the sizes to vary depending on the text scale factor.
Passed: a <AdwClamp>.
a clamp
Passed: a <AdwLengthUnit>, or one of its
symbols.
the length unit