Skip to main content

Crate mathtex_editor_session

Crate mathtex_editor_session 

Source
Expand description

A complete math editor in one type: editor, keymap, typesetter, undo, clipboard and host box tokens.

Structs§

ClipboardData
A selection as the two clipboard flavors a host writes.
RenderCache
Typesets an editor once per revision and keeps the geometry until the caret state changes.
Session
An editor with keymap, typesetting, undo, clipboard, and host box tokens, driven by a few input calls.
TokenRegistry
Hands out host box tokens that were never minted or reserved before, from 1 up to MAX_HOST_TOKEN.
UndoStack
Bounded undo and redo history of editor snapshots, where any new step clears the redo side.
Update
What one session call did, for the host to act on.
View
A typeset editor state with the geometry to paint over it.

Enums§

PasteError
Why Session::paste_json pasted nothing.
TokenError
Why a host box token cannot be used or minted.

Constants§

DEFAULT_UNDO_LIMIT
Undo steps a crate::Session keeps unless the host sets another limit.