module LTerm_text:sig
..end
typet =
(CamomileLibrary.UChar.t * LTerm_style.t) array
val of_string : Zed_utf8.t -> t
val to_string : t -> Zed_utf8.t
val of_string_maybe_invalid : string -> t
\yXX
.val of_rope : Zed_rope.t -> t
val to_rope : t -> Zed_rope.t
val stylise : string -> LTerm_style.t -> t
stylise string style
creates a styled string with all styles
set to style
.val stylise_parenthesis : t ->
?paren:(CamomileLibrary.UChar.t * CamomileLibrary.UChar.t) list ->
int -> LTerm_style.t -> unit
stylise_parenthesis text ?paren pos style
searchs for
parenthesis group starting or ending at pos
and apply them the
style style
. paren
is the list of parenthesis recognized.type
item =
| |
S of |
(* |
A UTF-8 encoded string.
| *) |
| |
R of |
(* |
A rope.
| *) |
| |
B_bold of |
(* |
Begins bold mode.
| *) |
| |
E_bold |
(* |
Ends bold mode.
| *) |
| |
B_underline of |
(* |
Begins underlined mode.
| *) |
| |
E_underline |
(* |
Ends underlined mode.
| *) |
| |
B_blink of |
(* |
Begins blinking mode.
| *) |
| |
E_blink |
(* |
Ends blinking mode.
| *) |
| |
B_reverse of |
(* |
Begins reverse video mode.
| *) |
| |
E_reverse |
(* |
Ends reverse video mode.
| *) |
| |
B_fg of |
(* |
Begins foreground color.
| *) |
| |
E_fg |
(* |
Ends foreground color.
| *) |
| |
B_bg of |
(* |
Begins background color.
| *) |
| |
E_bg |
(* |
Ends background color.
| *) |
typemarkup =
item list
val eval : markup -> t
eval makrup
evaluates a markup strings as a styled string.