- dirty-mixin class with dirty slot (initform t) - mark-clean clears dirty flag - mark-dirty sets dirty flag - 3 tests: default-dirty, clean, dirty-cycle - ROADMAP.org: v0.2.0 all tasks DONE - 31 component tests, 100% GREEN
15 lines
442 B
Common Lisp
15 lines
442 B
Common Lisp
(in-package :cl-tui.box)
|
|
|
|
;; ── Dirty Tracking ─────────────────────────────────────────────
|
|
|
|
(defclass dirty-mixin ()
|
|
((dirty :initform t :accessor dirty-p)))
|
|
|
|
(defgeneric mark-clean (component)
|
|
(:method ((c dirty-mixin))
|
|
(setf (dirty-p c) nil)))
|
|
|
|
(defgeneric mark-dirty (component)
|
|
(:method ((c dirty-mixin))
|
|
(setf (dirty-p c) t)))
|