v0.2.0: Text renderable with word-wrap and inline spans
- Text class with content, fg/bg, wrap-mode (:word or :none) - Span class for inline styled segments (bold, italic, etc.) - render-text dispatches through backend's draw-text - word-wrap function splits text at word boundaries - split-string utility for whitespace tokenization - 9 new tests: creation, content, empty, truncation, word-wrap, single-word, span creation, span storage - modern-backend now accepts :output-stream - ASDF updated with text component - 28 total component tests, 100% GREEN
This commit is contained in:
@@ -1,9 +1,21 @@
|
||||
(defpackage :cl-tui.box
|
||||
(:use :cl :cl-tui.backend :cl-tui.layout)
|
||||
(:export
|
||||
;; Box
|
||||
#:box #:make-box
|
||||
#:box-layout-node
|
||||
#:box-border-style #:box-title #:box-title-align
|
||||
#:box-fg #:box-bg
|
||||
#:render-box))
|
||||
#:render-box
|
||||
;; Span
|
||||
#:span
|
||||
#:span-text #:span-bold #:span-italic #:span-underline
|
||||
#:span-reverse #:span-dim #:span-fg #:span-bg
|
||||
;; Text
|
||||
#:text #:make-text
|
||||
#:text-layout-node #:text-content #:text-spans
|
||||
#:text-fg #:text-bg #:text-wrap-mode
|
||||
#:render-text
|
||||
;; Utilities (for tests)
|
||||
#:word-wrap #:split-string))
|
||||
(in-package :cl-tui.box)
|
||||
|
||||
Reference in New Issue
Block a user