ListItem

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

GtkListItem is used by list widgets to represent items in a iface@Gio.ListModel.

GtkListItem objects 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.

GtkListItem objects 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.

Inheritors

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

The accessible description to set on the list item.

Link copied to clipboard

The accessible label to set on the list item.

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
open var focusable: Boolean

If the item can be focused with the keyboard.

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

Gets the accessible description of @self.

Link copied to clipboard

Gets the accessible label of @self.

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 getFocusable(): Boolean

Checks if a list item has been set to be focusable via gtk_list_item_set_focusable().

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 setAccessibleDescription(description: String)

Sets the accessible description for the list item, which may be used by e.g. screen readers.

Link copied to clipboard
open fun setAccessibleLabel(label: String)

Sets the accessible label for the list item, which may be used by e.g. screen readers.

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 setFocusable(focusable: Boolean)

Sets @self to be focusable.

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

Sets @self to be selectable.