Class: Gtk::SingleSelection

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ Gtk::SingleSelection

Creates a new selection to handle model.

Parameters:

  • model (Gio::ListModel)

    the GListModel to manage

Instance Method Details

#autoselectBoolean

Checks if autoselect has been enabled or disabled via gtk_single_selection_set_autoselect().

Returns:

  • (Boolean)

    true if autoselect is enabled

#autoselect=(autoselect) ⇒ Boolean

If the selection will always select an item.

Parameters:

  • autoselect (Boolean)

Returns:

  • (Boolean)

    autoselect

  • (Boolean)

    autoselect

#autoselect?Boolean

If the selection will always select an item.

Returns:

  • (Boolean)

    autoselect

#can_unselectBoolean

If true, gtk_selection_model_unselect_item() is supported and allows unselecting the selected item.

Returns:

  • (Boolean)

    true to support unselecting

#can_unselect=(can_unselect) ⇒ Boolean

If unselecting the selected item is allowed.

Parameters:

  • can_unselect (Boolean)

Returns:

  • (Boolean)

    can-unselect

  • (Boolean)

    can-unselect

#can_unselect?Boolean

If unselecting the selected item is allowed.

Returns:

  • (Boolean)

    can-unselect

#item_typeGLib::Type

The type of items. See [methodGio.ListModel.get_item_type].

Returns:

  • (GLib::Type)

    item-type

#item_type=(item_type) ⇒ GLib::Type

The type of items. See [methodGio.ListModel.get_item_type].

Parameters:

  • item_type (GLib::Type)

Returns:

  • (GLib::Type)

    item-type

  • (GLib::Type)

    item-type

#modelGio::ListModel

The model being managed.

Returns:

  • (Gio::ListModel)

    model

#model=(model) ⇒ Gio::ListModel

The model being managed.

Parameters:

  • model (Gio::ListModel)

Returns:

  • (Gio::ListModel)

    model

  • (Gio::ListModel)

    model

#n_itemsInteger

The number of items. See [methodGio.ListModel.get_n_items].

Returns:

  • (Integer)

    n-items

#n_items=(n_items) ⇒ Integer

The number of items. See [methodGio.ListModel.get_n_items].

Parameters:

  • n_items (Integer)

Returns:

  • (Integer)

    n-items

  • (Integer)

    n-items

#selectedInteger

Position of the selected item.

Returns:

  • (Integer)

    selected

#selected=(selected) ⇒ Integer

Position of the selected item.

Parameters:

  • selected (Integer)

Returns:

  • (Integer)

    selected

  • (Integer)

    selected

#selected_itemGObject::Object

The selected item.

Returns:

  • (GObject::Object)

    selected-item

#selected_item=(selected_item) ⇒ GObject::Object

The selected item.

Parameters:

  • selected_item (GObject::Object)

Returns:

  • (GObject::Object)

    selected-item

  • (GObject::Object)

    selected-item