← API reference

//editor/com.aardarch.aardink.ui/FindReplacePanel

FindReplacePanel

@Composable

fun FindReplacePanel(state: FindReplaceState, onNext: () -> Unit, onPrev: () -> Unit, onReplace: () -> Unit, onReplaceAll: () -> Unit, onClose: () -> Unit, modifier: Modifier = Modifier)

Slide-down find/replace panel anchored to the top of the editor.

The panel mutates state directly. The host (typically CodeEditorLayout) is responsible for watching the state and re-running com.aardarch.aardink.core.FindEngine.findAll on changes.

Parameters

jvm

stateThe state holder backing this panel.
onNextUser pressed the “next match” arrow — host should scroll/select that match.
onPrevUser pressed the “previous match” arrow.
onReplaceReplace the current match with state.replacement.
onReplaceAllReplace every match in the document.
onCloseClose the panel (typically calls FindReplaceState.hide).