Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ScrollableMeta

[267:14] static extends: object

Generated metadata helpers for Scrollable interface surfaces.

Methods

  • properties ()

    Returns property metadata for Scrollable.

    • @r A list.

class: Scrollable

[29:7] extends: object

An interface for widgets with native scrolling ability. To implement this interface you should override the [property@Gtk.Scrollable:hadjustment] and [property@Gtk.Scrollable:vadjustment] properties. ## Creating a scrollable widget All scrollable widgets should do the following. - When a parent widget sets the scrollable child widget’s adjustments, the widget should connect to the [signal@Gtk.Adjustment::value-changed] signal. The child widget should then populate the adjustments’ properties as soon as possible, which usually means queueing an allocation right away and populating the properties in the [vfunc@Gtk.Widget.size_allocate] implementation. - Because its preferred size is the size for a fully expanded widget, the scrollable widget must be able to cope with underallocations. This means that it must accept any value passed to its [vfunc@Gtk.Widget.size_allocate] implementation. - When the parent allocates space to the scrollable child widget, the widget must ensure the adjustments’ property values are correct and up to date, for example using [method@Gtk.Adjustment.configure]. - When any of the adjustments emits the [signal@Gtk.Adjustment::value-changed] signal, the scrollable widget should scroll its contents.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • Scrollable (Handle = null)

    Creates a new Scrollable by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setHadjustment (object Value)

    Horizontal GtkAdjustment of the scrollable widget. This adjustment is shared between the scrollable widget and its parent.

    • @p Value is the new property value.
    • @r None.
  • setHscrollpolicy (string Value)

    Determines when horizontal scrolling should start.

    • @p Value is the new property value.
    • @r None.
  • setVadjustment (object Value)

    Vertical GtkAdjustment of the scrollable widget. This adjustment is shared between the scrollable widget and its parent.

    • @p Value is the new property value.
    • @r None.
  • setVscrollpolicy (string Value)

    Determines when vertical scrolling should start.

    • @p Value is the new property value.
    • @r None.
  • get_hadjustment ()

    Retrieves the GtkAdjustment used for horizontal scrolling.

  • get_hscroll_policy ()

    Gets the horizontal GtkScrollablePolicy.

  • get_vadjustment ()

    Retrieves the GtkAdjustment used for vertical scrolling.

  • get_vscroll_policy ()

    Gets the vertical GtkScrollablePolicy.

  • set_hadjustment (object hadjustment)

    Sets the horizontal adjustment of the GtkScrollable.

    • @p hadjustment is a GtkAdjustment.
    • @r None.
  • set_hscroll_policy (string policy)

    Sets the GtkScrollablePolicy. The policy determines whether horizontal scrolling should start below the minimum width or below the natural width.

    • @p policy is the horizontal GtkScrollablePolicy.
    • @r None.
  • set_vadjustment (object vadjustment)

    Sets the vertical adjustment of the GtkScrollable.

    • @p vadjustment is a GtkAdjustment.
    • @r None.
  • set_vscroll_policy (string policy)

    Sets the GtkScrollablePolicy. The policy determines whether vertical scrolling should start below the minimum height or below the natural height.

    • @p policy is the vertical GtkScrollablePolicy.
    • @r None.