ListItem

open class ListItem(pointer: <Error class: unknown class><<Error class: unknown class>>)

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 method@Gtk.ListItem.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 property@Gtk.ListItem:item property is set to null.

  2. The bound stage where the listitem references an item from the list. The property@Gtk.ListItem:item property is not null.

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

If the item can be activated by the user.

Link copied to clipboard
open var child: Widget?

Widget used for display.

Link copied to clipboard
val gtkListItemPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val item: <Error class: unknown class>?

Displayed item.

Link copied to clipboard
open val position: <Error class: unknown class>

Position of the item.

Link copied to clipboard

If the item can be selected by the user.

Link copied to clipboard
open val selected: Boolean

If the item is currently selected.

Functions

Link copied to clipboard

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

Link copied to clipboard
open fun getChild(): Widget?

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

Link copied to clipboard
open fun getItem(): <Error class: unknown class>?

Gets the model item that associated with @self.

Link copied to clipboard
open fun getPosition(): <Error class: unknown class>

Gets the position in the model that @self currently displays.

Link copied to clipboard

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

Link copied to clipboard
open fun getSelected(): Boolean

Checks if the item is displayed as selected.

Link copied to clipboard
open fun setActivatable(activatable: Boolean)

Sets @self to be activatable.

Link copied to clipboard
open fun setChild(child: Widget? = null)

Sets the child to be used for this listitem.

Link copied to clipboard
open fun setSelectable(selectable: Boolean)

Sets @self to be selectable.