simvx.core.ui.markers¶
Text marker management for the code editor widget.
Provides inline markers (error squiggles, warnings, breakpoints, bookmarks), hover tooltip state, and marker drawing routines.
Module Contents¶
Classes¶
Mixin providing marker management and rendering for a code editor. |
Data¶
API¶
- simvx.core.ui.markers.__all__¶
[‘TextMarker’, ‘_MARKER_COLOURS’]
- class simvx.core.ui.markers.TextMarker[source]¶
- line: int¶
None
- col_start: int¶
None
- col_end: int¶
None
- type: str¶
‘error’
- colour: tuple[float, float, float, float]¶
(1.0, 0.2, 0.2, 0.6)
- tooltip: str = <Multiline-String>¶
- class simvx.core.ui.markers.MarkerMixin[source]¶
Mixin providing marker management and rendering for a code editor.
The host class (
CodeTextEdit) supplies the line buffer, scroll offset, font metrics, and several Control helpers; those members are declared below underTYPE_CHECKINGso the type checker sees the contract without creating runtime attributes.- add_marker(line: int, col_start: int, col_end: int, type: str = 'error', colour: tuple[float, float, float, float] | None = None, tooltip: str = '') simvx.core.ui.markers.TextMarker[source]¶
Add an inline marker (error squiggle, warning, etc.).
- remove_marker(marker: simvx.core.ui.markers.TextMarker)[source]¶
Remove a specific marker.
- clear_markers(type: str | None = None)[source]¶
Clear all markers, or only markers of a specific type.
- get_markers(line: int | None = None) list[simvx.core.ui.markers.TextMarker][source]¶
Get all markers, or only markers on a specific line.