SectionModel


Object Hierarchy:

Gtk.SectionModel Gtk.SectionModel Gtk.SectionModel GLib.Object GLib.Object GLib.Object->Gtk.SectionModel GLib.ListModel GLib.ListModel GLib.ListModel->Gtk.SectionModel

Description:

[ CCode ( type_cname = "GtkSectionModelInterface" , type_id = "gtk_section_model_get_type ()" ) ]
[ Version ( since = "4.12" ) ]
public interface SectionModel : Object, ListModel

`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:GtkSectionModel: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:GtkSectionModel:items-changed] signal has the same effect, all sections in that range are invalidated, too.


Namespace: Gtk
Package: gtk4

Content:

Methods:

Signals:

Inherited Members:

All known members inherited from interface GLib.ListModel