gtk.list_item

Module for [ListItem] class

Types 3

[gtk.list_item.ListItem] is used by list widgets to represent items in a [gio.list_model.ListModel].

[gtk.list_item.ListItem] 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 [gtk.list_item.ListItem.setChild].

[gtk.list_item.ListItem] 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 [gtk.list_item.ListItem.item] property is set to null.

  1. The bound stage where the listitem references an item from the list.

The [gtk.list_item.ListItem.item] property is not null.

Methods
GType _gType() @property
ListItem self()Returns `this`, for use in `with` statements.
ListItemGidBuilder builder()Get builder for [gtk.list_item.ListItem] Returns: New builder object
string accessibleDescription() @propertyGet `accessibleDescription` property. Returns: The accessible description to set on the list item.
void accessibleDescription(string propval) @propertySet `accessibleDescription` property. Params: propval = The accessible description to set on the list item.
string accessibleLabel() @propertyGet `accessibleLabel` property. Returns: The accessible label to set on the list item.
void accessibleLabel(string propval) @propertySet `accessibleLabel` property. Params: propval = The accessible label to set on the list item.
bool activatable() @propertyGet `activatable` property. Returns: If the item can be activated by the user.
void activatable(bool propval) @propertySet `activatable` property. Params: propval = If the item can be activated by the user.
gtk.widget.Widget child() @propertyGet `child` property. Returns: Widget used for display.
void child(gtk.widget.Widget propval) @propertySet `child` property. Params: propval = Widget used for display.
bool focusable() @propertyGet `focusable` property. Returns: If the item can be focused with the keyboard.
void focusable(bool propval) @propertySet `focusable` property. Params: propval = If the item can be focused with the keyboard.
gobject.object.ObjectWrap item() @propertyGet `item` property. Returns: Displayed item.
uint position() @propertyGet `position` property. Returns: Position of the item.
bool selectable() @propertyGet `selectable` property. Returns: If the item can be selected by the user.
void selectable(bool propval) @propertySet `selectable` property. Params: propval = If the item can be selected by the user.
bool selected() @propertyGet `selected` property. Returns: If the item is currently selected.
string getAccessibleDescription()Gets the accessible description of self. Returns: the accessible description
string getAccessibleLabel()Gets the accessible label of self. Returns: the accessible label
bool getActivatable()Checks if a list item has been set to be activatable via [gtk.list_item.ListItem.setActivatable]. Returns: true if the item is activatable
gtk.widget.Widget getChild()Gets the child previously set via [gtk.list_item.ListItem.setChild] or null if none was set. Returns: The child
bool getFocusable()Checks if a list item has been set to be focusable via [gtk.list_item.ListItem.setFocusable]. Returns: true if the item is focusable
gobject.object.ObjectWrap getItem()Gets the model item that associated with self.
uint getPosition()Gets the position in the model that self currently displays.
bool getSelectable()Checks if a list item has been set to be selectable via [gtk.list_item.ListItem.setSelectable].
bool getSelected()Checks if the item is displayed as selected.
void setAccessibleDescription(string description)Sets the accessible description for the list item, which may be used by e.g. screen readers.
void setAccessibleLabel(string label)Sets the accessible label for the list item, which may be used by e.g. screen readers.
void setActivatable(bool activatable)Sets self to be activatable.
void setChild(gtk.widget.Widget child = null)Sets the child to be used for this listitem.
void setFocusable(bool focusable)Sets self to be focusable.
void setSelectable(bool selectable)Sets self to be selectable.
Constructors
this(void * ptr, Flag!"Take" take)
Methods
T accessibleDescription(string propval)Set `accessibleDescription` property. Params: propval = The accessible description to set on the list item. Returns: Builder instance for fluent chaining
T accessibleLabel(string propval)Set `accessibleLabel` property. Params: propval = The accessible label to set on the list item. Returns: Builder instance for fluent chaining
T activatable(bool propval)Set `activatable` property. Params: propval = If the item can be activated by the user. Returns: Builder instance for fluent chaining
T child(gtk.widget.Widget propval)Set `child` property. Params: propval = Widget used for display. Returns: Builder instance for fluent chaining
T focusable(bool propval)Set `focusable` property. Params: propval = If the item can be focused with the keyboard. Returns: Builder instance for fluent chaining
T selectable(bool propval)Set `selectable` property. Params: propval = If the item can be selected by the user. Returns: Builder instance for fluent chaining

Fluent builder for [gtk.list_item.ListItem]

Methods
ListItem build()