Gtk.SelectionModelInterface

Fields

Name

Type

Access

Description

g_iface

GObject.TypeInterface

r

get_selection_in_range

object

r

Return a bitset with all currently selected items in the given range. By default, this function will call GtkSelectionModel::is_selected() on all items in the given range.

is_selected

object

r

Return if the item at the given position is selected.

select_all

object

r

Select all items in the model. If the operation is unsupported or known to fail for all items, return False.

select_item

object

r

Select the item in the given position. If the operation is known to fail, return False.

select_range

object

r

Select all items in the given range. If the operation is unsupported or known to fail for all items, return False.

set_selection

object

r

Set selection state of all items in mask to selected. See Gtk.SelectionModel.set_selection() for a detailed explanation of this function.

unselect_all

object

r

Unselect all items in the model. If the operation is unsupported or known to fail for all items, return False.

unselect_item

object

r

Unselect the item in the given position. If the operation is known to fail, return False.

unselect_range

object

r

Unselect all items in the given range. If the operation is unsupported or known to fail for all items, return False.

Methods

None

Details

class Gtk.SelectionModelInterface

The list of virtual functions for the GtkSelectionModel interface. No function must be implemented, but unless GtkSelectionModel::is_selected() is implemented, it will not be possible to select items in the set.

The model does not need to implement any functions to support either selecting or unselecting items. Of course, if the model does not do that, it means that users cannot select or unselect items in a list widget using the model.

All selection functions fall back to GtkSelectionModel::set_selection() so it is sufficient to implement just that function for full selection support.