adw-clamp-scrollable

adw-clamp-scrollable

Functions

Properties

GtkWidget * child Read / Write
int maximum-size Read / Write
int tightening-threshold Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── AdwClampScrollable

Implemented Interfaces

AdwClampScrollable implements GtkAccessible, GtkBuildable, GtkConstraintTarget, GtkOrientable and GtkScrollable.

Description

Functions

adw_clamp_scrollable_new ()

GtkWidget *
adw_clamp_scrollable_new (void);

Creates a new AdwClampScrollable.

Returns

a new AdwClampScrollable

Since: 1.0


adw_clamp_scrollable_get_child ()

GtkWidget *
adw_clamp_scrollable_get_child (AdwClampScrollable *self);

Gets the child widget of self .

Parameters

self

a AdwClampScrollable

 

Returns

the child widget of self .

[nullable][transfer none]

Since: 1.0


adw_clamp_scrollable_set_child ()

void
adw_clamp_scrollable_set_child (AdwClampScrollable *self,
                                GtkWidget *child);

Sets the child widget of self .

Parameters

self

a AdwClampScrollable

 

child

the child widget.

[nullable]

Since: 1.0


adw_clamp_scrollable_get_maximum_size ()

int
adw_clamp_scrollable_get_maximum_size (AdwClampScrollable *self);

Gets the maximum size to allocate to the contained child. It is the width if self is horizontal, or the height if it is vertical.

Parameters

self

a AdwClampScrollable

 

Returns

the maximum width to allocate to the contained child.

Since: 1.0


adw_clamp_scrollable_set_maximum_size ()

void
adw_clamp_scrollable_set_maximum_size (AdwClampScrollable *self,
                                       int maximum_size);

Sets the maximum size to allocate to the contained child. It is the width if self is horizontal, or the height if it is vertical.

Parameters

self

a AdwClampScrollable

 

maximum_size

the maximum size

 

Since: 1.0


adw_clamp_scrollable_get_tightening_threshold ()

int
adw_clamp_scrollable_get_tightening_threshold
                               (AdwClampScrollable *self);

Gets the size starting from which the clamp will tighten its grip on the child.

Parameters

self

a AdwClampScrollable

 

Returns

the size starting from which the clamp will tighten its grip on the child.

Since: 1.0


adw_clamp_scrollable_set_tightening_threshold ()

void
adw_clamp_scrollable_set_tightening_threshold
                               (AdwClampScrollable *self,
                                int tightening_threshold);

Sets the size starting from which the clamp will tighten its grip on the child.

Parameters

self

a AdwClampScrollable

 

tightening_threshold

the tightening threshold

 

Since: 1.0

Types and Values

ADW_TYPE_CLAMP_SCROLLABLE

#define ADW_TYPE_CLAMP_SCROLLABLE (adw_clamp_scrollable_get_type())

AdwClampScrollable

typedef struct _AdwClampScrollable AdwClampScrollable;

Property Details

The “child” property

  “child”                    GtkWidget *

The child widget.

Owner: AdwClampScrollable

Flags: Read / Write


The “maximum-size” property

  “maximum-size”             int

The maximum size to allocate to the child. It is the width if the clamp is horizontal, or the height if it is vertical.

Owner: AdwClampScrollable

Flags: Read / Write

Allowed values: >= 0

Default value: 600

Since: 1.0


The “tightening-threshold” property

  “tightening-threshold”     int

The size starting from which 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.

Owner: AdwClampScrollable

Flags: Read / Write

Allowed values: >= 0

Default value: 400

Since: 1.0