package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Slice_list_model/index.html

Module Wrappers.Slice_list_model

type t = [ `slice_list_model | `object_ ] Gobject.obj
val new_ : Ocgtk_gio.Gio.Wrappers.List_model.t option -> int -> int -> t

Create a new SliceListModel

val set_size : t -> int -> unit

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.

val set_offset : t -> int -> unit

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.

val set_model : t -> Ocgtk_gio.Gio.Wrappers.List_model.t option -> unit

Sets the model to show a slice of.

The model's item type must conform to @self's item type.

val get_size : t -> int

Gets the size set via gtk_slice_list_model_set_size().

val get_offset : t -> int

Gets the offset set via gtk_slice_list_model_set_offset().

val get_model : t -> Ocgtk_gio.Gio.Wrappers.List_model.t option

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

val get_item_type : t -> Gobject.Type.t

Get property: item-type

val get_n_items : t -> int

Get property: n-items