Class ClampScrollable

All Implemented Interfaces:
PointerInterface

public class ClampScrollable extends Widget
A scrollable [class@Clamp].

`AdwClampScrollable` is a variant of [class@Clamp] that implements the
[iface@Gtk.Scrollable] interface.

The primary use case for `AdwClampScrollable` is clamping
[class@Gtk.ListView].

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ClampScrollable.html

  • Constructor Details

    • ClampScrollable

      public ClampScrollable(PointerContainer pointer)
    • ClampScrollable

      public ClampScrollable()
      Creates a new `AdwClampScrollable`.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getChild

      public Widget getChild()
      Gets the child widget of @self.
      Returns:
      the child widget of @self
    • getMaximumSize

      public int getMaximumSize()
      Gets the maximum size allocated to the child.
      Returns:
      the maximum size to allocate to the child
    • getTighteningThreshold

      public int getTighteningThreshold()
      Gets the size above which the child is clamped.
      Returns:
      the size above which the child is clamped
    • setChild

      public void setChild(@Nullable Widget child)
      Sets the child widget of @self.
      Parameters:
      child - the child widget
    • setMaximumSize

      public void setMaximumSize(int maximum_size)
      Sets the maximum size allocated to the child.

      It is the width if the clamp is horizontal, or the height if it is vertical.
      Parameters:
      maximum_size - the maximum size
    • setTighteningThreshold

      public void setTighteningThreshold(int tightening_threshold)
      Sets the size above which the child is clamped.

      Starting from this size, 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.
      Parameters:
      tightening_threshold - the tightening threshold
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Overrides:
      asAccessible in class Widget
      Returns:
      Accessible
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Overrides:
      asBuildable in class Widget
      Returns:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Overrides:
      asConstraintTarget in class Widget
      Returns:
      ConstraintTarget
    • asOrientable

      public Orientable asOrientable()
      Implements interface Orientable. Call this to get access to interface functions.
      Returns:
      Orientable
    • asScrollable

      public Scrollable asScrollable()
      Implements interface Scrollable. Call this to get access to interface functions.
      Returns:
      Scrollable
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()