From f2529886bfbc14d061f68a7654857a746b76ebc9 Mon Sep 17 00:00:00 2001 From: Joseph Bryan Date: Tue, 26 Jul 2016 16:53:45 -0400 Subject: [PATCH] adds styled text molds to ++dill-blit --- arvo/dill.hoon | 13 +++++++++++++ arvo/zuse.hoon | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/arvo/dill.hoon b/arvo/dill.hoon index c73b0758b..944a1a8ca 100644 --- a/arvo/dill.hoon +++ b/arvo/dill.hoon @@ -180,6 +180,19 @@ [%lin see] [%hop pos] == + ?: ?=($klr -.bit) + =/ out/(list @c) + %- zing + %+ turn p.bit + |= a/_?>(?=(^ p.bit) i.p.bit) + ~& [p.a (tufa q.a)] + q.a + %+ done %blit + :~ [%lin out] + [%mor ~] + [%lin see] + [%hop pos] + == ?: ?=($pro -.bit) (done(see p.bit) %blit [[%lin p.bit] [%hop pos] ~]) ?: ?=($hop -.bit) diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 9b44fc4dd..c80e065d7 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -2327,6 +2327,7 @@ cip/(each @if @is) :: client IP cum/(map @tas *) :: custom dirt == :: +++ deco ?($~ $bl $br $un) :: text decoration ++ deed {p/@ q/step r/?} :: sig stage fake? ++ dome :: project state $: ank/ankh :: state @@ -2609,9 +2610,15 @@ ++ sock {p/ship q/ship} :: outgoing [from to] ++ spur path :: ship desk case spur ++ step {p/bray q/gens r/pass} :: identity stage +++ stub (list (pair styd (list @c))) :: styled tuba +++ styd (pair (set deco) (pair tint tint)) :: decos/bg/fg +++ styl :: + (pair (unit deco) (pair (unit tint) (unit tint))) :: cascading styd +++ styx (list $@(@t (pair styl styx))) :: styled text ++ suba (list {p/path q/misu}) :: delta ++ tako @ :: yaki ref ++ tick @ud :: process id +++ tint ?($~ $r $g $b $c $m $y $k $w) :: text color ++ toro {p/@ta q/nori} :: general change ++ town :: all security state $: lit/@ud :: imperial modulus @@ -2750,6 +2757,7 @@ ++ dill-blit :: new blit $% {$bel $~} :: make a noise {$clr $~} :: clear the screen + {$klr p/stub} :: styled text {$hop p/@ud} :: set cursor position {$mor p/(list dill-blit)} :: multiple blits {$pro p/(list @c)} :: show as cursor+line