1.22 <AdwClampScrollable>

Class: <AdwClampScrollable>

It derives from <GtkWidget>.

A scrollable Clamp.

<AdwClampScrollable> is a variant of Clamp that implements the <GtkScrollable> interface.

The primary use case for <AdwClampScrollable> is clamping <GtkListView>.

See also: ClampLayout.

Properties

Property: clamp-scrollable:child self

The child widget of the <AdwClampScrollable>.

Its value is a <GtkWidget>, or #f.

Set it with (set! (clamp-scrollable:child self) value).

Property: clamp-scrollable:maximum-size self

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-scrollable:maximum-size self) value).

Property: clamp-scrollable:tightening-threshold self

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 width, 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 width 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-scrollable:tightening-threshold self) value).

Property: clamp-scrollable:unit self

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-scrollable:unit self) value).

Procedures

Method: clamp-scrollable:get-child self ⇒ %return
Method: get-child self ⇒ %return

Gets the child widget of self.

self

Passed: a <AdwClampScrollable>.

a clamp scrollable

%return

Returned: a <GtkWidget>, or #f.

the child widget of self

Method: clamp-scrollable:get-maximum-size self ⇒ %return
Method: get-maximum-size self ⇒ %return

Gets the maximum size allocated to the child.

self

Passed: a <AdwClampScrollable>.

a clamp scrollable

%return

Returned: a 32-bit integer.

the maximum size to allocate to the child

Method: clamp-scrollable:get-tightening-threshold self ⇒ %return
Method: get-tightening-threshold self ⇒ %return

Gets the size above which the child is clamped.

self

Passed: a <AdwClampScrollable>.

a clamp scrollable

%return

Returned: a 32-bit integer.

the size above which the child is clamped

Method: clamp-scrollable:get-unit self ⇒ %return
Method: get-unit self ⇒ %return

Gets the length unit for maximum size and tightening threshold.

self

Passed: a <AdwClampScrollable>.

a clamp scrollable

%return

Returned: a <AdwLengthUnit>.

the length unit

Procedure: clamp-scrollable:new ⇒ %return

Creates a new <AdwClampScrollable>.

%return

Returned: a <GtkWidget>.

the newly created <AdwClampScrollable>

Method: clamp-scrollable:set-child self [child]
Method: set-child self [child]

Sets the child widget of self.

self

Passed: a <AdwClampScrollable>.

a clamp scrollable

child

Passed, or left out: a <GtkWidget>, or #f.

the child widget

Method: clamp-scrollable:set-maximum-size self maximum-size
Method: set-maximum-size self maximum-size

Sets the maximum size allocated to the child.

It is the width if the clamp is horizontal, or the height if it is vertical.

self

Passed: a <AdwClampScrollable>.

a clamp scrollable

maximum-size

Passed: a 32-bit integer.

the maximum size

Method: clamp-scrollable:set-tightening-threshold self tightening-threshold
Method: set-tightening-threshold self tightening-threshold

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 width, 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 width 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.

self

Passed: a <AdwClampScrollable>.

a clamp scrollable

tightening-threshold

Passed: a 32-bit integer.

the tightening threshold

Method: clamp-scrollable:set-unit self unit
Method: set-unit self unit

Sets the length unit for maximum size and tightening threshold.

Allows the sizes to vary depending on the text scale factor.

self

Passed: a <AdwClampScrollable>.

a clamp

unit

Passed: a <AdwLengthUnit>, or one of its symbols.

the length unit