package inquire
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=0b88d89e24d4cbc0560a7c8d8ec51388990e1b27f24685029997afa52a7c720f
sha512=8b62860a8d15e41528a404a6f1b9968c3d79755607b5ea319af2e3e45516e672a785361d278279910928db4054e1800e87bcee0210ff3eabfb330713b368c827
doc/inquire.lambda-term/LTerm_draw/index.html
Module LTerm_draw
Drawing
type elem = {char : Zed_char.t;(*The Zed_char.t character.
*)bold : bool;(*Whether the character is in bold or not.
*)underline : bool;(*Whether the character is underlined or not.
*)blink : bool;(*Whether the character is blinking or not.
*)reverse : bool;(*Whether the character is in reverse video mode or not.
*)foreground : LTerm_style.color;(*The foreground color.
*)background : LTerm_style.color;(*The background color.
*)
}Type of a element in a matrix of styled characters.
type matrix = point array arrayType of a matrix of points. The matrix is indexed by lines then columns, i.e. to access the point at line l and column c in matrix m you should use m.(l).(c).
val make_matrix : LTerm_geom.size -> matrixmatrix size creates a matrix of the given size containing only blank characters.
val set_style : point -> LTerm_style.t -> unitset_style point style sets fields of point according to fields of style. For example:
set_style point { LTerm_style.none with LTerm_style.bold = Some true }will have the following effect:
point.bold <- trueval context : matrix -> LTerm_geom.size -> contextcontext m s creates a context from a matrix m of size s. It raises Invalid_argument if s is not the size of m.
Exception raised when trying to access a point that is outside the bounds of a context.
val size : context -> LTerm_geom.sizesize ctx returns the size of the given context.
val sub : context -> LTerm_geom.rect -> contextsub ctx rect creates a sub-context from the given context. It raises Out_of_bounds if the rectangle is not contained in the given context.
val clear : context -> unitclear ctx clears the given context. It resets all styles to their default and sets characters to spaces.
val fill : context -> ?style:LTerm_style.t -> Zed_char.t -> unitfill ctx ch fills the given context with ch.
val fill_style : context -> LTerm_style.t -> unitfill_style style fills the given context with style.
point ctx row column returns the point at given position in ctx. It raises Out_of_bounds if the coordinates are outside the given context.
val draw_char_matrix :
matrix ->
int ->
int ->
?style:LTerm_style.t ->
Zed_char.t ->
unitdraw_char_matrix matrix row column ?style ch sets the character at given coordinates to ch. It does nothing if the given coordinates are outside the bounds of the context.
val draw_char :
context ->
int ->
int ->
?style:LTerm_style.t ->
Zed_char.t ->
unitdraw_char ctx row column ?style ch sets the character at given coordinates to ch. It does nothing if the given coordinates are outside the bounds of the context.
val draw_string :
context ->
int ->
int ->
?style:LTerm_style.t ->
Zed_string.t ->
unitdraw_string ctx row column ?style str draws the given string at given coordinates. This does not affect styles. str may contains newlines.
val draw_styled :
context ->
int ->
int ->
?style:LTerm_style.t ->
LTerm_text.t ->
unitdraw_styled ctx row column ?style text draws the given styled text at given coordinates.
val draw_string_aligned :
context ->
int ->
LTerm_geom.horz_alignment ->
?style:LTerm_style.t ->
Zed_string.t ->
unitDraws a string with the given alignment.
val draw_styled_aligned :
context ->
int ->
LTerm_geom.horz_alignment ->
?style:LTerm_style.t ->
LTerm_text.t ->
unitDraws a styled string with the given aglienment.
Type of a piece, given by its four connection.
val draw_piece : context -> int -> int -> ?style:LTerm_style.t -> piece -> unitDraws a piece. It may modify pieces around it.
val draw_hline :
context ->
int ->
int ->
int ->
?style:LTerm_style.t ->
connection ->
unitdraw_hline ctx row column length connection draws an horizontal line.
val draw_vline :
context ->
int ->
int ->
int ->
?style:LTerm_style.t ->
connection ->
unitdraw_hline ctx row column length connection draws a vertical line.
val draw_frame :
context ->
LTerm_geom.rect ->
?style:LTerm_style.t ->
connection ->
unitDraws a rectangle.
val draw_frame_labelled :
context ->
LTerm_geom.rect ->
?style:LTerm_style.t ->
?alignment:LTerm_geom.horz_alignment ->
Zed_string.t ->
connection ->
unitDraws a rectangle with a label on the top row.