ControlledListView

@Composable
fun <T : GObject> ControlledListView(selectedItems: Set<Int>, items: List<T>, modifier: Modifier = Modifier, enableRubberband: Boolean = false, singleClickActivate: Boolean = false, showSeparators: Boolean = false, tabBehaviour: ListTabBehavior = ListTabBehavior.ALL, onActivate: (position: Int) -> Unit? = null, onSelectionChange: (positions: Set<Int>) -> Unit? = null, child: @Composable (item: T) -> Unit)

Creates a controlled multiple selection org.gnome.gtk.ListView.

Parameters

selectedItems

Selected indexes in the list.

items

The items to be listed.

modifier

Compose Modifier for layout and styling.

enableRubberband

Whether selection can be changed by dragging with the mouse.

singleClickActivate

Whether rows should be activated on single click and selected on hover.

showSeparators

Show separators between rows.

tabBehaviour

How the Tab key behaves.

onActivate

Callback triggered when a row is activated.

onSelectionChange

Callback triggered when selections are made.

child

Composable child representing a row.


@Composable
fun <T : GObject> ControlledListView(selectedItem: Int?, items: List<T>, modifier: Modifier = Modifier, enableRubberband: Boolean = false, singleClickActivate: Boolean = false, showSeparators: Boolean = false, tabBehaviour: ListTabBehavior = ListTabBehavior.ALL, onActivate: (position: Int) -> Unit? = null, onSelectionChange: (positions: Int?) -> Unit? = null, child: @Composable (item: T) -> Unit)

Creates a controlled single selection org.gnome.gtk.ListView.

Parameters

selectedItem

Selected index in the list.

items

The items to be listed.

modifier

Compose Modifier for layout and styling.

enableRubberband

Whether selection can be changed by dragging with the mouse.

singleClickActivate

Whether rows should be activated on single click and selected on hover.

showSeparators

Show separators between rows.

tabBehaviour

How the Tab key behaves.

onActivate

Callback triggered when a row is activated.

onSelectionChange

Callback triggered when a selection is made.

child

Composable child representing a row.


@Composable
fun <T : GObject> ControlledListView(items: List<T>, modifier: Modifier = Modifier, enableRubberband: Boolean = false, singleClickActivate: Boolean = false, showSeparators: Boolean = false, tabBehaviour: ListTabBehavior = ListTabBehavior.ALL, onActivate: (position: Int) -> Unit? = null, child: @Composable (item: T) -> Unit)

Creates a controlled no selection org.gnome.gtk.ListView.

Parameters

items

The items to be listed.

modifier

Compose Modifier for layout and styling.

enableRubberband

Whether selection can be changed by dragging with the mouse.

singleClickActivate

Whether rows should be activated on single click and selected on hover.

showSeparators

Show separators between rows.

tabBehaviour

How the Tab key behaves.

onActivate

Callback triggered when a row is activated.

child

Composable child representing a row.