FindReplace view
A [`SearchField`] with a replacement field and the two replace actions.
A view survives a frame. Hold it in an Entity with cx.new(..) and reach it with .update(..).
use gpui_kit::controls::FindReplace;
Construct
new(ident: impl Into<Ident>, window: &mut Window, cx: &mut Context<Self>) -> SelfCommands
Need a Context, so they need a view.
set_count(count: HitCount, cx: &mut Context<Self>)
set_disabled(disabled: bool, cx: &mut Context<Self>)Queries
Only answer; they change nothing.
search_field() -> &Entity<SearchField>
replacement_input() -> &Entity<TextInput>
count(cx: &App) -> HitCount
replacement_text(cx: &App) -> SharedStringReports
The variants of the event it emits. It never applies the change itself.
- Search
- ReplacementChanged
- ReplaceOne
- ReplaceAll
Rendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.