Package: gtk

Class gtk:tree-selection

Superclasses

gobject:object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

mode
The mode property of type gtk:selection-mode (Read / Write)
The selection mode.
Default value: :single

Details

The gtk:tree-selection object is a helper object to manage the selection for a gtk:tree-view widget. The gtk:tree-selection object is automatically created when a new gtk:tree-view widget is created, and cannot exist independentally of this widget. The primary reason the gtk:tree-selection objects exists is for cleanliness of code and API. That is, there is no conceptual reason all these functions could not be methods on the gtk:tree-view widget instead of a separate function.

The gtk:tree-selection object is gotten from a gtk:tree-view widget by calling the gtk:tree-view-selection function. It can be manipulated to check the selection status of the tree view, as well as select and deselect individual rows. Selection is done completely tree view side. As a result, multiple tree views of the same model can have completely different selections. Additionally, you cannot change the selection of a row on the model that is not currently displayed by the tree view without expanding its parents first.

One of the important things to remember when monitoring the selection of a tree view is that the "changed" signal is mostly a hint. That is, it may only emit one signal when a range of rows is selected. Additionally, it may on occasion emit a "changed" signal.

Warning

The gtk:tree-selection implementation is deprecated since 4.10. Please do not use it in newly written code.

Signal Details

The "changed" signal
lambda (selection)    :run-first      
selection
The gtk:tree-selection object which received the signal.
Emitted whenever the selection has (possibly) changed. Please note that this signal is mostly a hint. It may only be emitted once when a range of rows are selected, and it may occasionally be emitted when nothing has happened.
 

Slot Access Functions

Inherited Slot Access Functions

See also

2024-11-5