Egui::Ecss::Session
Inherits Reference < Object
The live debug session: owns the document, mirrors every edit
into the Context (class rules → StyleSheet#rule, element
overrides → Context#set_id_style) and reloads the file when it
changes on disk (Context#begin_frame). Nothing is written to
disk automatically — saving is explicit, the inspector header's
«Сохранить» button (#flush(force: true)). Started by
Sokol.run in debug builds via .enable; the app opts in with
the enable_ecss macro.
Constructors
Instance methods
Write the document to disk. The ONLY caller is the inspector
header's «Сохранить» button (force: true) — recording an edit
(#record_* / #unset_*) just marks the document dirty; the
file stays untouched until the user saves.
Hot reload: stat the file; an mtime/size change since the last load/write replays the journal backwards (removing keys deleted from the file) and applies the fresh document.
A theme swap replaced the whole StyleSheet — bring the class
rules over to the new sheet (element overrides live on the
Context and survive, re-applying them is an idempotent no-op).
One class-rule edit (selector "button" / "button:hover"): applied to the stylesheet, recorded into the document, file marked dirty — flushed to disk at the end of the frame.
One class-rule key removal; a no-op on the file when the key was never part of the diff (un-setting an app-defined rule).