gtk.section_model

Module for [SectionModel] interface

Types 2

interfaceSectionModel

gtk.section_model.SectionModel is an interface that adds support for sections to list models.

A gtk.section_model.SectionModel groups successive items into so-called sections. List widgets like gtk.list_view.ListView and gtk.grid_view.GridView 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 gtk.section_model.SectionModel.sectionsChanged signal by calling the gtk.section_model.SectionModel.sectionsChanged function. All sections in the given range then need to be queried again. The gio.list_model.ListModel.itemsChanged signal has the same effect, all sections in that range are invalidated, too.

Methods
GType _getGType() static nothrow
void getSection(uint position, out uint outStart, out uint outEnd)Query the section that covers the given position. The number of items in the section can be computed by `out_end - out_start`.
void sectionsChanged(uint position, uint nItems)
gulong connectSectionsChanged(T)(T callback, Flag!"After" after = No.After) nothrow;Connect to `SectionsChanged` signal.

Fluent builder implementation template for gtk.section_model.SectionModel