adw-clamp-layout

adw-clamp-layout

Functions

Properties

int maximum-size Read / Write
int tightening-threshold Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GtkLayoutManager
        ╰── AdwClampLayout

Implemented Interfaces

AdwClampLayout implements GtkOrientable.

Description

Functions

adw_clamp_layout_new ()

GtkLayoutManager *
adw_clamp_layout_new (void);

Creates a new AdwClampLayout.

Returns

a new AdwClampLayout

Since: 1.0


adw_clamp_layout_get_maximum_size ()

int
adw_clamp_layout_get_maximum_size (AdwClampLayout *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 AdwClampLayout

 

Returns

the maximum width to allocate to the contained child.

Since: 1.0


adw_clamp_layout_set_maximum_size ()

void
adw_clamp_layout_set_maximum_size (AdwClampLayout *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 AdwClampLayout

 

maximum_size

the maximum size

 

Since: 1.0


adw_clamp_layout_get_tightening_threshold ()

int
adw_clamp_layout_get_tightening_threshold
                               (AdwClampLayout *self);

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

Parameters

self

a AdwClampLayout

 

Returns

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

Since: 1.0


adw_clamp_layout_set_tightening_threshold ()

void
adw_clamp_layout_set_tightening_threshold
                               (AdwClampLayout *self,
                                int tightening_threshold);

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

Parameters

self

a AdwClampLayout

 

tightening_threshold

the tightening threshold

 

Since: 1.0

Types and Values

ADW_TYPE_CLAMP_LAYOUT

#define ADW_TYPE_CLAMP_LAYOUT (adw_clamp_layout_get_type())

AdwClampLayout

typedef struct _AdwClampLayout AdwClampLayout;

Property Details

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: AdwClampLayout

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: AdwClampLayout

Flags: Read / Write

Allowed values: >= 0

Default value: 400

Since: 1.0