Sets our main struct and passes it to the parent class.
Creates a new GtkListView that uses the given @factory for mapping items to widgets.
Emitted when a row has been activated by the user, usually via activating the GtkListView|list.activate-item action.
Returns whether rows can be selected by dragging with the mouse.
Gets the factory that's currently used to populate list items.
Get the main Gtk struct
Gets the model that's currently used to read the items displayed.
Returns whether the list box should show separators between rows.
Returns whether rows will be activated on single click and selected on hover.
the main Gtk struct as a void*
Sets whether selections can be changed by dragging with the mouse.
Sets the GtkListItemFactory to use for populating list items.
Sets the model to use.
Sets whether the list box should show separators between rows.
Sets whether rows should be activated on single click and selected on hover.
the main Gtk struct
the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
GtkListView presents a large dynamic list of items.
GtkListView uses its factory to generate one row widget for each visible item and shows them in a linear display, either vertically or horizontally.
The [property@Gtk.ListView:show-separators] property offers a simple way to display separators between the rows.
GtkListView allows the user to select items according to the selection characteristics of the model. For models that allow multiple selected items, it is possible to turn on _rubberband selection_, using [property@Gtk.ListView:enable-rubberband].
If you need multiple columns with headers, see [class@Gtk.ColumnView].
To learn more about the list widget framework, see the overview.
An example of using GtkListView:
CSS nodes
GtkListView uses a single CSS node named listview. It may carry the .separators style class, when GtkListView:show-separators property is set. Each child widget uses a single CSS node named row. For rubberband selection, a node with name rubberband is used.
The main listview node may also carry style classes to select the style of list presentation: .rich-list, .navigation-sidebar or .data-table.
Accessibility
GtkListView uses the %GTK_ACCESSIBLE_ROLE_LIST role, and the list items use the %GTK_ACCESSIBLE_ROLE_LIST_ITEM role.