Package: gtk

Class gtk:single-selection

Superclasses

gtk:selection-model, gio:list-model, gtk:section-model, gobject:object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

autoselect
The autoselect property of type :boolean (Read / Write)
Whether the selection will always select an item.
Default value: true
can-unselect
The can-unselect property of type :boolean (Read / Write)
Whether unselecting the selected item is allowed.
Default value: false
item-type
The item-type property of type g:type-t (Read)
The type of items. Since 4.8
model
The model property of type g:list-model (Read / Write)
The model being managed.
n-items
The n-items property of type :uint (Read / Write)
The number of items. Since 4.8
Default value: 0
selected
The selected property of type :uint (Read / Write)
Position of the selected item.
Default value: gtk:+invalid-list-position+
selected-item
The selected-item property of type g:object (Read)
The selected item.

Details

The gtk:single-selection class is an implementation of the gtk:selection-model interface that allows selecting a single element. It is the default selection method used by list widgets in GTK.

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

Returned by

Inherited Slot Access Functions

See also

2024-12-22