ComboRow

@Composable
fun ComboRow(items: List<String>, selectedIndex: Int, title: String, onSelectedChange: (Int) -> Unit, modifier: Modifier = Modifier, activatable: Boolean = true, titleSelectable: Boolean = false, useMarkup: Boolean = true, useUnderline: Boolean = false, subtitle: String? = null, subtitleLines: Int = 0, subtitleSelectable: Boolean = false, titleLines: Int = 0)

Creates a org.gnome.adw.ComboRow used to choose from a list of items.

Parameters

items

The list of string options to display in the combo box.

selectedIndex

The index of the currently selected item.

title

The title displayed on the row.

modifier

Compose Modifier for layout and styling.

onSelectedChange

Callback invoked when the selected item changes, providing the new index.

activatable

Whether the row can be activated (affects focus and accessibility).

titleSelectable

Whether the user can select the title text.

useMarkup

Whether the title and subtitle use Pango markup.

useUnderline

Whether an underscore in the title or subtitle indicates a mnemonic.

subtitle

Optional subtitle displayed below the title.

subtitleLines

The number of lines after which the subtitle is ellipsized (0 = no limit).

subtitleSelectable

Whether the user can select the subtitle text.

titleLines

The number of lines after which the title is ellipsized (0 = no limit).


@Composable
fun <T : GObject> ComboRow(model: SingleSelection<T>, onSelectedChange: (selectedItem: T) -> Unit, item: @Composable (T) -> Unit, title: String, modifier: Modifier = Modifier, activatable: Boolean = true, titleSelectable: Boolean = false, useMarkup: Boolean = true, useUnderline: Boolean = false, subtitle: String? = null, subtitleLines: Int = 0, subtitleSelectable: Boolean = false, titleLines: Int = 0, selectedItem: @Composable (T) -> Unit = { item(it) })

Creates a org.gnome.adw.ComboRow used to choose from a list of items.

Parameters

T

The org.gnome.gobject.GObject type used by the model.

model

A SingleSelection wrapping the list model containing the available items.

onSelectedChange

Callback invoked when the selected item changes, providing the new T instance.

item

Composable used to render each item in the dropdown list.

title

The title displayed on the row.

modifier

Compose Modifier for layout and styling.

activatable

Whether the row can be activated (affects focus and accessibility).

titleSelectable

Whether the user can select the title text.

useMarkup

Whether the title and subtitle use Pango markup.

useUnderline

Whether an underscore in the title or subtitle indicates a mnemonic.

subtitle

Optional subtitle displayed below the title.

subtitleLines

The number of lines after which the subtitle is ellipsized (0 = no limit).

subtitleSelectable

Whether the user can select the subtitle text.

titleLines

The number of lines after which the title is ellipsized (0 = no limit).

selectedItem

Optional composable used to render the currently selected item in the collapsed state, by default, it reuses item.