simvx.core.ui.find_replace

Find and replace controller for the code editor widget.

Manages find bar state, search execution, match navigation, replace operations, keyboard/mouse routing, and bar rendering.

Module Contents

Classes

FindReplaceMixin

Mixin providing find/replace functionality for a code editor.

API

class simvx.core.ui.find_replace.FindReplaceMixin[source]

Mixin providing find/replace functionality for a code editor.

Expects the host class to have: - _lines: list[str] - _cursor_line: int, _cursor_col: int - _select_start, _select_end - _has_selection(), _get_selection_text() - _ensure_cursor_visible() - font_size: float - focused: bool - queue_redraw() - text_changed signal - find_opened / find_closed signals - _invalidate_cache(line) - get_global_rect() - get_theme() - text property

replace_current()[source]

Replace current match and advance to next.

replace_all()[source]

Replace all matches (iterate in reverse to preserve positions).