GtkSelectionModelInterface

The list of virtual functions for the gtk.selection_model.SelectionModel 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.

Members

Variables

gIface
GTypeInterface gIface;
getSelectionInRange
GtkBitset* function(GtkSelectionModel* model, uint position, uint nItems) getSelectionInRange;

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.

isSelected
bool function(GtkSelectionModel* model, uint position) isSelected;

Return if the item at the given position is selected.

selectAll
bool function(GtkSelectionModel* model) selectAll;

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

selectItem
bool function(GtkSelectionModel* model, uint position, bool unselectRest) selectItem;

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

selectRange
bool function(GtkSelectionModel* model, uint position, uint nItems, bool unselectRest) selectRange;

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

setSelection
bool function(GtkSelectionModel* model, GtkBitset* selected, GtkBitset* mask) setSelection;

Set selection state of all items in mask to selected. See gtk.selection_model.SelectionModel.setSelection for a detailed explanation of this function.

unselectAll
bool function(GtkSelectionModel* model) unselectAll;

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

unselectItem
bool function(GtkSelectionModel* model, uint position) unselectItem;

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

unselectRange
bool function(GtkSelectionModel* model, uint position, uint nItems) unselectRange;

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