Gtk.MultiSelection

g GObject.GInterface GObject.GInterface Gio.ListModel Gio.ListModel GObject.GInterface->Gio.ListModel Gtk.SectionModel Gtk.SectionModel GObject.GInterface->Gtk.SectionModel Gtk.SelectionModel Gtk.SelectionModel GObject.GInterface->Gtk.SelectionModel GObject.Object GObject.Object Gtk.MultiSelection Gtk.MultiSelection GObject.Object->Gtk.MultiSelection Gio.ListModel->Gtk.MultiSelection Gtk.SectionModel->Gtk.MultiSelection Gtk.SelectionModel->Gtk.MultiSelection

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.ListModel (4), Gtk.SectionModel (2), Gtk.SelectionModel (11)

Structs:

GObject.ObjectClass (5)

class

new (model)

get_model ()

set_model (model)

Virtual Methods

Inherited:

GObject.Object (7), Gio.ListModel (3), Gtk.SectionModel (1), Gtk.SelectionModel (9)

Properties

Name

Type

Flags

Short Description

item-type

GObject.GType

r

model

Gio.ListModel

r/w/en

n-items

int

r

Signals

Inherited:

GObject.Object (1), Gio.ListModel (1), Gtk.SectionModel (1), Gtk.SelectionModel (1)

Fields

Inherited:

GObject.Object (1), Gio.ListModel (1), Gtk.SectionModel (1), Gtk.SelectionModel (1)

Class Details

class Gtk.MultiSelection(**kwargs)
Bases:

GObject.Object, Gio.ListModel, Gtk.SectionModel, Gtk.SelectionModel

Abstract:

No

Structure:

Gtk.MultiSelectionClass

GtkMultiSelection is a GtkSelectionModel that allows selecting multiple elements.

classmethod new(model)[source]
Parameters:

model (Gio.ListModel or None) – the GListModel to manage

Returns:

a new GtkMultiSelection

Return type:

Gtk.MultiSelection

Creates a new selection to handle model.

get_model()[source]
Returns:

the underlying model

Return type:

Gio.ListModel or None

Returns the underlying model of self.

set_model(model)[source]
Parameters:

model (Gio.ListModel or None) – A GListModel to wrap

Sets the model that self should wrap.

If model is None, self will be empty.

Property Details

Gtk.MultiSelection.props.item_type
Name:

item-type

Type:

GObject.GType

Default Value:

<GType GObject>

Flags:

READABLE

The type of items. See [method`Gio`.ListModel.get_item_type].

New in version 4.8.

Gtk.MultiSelection.props.model
Name:

model

Type:

Gio.ListModel

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The list managed by this selection.

Gtk.MultiSelection.props.n_items
Name:

n-items

Type:

int

Default Value:

0

Flags:

READABLE

The number of items. See [method`Gio`.ListModel.get_n_items].

New in version 4.8.