;; 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 "~%~%"))