simvx.core.document¶
File-backed text documents with dirty tracking and a buffer registry.
Module Contents¶
Classes¶
File-backed text document with dirty tracking. |
|
Manages open documents with deduplication. |
Data¶
API¶
- class simvx.core.document.Document(path: pathlib.Path | str | None = None, encoding: str = 'utf-8')[source]¶
File-backed text document with dirty tracking.
Initialization
- property content: str¶
- property dirty: bool¶
- property title: str¶
- class simvx.core.document.BufferRegistry[source]¶
Manages open documents with deduplication.
Initialization
- open(path: pathlib.Path | str) simvx.core.document.Document[source]¶
Open a file, deduplicating by resolved path.
- create(content: str = '') simvx.core.document.Document[source]¶
Create a new untitled buffer.
- close(doc: simvx.core.document.Document) bool[source]¶
Close a document. Returns False if dirty (caller should prompt).
- property active: simvx.core.document.Document | None¶
- property buffers: list[simvx.core.document.Document]¶
- property has_dirty: bool¶