package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.List_item

type t = [ `list_item | `object_ ] Gobject.obj
val set_selectable : t -> bool -> unit

Sets @self to be selectable.

If an item is selectable, clicking on the item or using the keyboard will try to select or unselect the item. If this succeeds is up to the model to determine, as it is managing the selected state.

Note that this means that making an item non-selectable has no influence on the selected state at all. A non-selectable item may still be selected.

By default, list items are selectable. When rebinding them to a new item, they will also be reset to be selectable by GTK.

val set_focusable : t -> bool -> unit

Sets @self to be focusable.

If an item is focusable, it can be focused using the keyboard. This works similar to method@Gtk.Widget.set_focusable.

Note that if items are not focusable, the keyboard cannot be used to activate them and selecting only works if one of the listitem's children is focusable.

By default, list items are focusable.

val set_child : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj option -> unit

Sets the child to be used for this listitem.

This function is typically called by applications when setting up a listitem so that the widget can be reused when binding it multiple times.

val set_activatable : t -> bool -> unit

Sets @self to be activatable.

If an item is activatable, double-clicking on the item, using the Return key or calling gtk_widget_activate() will activate the item. Activating instructs the containing view to handle activation. `GtkListView` for example will be emitting the signal@Gtk.ListView::activate signal.

By default, list items are activatable.

val set_accessible_label : t -> string -> unit

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

val set_accessible_description : t -> string -> unit

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

val get_selected : t -> bool

Checks if the item is displayed as selected.

The selected state is maintained by the liste widget and its model and cannot be set otherwise.

val get_selectable : t -> bool

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

Do not confuse this function with method@Gtk.ListItem.get_selected.

val get_position : t -> int

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

If @self is unbound, %GTK_INVALID_LIST_POSITION is returned.

val get_item : t -> [ `object_ ] Gobject.obj option

Gets the model item that associated with @self.

If @self is unbound, this function returns %NULL.

val get_focusable : t -> bool

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

val get_child : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj option

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

val get_activatable : t -> bool

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

val get_accessible_label : t -> string

Gets the accessible label of @self.

val get_accessible_description : t -> string

Gets the accessible description of @self.