Package: gtk

Interface gtk:section-model

Superclasses

gobject:object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

Direct Slots

None

Details

The gtk:section-model interface is an interface that adds support for sections to list models. A gtk:section-model object groups successive items into so-called sections. List widgets like the gtk:list-view and gtk:grid-view widget 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 "sections-changed" signal by calling the gtk:section-model-sections-changed function. All sections in the given range then need to be queried again. The "items-changed" signal has the same effect, all sections in that range are invalidated, too.

Since 4.12

Signals

The "sections-changed" signal
lambda (model pos n-items)    :run-last      
model
The gtk:section-model object that emitted the signal.
pos
The unsigned integer with the first item that may have changed.
n-items
The unsigned integer with the number of items with changes.
Emitted when the start-of-section state of some of the items in model changes. Note that this signal does not specify the new section state of the items, they need to be queried manually. It is also not necessary for a model to change the section state of any of the items in the section model, though it would be rather useless to emit such a signal. The "items-changed" signal of the g:list-model class implies the effect of the "sections-changed" signal for all the items it covers.
 

Inherited Slot Access Functions

See also

2024-11-29