Handy.Clamp
Description: Reference for Handy.Clamp

### Class

# HandyClamp

#### Description [src]

    final class Handy.Clamp : Gtk.Bin {
      /* No available fields */
    }

A widget constraining its child to a given size.

The `HdyClamp` 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

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

The node will get the style classes `.large` when its child reached its maximum size, `.small` when the clamp allocates its full size to its child, `.medium` in-between, or none if it didn’t compute its size yet.

Available since: | 1.0

#### Ancestors

- GtkBin
- GtkContainer
- GtkWidget
- GInitiallyUnowned
- GObject

#### Implements

- AtkImplementorIface
- GtkBuildable
- GtkOrientable

#### Constructors

###### hdy_clamp_new

Creates a new `HdyClamp`.

Available since: 1.0

#### Instance methods

###### hdy_clamp_get_maximum_size

Gets the maximum size allocated to the children.

Available since: 1.0

###### hdy_clamp_get_tightening_threshold

Gets the size above which the children are clamped.

Available since: 1.0

###### hdy_clamp_set_maximum_size

Sets the maximum size allocated to the children.

Available since: 1.0

###### hdy_clamp_set_tightening_threshold

Sets the size above which the children are clamped.

Available since: 1.0

#### Properties

###### Handy.Clamp:maximum-size

The maximum size to allocate the children.

Available since: 1.0

###### Handy.Clamp:tightening-threshold

The size above which the child is clamped.

Available since: 1.0

#### Class structure

    struct HandyClampClass {
      GtkBinClass parent_class;

    }

###### Class members

`parent_class` |
    GtkBinClass
| No description available.