yasmin_editor.editor_gui.document_state module

Helpers for document title and dirty-state tracking.

class yasmin_editor.editor_gui.document_state.EditorDirtyTracker

Bases: object

Track whether the current root model differs from the saved baseline.

is_dirty(root_model: StateMachine) bool

Return whether the provided root model differs from the baseline.

reset(root_model: StateMachine) None

Reset the saved baseline to the provided root model.

yasmin_editor.editor_gui.document_state.build_window_title(file_path: str | None, *, is_dirty: bool) str

Return the main-window title for the current document state.

yasmin_editor.editor_gui.document_state.document_display_name(file_path: str | None) str

Return the user-visible document name for the current file path.