Rename: cl-tty avoids naming collision with Quicklisp's cl-tui (naryl/cl-tui, a cl-charms-based ncurses library). Our project is pure escape-sequence CL. v0.9.0 adds: - Dialog base class: modal overlay with backdrop, centered panel, size variants (:small/:medium/:large), stack-based management - Dialog subclasses: alert, confirm, select-dialog, prompt-dialog - Toast notifications: transient, top-right corner, auto-dismiss, colored variants (info/success/warning/error) - 78 tests total, 100% passing ASDF: read-time package references (+fiveam:+) replaced with find-symbol so .asd loads without FiveAM pre-loaded
29 lines
957 B
Common Lisp
29 lines
957 B
Common Lisp
;; demo.lisp — minimal cl-tty demo
|
|
(load "/root/quicklisp/setup.lisp")
|
|
(ql:quickload :fiveam :silent t)
|
|
(load "backend/package.lisp")
|
|
(load "backend/classes.lisp")
|
|
(load "backend/simple.lisp")
|
|
(load "backend/modern.lisp")
|
|
(load "layout/layout.lisp")
|
|
(load "src/components/package.lisp")
|
|
(load "src/components/dirty.lisp")
|
|
(load "src/components/box.lisp")
|
|
(load "src/components/text.lisp")
|
|
(load "src/components/render.lisp")
|
|
(in-package :cl-tty.box)
|
|
|
|
;; Demo 1: Simple backend (ASCII)
|
|
(let* ((b (make-simple-backend))
|
|
(bx (make-box :border-style :rounded :title " Hello World " :width 30 :height 5)))
|
|
(compute-layout (box-layout-node bx) 30 5)
|
|
(render bx b))
|
|
|
|
;; Demo 2: Box with text inside
|
|
(let* ((b (make-simple-backend))
|
|
(tx (make-text "This is cl-tty in action!" :width 28 :height 1)))
|
|
(setf (layout-node-direction (text-layout-node tx)) :column)
|
|
(compute-layout (text-layout-node tx) 28 1)
|
|
(render tx b)
|
|
(format t "~%~%"))
|