package hardcaml_waveterm

  1. Overview
  2. Docs

Module Draw.MakeSource

Construct the API from a Primitives implementation

Parameters

module B : Primitives

Signature

type ctx = B.ctx

drawing context

type style

underlying style type

val rows : ctx -> Base.Int.t
val cols : ctx -> Base.Int.t
val get_bounds : ctx -> rect

get context size

val get_style : Style.t -> style

convert our style info to underlying style

Sourceval clear : ctx -> Base.Unit.t

clear display

Sourceval fill : ctx:ctx -> style:style -> bounds:rect -> Base.Char.t -> Base.Unit.t

fill bounds with char given style

val draw_int : ctx:ctx -> style:style -> bounds:rect -> r:Base.Int.t -> c:Base.Int.t -> Base.Int.t -> Base.Unit.t

draw int (representing unicode value)

Sourceval draw_piece : ctx:ctx -> style:style -> bounds:rect -> r:Base.Int.t -> c:Base.Int.t -> piece -> Base.Unit.t

draw piece

Sourceval draw_char : ctx:ctx -> style:style -> bounds:rect -> r:Base.Int.t -> c:Base.Int.t -> Base.Char.t -> Base.Unit.t

draw char

Sourceval draw_string : ctx:ctx -> style:style -> bounds:rect -> r:Base.Int.t -> c:Base.Int.t -> Base.String.t -> Base.Unit.t

draw string (nothing fancy - horizontal, no breaks)

Sourceval draw_box : ctx:ctx -> style:style -> bounds:rect -> Base.String.t -> Base.Unit.t

draw box outline with label

val get : ctx:ctx -> bounds:rect -> r:Base.Int.t -> c:Base.Int.t -> Base.Int.t * Style.t

get value and style at point

Sourceval inv : ctx:ctx -> bounds:rect -> r:Base.Int.t -> c:Base.Int.t -> Base.Unit.t

invert fg and bg at point

Sourceval bold : ctx:ctx -> bounds:rect -> r:Base.Int.t -> c:Base.Int.t -> Base.Unit.t

set bold on point