Adw.Clamp
Description: Reference for Adw.Clamp

### Class

# AdwClamp

#### Description [src]

    final class Adw.Clamp : Gtk.Widget {
      /* No available fields */
    }

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.

## CSS nodes

`AdwClamp` has a single CSS node with name `clamp`.

Its children will receive the style classes `.large` when the child reached its maximum size, `.small` when the clamp allocates its full size to the child, `.medium` in-between, or none if it hasn’t computed its size yet.

Available since: | 1.0

#### Hierarchy

#### Ancestors

- GtkWidget
- GInitiallyUnowned
- GObject

#### Implements

- GtkAccessible
- GtkBuildable
- GtkConstraintTarget
- GtkOrientable

#### Constructors

###### adw_clamp_new

Creates a new `AdwClamp`.

Available since: 1.0

#### Instance methods

###### adw_clamp_get_child

Gets the child widget of `self`.

Available since: 1.0

###### adw_clamp_get_maximum_size

Gets the maximum size allocated to the child.

Available since: 1.0

###### adw_clamp_get_tightening_threshold

Gets the size above which the child is clamped.

Available since: 1.0

###### adw_clamp_set_child

Sets the child widget of `self`.

Available since: 1.0

###### adw_clamp_set_maximum_size

Sets the maximum size allocated to the child.

Available since: 1.0

###### adw_clamp_set_tightening_threshold

Sets the size above which the child is clamped.

Available since: 1.0

##### Methods inherited from GtkWidget (159)

##### Methods inherited from GObject (43)

#### Properties

###### Adw.Clamp:child

The child widget of the `AdwClamp`.

Available since: 1.0

###### Adw.Clamp:maximum-size

The maximum size allocated to the child.

Available since: 1.0

###### Adw.Clamp:tightening-threshold

The size above which the child is clamped.

Available since: 1.0

##### Properties inherited from GtkWidget (34)

#### Signals

##### Signals inherited from GtkWidget (13)

##### Signals inherited from GObject (1)

#### Class structure

    struct AdwClampClass {
      GtkWidgetClass parent_class;

    }

###### Class members

`parent_class` |
    GtkWidgetClass
| No description available.