Class: Handy::Clamp

Inherits:
Gtk::Bin
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initializeGtk::Widget

Creates a new HdyClamp.

Instance Method Details

#maximum_sizeInteger

The maximum size to allocate the children.

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

Returns:

  • (Integer)

    maximum-size

#maximum_size=(maximum_size) ⇒ Integer

The maximum size to allocate the children.

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

Parameters:

  • maximum_size (Integer)

Returns:

  • (Integer)

    maximum-size

  • (Integer)

    maximum-size

#tightening_thresholdInteger

The size above which the child is clamped.

Starting from this size, the layout will tighten its grip on the children, slowly allocating less and less of the available size up to the maximum allocated size. Below that threshold and below the maximum size, the children will be allocated all the available size.

If the threshold is greater than the maximum size to allocate to the children, they will be allocated the whole size up to the maximum. If the threshold is lower than the minimum size to allocate to the children, that size will be used as the tightening threshold.

Effectively, tightening the grip on a child before it reaches its maximum size makes transitions to and from the maximum size smoother when resizing.

Returns:

  • (Integer)

    tightening-threshold

#tightening_threshold=(tightening_threshold) ⇒ Integer

The size above which the child is clamped.

Starting from this size, the layout will tighten its grip on the children, slowly allocating less and less of the available size up to the maximum allocated size. Below that threshold and below the maximum size, the children will be allocated all the available size.

If the threshold is greater than the maximum size to allocate to the children, they will be allocated the whole size up to the maximum. If the threshold is lower than the minimum size to allocate to the children, that size will be used as the tightening threshold.

Effectively, tightening the grip on a child before it reaches its maximum size makes transitions to and from the maximum size smoother when resizing.

Parameters:

  • tightening_threshold (Integer)

Returns:

  • (Integer)

    tightening-threshold

  • (Integer)

    tightening-threshold