gtk.list_item
Module for [ListItem] class
Types 3
classListItem : gobject.object.ObjectWrap
[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:
- 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.
- The bound stage where the listitem references an item from the list.
The [gtk.list_item.ListItem.item] property is not null.
Methods
ListItem self()Returns `this`, for use in `with` statements.ListItemGidBuilder builder()Get builder for [gtk.list_item.ListItem] Returns: New builder objectstring 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.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.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.string getAccessibleDescription()Gets the accessible description of self. Returns: the accessible descriptionstring getAccessibleLabel()Gets the accessible label of self. Returns: the accessible labelbool getActivatable()Checks if a list item has been set to be activatable via [gtk.list_item.ListItem.setActivatable]. Returns: true if the item is activatablegtk.widget.Widget getChild()Gets the child previously set via [gtk.list_item.ListItem.setChild] or null if none was set. Returns: The childbool getFocusable()Checks if a list item has been set to be focusable via [gtk.list_item.ListItem.setFocusable]. Returns: true if the item is focusablegobject.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.Methods
T accessibleDescription(string propval)Set `accessibleDescription` property. Params: propval = The accessible description to set on the list item. Returns: Builder instance for fluent chainingT accessibleLabel(string propval)Set `accessibleLabel` property. Params: propval = The accessible label to set on the list item. Returns: Builder instance for fluent chainingT activatable(bool propval)Set `activatable` property. Params: propval = If the item can be activated by the user. Returns: Builder instance for fluent chainingT child(gtk.widget.Widget propval)Set `child` property. Params: propval = Widget used for display. Returns: Builder instance for fluent chainingT focusable(bool propval)Set `focusable` property. Params: propval = If the item can be focused with the keyboard. Returns: Builder instance for fluent chainingT selectable(bool propval)Set `selectable` property. Params: propval = If the item can be selected by the user. Returns: Builder instance for fluent chainingFluent builder for [gtk.list_item.ListItem]
Methods
ListItem build()