SearchEntry

@Composable
fun SearchEntry(text: String, onTextChange: (String) -> Unit, modifier: Modifier = Modifier, editable: Boolean = true, alignment: Float = 0.0f, enableUndo: Boolean = true, maxWidthChars: Int = -1, widthChars: Int = -1, onActivate: () -> Unit = {}, onSearchChange: () -> Unit = {}, onSearchStart: () -> Unit = {}, onSearchStop: () -> Unit = {}, onNextMatch: () -> Unit = {}, onPreviousMatch: () -> Unit = {}, inputHints: Set<InputHints> = setOf(InputHints.NONE), inputPurpose: InputPurpose = InputPurpose.FREE_FORM, placeholderText: String? = null, searchDelay: Int = 150)

Creates a org.gnome.gtk.SearchEntry, an entry with functionalities for searching.

Parameters

text

The text in the entry.

onTextChange

Callback triggered when the text is changed.

modifier

Compose Modifier for layout and styling.

editable

Whether the text can be edited.

alignment

The alignment for the contents of the entry.

enableUndo

Whether changes to this entry will be saved for undo/redo actions.

maxWidthChars

The desired maximum width of the entry, in characters.

widthChars

Number of characters to leave space for in the entry.

onActivate

Callback triggered when the entry is activated (for example: pressing the Enter key).

onSearchChange

Callback triggered when search changes with an added delay of searchDelay.

onSearchStart

Callback triggered when the user starts searching.

onSearchStop

Callback triggered when the user stops searching.

onNextMatch

Callback triggered when the user initiates a move to the next match.

onPreviousMatch

Callback triggered when the user initiates a move to the previous match.

inputHints

Additional hints which allow input methods to fine-tune their behavior.

inputPurpose

The input purpose which can be used by input methods to adjust their behavior.

placeholderText

The text displayed when the entry is empty and unfocused.

searchDelay

The delay in milliseconds from last keypress to the search changed signal.