Latch


Object Hierarchy:

Object hierarchy for Latch

Description:

[ CCode ( type_id = "bis_latch_get_type ()" ) ]
[ Version ( since = "1.0" ) ]
public sealed class Latch : Widget, Accessible, Buildable, ConstraintTarget, Orientable

A widget constraining its child to a given size.

<picture> <source srcset="latch-wide-dark.png" media="(prefers-color-scheme: dark)"> <img src="latch-wide.png" alt="latch-wide"> </picture> <picture> <source srcset="latch-narrow-dark.png" media="(prefers-color-scheme: dark)"> <img src="latch-narrow.png" alt="latch-narrow"> </picture>

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

`BisLatch` has a single CSS node with name `latch`.

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


Namespace: Bis
Package: libbismuth-1

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.Widget
All known members inherited from interface Gtk.Orientable