SectionModel

interface SectionModel

GtkSectionModel is 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.

Skipped during bindings generation

  • parameter out_start: out_start: Out parameter is not supported

Since

4.12

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val gioListModelPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
abstract val gtkSectionModelPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun connectSectionsChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (<Error class: unknown class>, <Error class: unknown class>) -> Unit): <Error class: unknown class>

Emitted when the start-of-section state of some of the items in @model changes.

Link copied to clipboard
open fun sectionsChanged(position: <Error class: unknown class>, nItems: <Error class: unknown class>)

This function emits the signal@Gtk.SectionModel::sections-changed signal to notify about changes to sections.