It derives from <GObject>.
A list model that presents a slice of another model.
This is useful when implementing paging by setting the size to the number of elements per page and updating the offset whenever a different page is opened.
<GtkSliceListModel> passes through sections
from the underlying model.
The type of items. See list-model:get-item-type.
Its value is a class, or a GType number.
It is read only.
Child model to take slice from.
Its value is a <GListModel>, or #f.
Set it with (set! (slice-list-model:model self) value).
The number of items. See list-model:get-n-items.
Its value is an unsigned 32-bit integer.
It is read only.
Offset of slice.
Its value is an unsigned 32-bit integer.
Set it with (set! (slice-list-model:offset self) value).
Maximum size of slice.
Its value is an unsigned 32-bit integer.
Set it with (set! (slice-list-model:size self) value).
Gets the model that is currently being used or #f if none.
Passed: a <GtkSliceListModel>.
Returned: a <GListModel>, or #f.
The model in use
Gets the offset set via slice-list-model:set-offset.
Passed: a <GtkSliceListModel>.
Returned: an unsigned 32-bit integer.
The offset
Gets the size set via slice-list-model:set-size.
Passed: a <GtkSliceListModel>.
Returned: an unsigned 32-bit integer.
The size
Creates a new slice model.
It presents the slice from offset to offset + size of the given model.
Passed: a <GListModel>, or #f.
The model to use
Passed: an unsigned 32-bit integer.
the offset of the slice
Passed: an unsigned 32-bit integer.
maximum size of the slice
Returned: a <GtkSliceListModel>.
A new <GtkSliceListModel>
Sets the model to show a slice of.
The model’s item type must conform to self’s item type.
Passed: a <GtkSliceListModel>.
Passed, or left out: a <GListModel>, or
#f.
The model to be sliced
Sets the offset into the original model for this slice.
If the offset is too large for the sliced model, self will end up empty.
Passed: a <GtkSliceListModel>.
Passed: an unsigned 32-bit integer.
the new offset to use
Sets the maximum size. self will never have more items than size.
It can however have fewer items if the offset is too large or the model sliced from doesn’t have enough items.
Passed: a <GtkSliceListModel>.
Passed: an unsigned 32-bit integer.
the maximum size