Class

GtkListItem

Description [src]

final class Gtk.ListItem : GObject.Object {
  /* No available fields */
}

GtkListItem is used by list widgets to represent items in a GListModel.

The GtkListItems are managed by the list widget (with its factory) and cannot be created by applications, but they need to be populated by application code. This is done by calling gtk_list_item_set_child().

GtkListItems exist in 2 stages:

  1. The unbound stage where the listitem is not currently connected to an item in the list. In that case, the GtkListItem:item property is set to NULL.

  2. The bound stage where the listitem references an item from the list. The GtkListItem:item property is not NULL.

Hierarchy

hierarchy this GtkListItem ancestor_0 GObject ancestor_0--this

Ancestors

  • GObject

Instance methods

gtk_list_item_get_activatable

Checks if a list item has been set to be activatable via gtk_list_item_set_activatable().

gtk_list_item_get_child

Gets the child previously set via gtk_list_item_set_child() or NULL if none was set.

gtk_list_item_get_item

Gets the model item that associated with self.

gtk_list_item_get_position

Gets the position in the model that self currently displays.

gtk_list_item_get_selectable

Checks if a list item has been set to be selectable via gtk_list_item_set_selectable().

gtk_list_item_get_selected

Checks if the item is displayed as selected.

gtk_list_item_set_activatable

Sets self to be activatable.

gtk_list_item_set_child

Sets the child to be used for this listitem.

gtk_list_item_set_selectable

Sets self to be selectable.

Properties

Gtk.ListItem:activatable

If the item can be activated by the user.

Gtk.ListItem:child

Widget used for display.

Gtk.ListItem:item

Displayed item.

Gtk.ListItem:position

Position of the item.

Gtk.ListItem:selectable

If the item can be selected by the user.

Gtk.ListItem:selected

If the item is currently selected.

Class structure

struct GtkListItemClass {
  /* no available fields */
}