SliceListModel

open class SliceListModel(pointer: <Error class: unknown class><<Error class: unknown class>>) : SectionModel

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

Skipped during bindings generation

  • method item-type: Property has no getter nor setter

  • method n-items: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor(model: <Error class: unknown class>? = null, offset: <Error class: unknown class>, size: <Error class: unknown class>)

Creates a new slice model.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val gioListModelPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val gtkSectionModelPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gtkSliceListModelPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open var model: <Error class: unknown class>?

Child model to take slice from.

Link copied to clipboard
open var offset: <Error class: unknown class>

Offset of slice.

Link copied to clipboard
open var size: <Error class: unknown class>

Maximum size of slice.

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 getModel(): <Error class: unknown class>?

Gets the model that is currently being used or null if none.

Link copied to clipboard
open fun getOffset(): <Error class: unknown class>

Gets the offset set via gtk_slice_list_model_set_offset().

Link copied to clipboard
open fun getSize(): <Error class: unknown class>

Gets the size set via gtk_slice_list_model_set_size().

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.

Link copied to clipboard
open fun setModel(model: <Error class: unknown class>? = null)

Sets the model to show a slice of.

Link copied to clipboard
open fun setOffset(offset: <Error class: unknown class>)

Sets the offset into the original model for this slice.

Link copied to clipboard
open fun setSize(size: <Error class: unknown class>)

Sets the maximum size. @self will never have more items than @size.