A simple, high performance text editor.
Tapping the search icon set FocusedElementID to find_bar (so the editor
stopped its IME sync), but the main-owned widget.Editor only grabs key
focus on its own click — the icon tap never touches it, so neither focus
nor the soft keyboard moved to the search input.
Main now watches the frame's FocusedElementID and, on the transition
into find_bar, issues key.FocusCmd{Tag: &findEditor} (once per open).
The widget's FocusEvent handler raises the soft keyboard on focus gain
(gioui.org/widget/editor.go), so the keyboard follows automatically;
w.Invalidate guarantees the frame in which the widget sees the FocusEvent.
Close needs no inverse action: the editor's TextField re-issues its own
FocusCmd because the renderer clears the focus dedup on frames where no
logic field is focused.
|
||
|---|---|---|
| .qwen | ||
| cmd/pad | ||
| doc | ||
| internal | ||
| scripts | ||
| .DS_Store | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||