simvx.core.ui.folding

Code folding manager for the code editor widget.

Provides indent-based fold region detection, fold/unfold operations, and visible-line computation for folded views.

Module Contents

Classes

FoldingMixin

Mixin providing code folding for a code editor.

API

class simvx.core.ui.folding.FoldingMixin[source]

Mixin providing code folding for a code editor.

The host class (CodeTextEdit) supplies the line buffer, cursor position, and token-cache invalidation; those members are declared below under TYPE_CHECKING so the type checker sees the contract without creating runtime attributes.

fold_at_line(line: int)[source]

Fold the region starting at the given line.

unfold_at_line(line: int)[source]

Unfold the region at the given line.

toggle_fold(line: int)[source]

Toggle fold state at the given line.

unfold_all()[source]

Unfold all regions.