fontlabapp.fontui.teaching_text.notebook.Notebook · declarations 001
Back to fontlabapp.fontui.teaching_text.notebook.Notebook
__init__
__init__() -> None
Initialize the owned controls and the local draft state.
decode
decode(text: str) -> None
Parse into a detached notebook; malformed input preserves existing data.
encode
encode() -> str
Return human-readable Unicode JSON; no executable serialization.
export
export(title: str) -> str
Export one committed snippet as Python text without executing it.
find
find(query: str) -> list[str]
Search titles and code without case sensitivity, in stable order.
navigate
navigate(current: str | None, delta: int) -> str
Wrap through sorted titles in either direction.
put
put(title: str, body: str, old: str | None = None) -> None
Add or rename a record; reject collisions before changing the mapping.
remove
remove(title: str) -> None
Remove only an existing committed record.