SingleSelection


Object Hierarchy:

Gtk.SingleSelection Gtk.SingleSelection Gtk.SingleSelection GLib.Object GLib.Object GLib.Object->Gtk.SingleSelection GLib.ListModel GLib.ListModel GLib.ListModel->Gtk.SingleSelection Gtk.SectionModel Gtk.SectionModel Gtk.SectionModel->Gtk.SingleSelection Gtk.SelectionModel Gtk.SelectionModel Gtk.SelectionModel->Gtk.SingleSelection

Description:

[ CCode ( type_id = "gtk_single_selection_get_type ()" ) ]
public sealed class SingleSelection : Object, ListModel, SectionModel, SelectionModel

`GtkSingleSelection` is a `GtkSelectionModel` that allows selecting a single item.

Note that the selection is *persistent* -- if the selected item is removed and re-added in the same [signal@Gio.ListModel: GtkSingleSelection:items-changed] emission, it stays selected. In particular, this means that changing the sort order of an underlying sort model will preserve the selection.


Namespace: Gtk
Package: gtk4

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from interface GLib.ListModel
All known members inherited from interface Gtk.SectionModel