Klasse SectionModel

Alle implementierten Schnittstellen:
PointerInterface

public class SectionModel extends Interface
An interface that adds support for sections to list models.

A `GtkSectionModel` groups successive items into so-called sections. List widgets
like `GtkListView` and `GtkGridView` then allow displaying section headers for
these sections by installing a header factory.

Many GTK list models support sections inherently, or they pass through the sections
of a model they are wrapping.

When the section groupings of a model change, the model will emit the
[signal@Gtk.SectionModel::sections-changed] signal by calling the
[method@Gtk.SectionModel.sections_changed] function. All sections in the given range
then need to be queried again.
The [signal@Gio.ListModel::items-changed] signal has the same effect, all sections in
that range are invalidated, too.

https://docs.gtk.org/gtk4/iface.SectionModel.html

  • Felddetails

  • Konstruktordetails

  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • sectionsChanged

      public void sectionsChanged(int position, int n_items)
      This function emits the [signal@Gtk.SectionModel::sections-changed]
      signal to notify about changes to sections.

      It must cover all positions that used to be a section start or that
      are now a section start. It does not have to cover all positions for
      which the section has changed.

      The [signal@Gio.ListModel::items-changed] implies the effect of the
      [signal@Gtk.SectionModel::sections-changed] signal for all the items
      it covers.

      It is recommended that when changes to the items cause section changes
      in a larger range, that the larger range is included in the emission
      of the [signal@Gio.ListModel::items-changed] instead of emitting
      two signals.
      Parameter:
      position - the first changed item
      n_items - the number of changed items
    • onSectionsChanged

      public SignalHandler onSectionsChanged(SectionModel.OnSectionsChanged signal)
      Connect to signal "sections-changed".
      See SectionModel.OnSectionsChanged.onSectionsChanged(int, int) for signal description.
      Field SIGNAL_ON_SECTIONS_CHANGED contains original signal name and can be used as resource reference.
      Parameter:
      signal - callback function (lambda).
      Gibt zurück:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • 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()