package console

Build not yet checked
  1. Overview
  2. Docs
Colours, tables, trees and progress rows for the terminal

Install

dune-project
 Dependency

Authors

Maintainers

Sources

console-0.10.1.tbz
sha256=37ad65f6833c65814b0673f009f6b656c5194608ca03519da2e63e1051d54f6e
sha512=7677067f1a3244779cdbc5c90a8b0e1eba30c3fd58281584ea3d4c46c3e219eef0668588ca0e2938799c61a3fa831ce2146eac73717214d7baf96b497bfcd892

doc/console/Console/Room/index.html

Module Console.RoomSource

Where and when a view is laid out: its width, height, time and theme.

Where and when a view is laid out.

A room is what a View.fit part is given each time it is laid out: the width and the height that it may take, the time it is drawn at, and the theme and the character set of the formatter that prints it.

Sourcetype t = Console__.Ctx.t

The type for rooms.

Sourceval width : t -> int option

width r is the number of cells that a view may take on each line. It is None when nothing bounds the width, as in View.hcat without a room, View.width or View.to_string. The view then takes its natural width.

Sourceval height : t -> int option

height r is the number of lines that a view may take, or None when nothing bounds them.

Sourceval time : t -> float

time r is the number of seconds since the Display that draws the view started. It is 0. for a view printed once (View.pp, View.to_string, Display.print, and the last frame of a display).

Sourceval theme : t -> Theme.t

theme r is the theme of the formatter that the view is printed on (Theme.get).

Sourceval utf_8 : t -> bool

utf_8 r is true iff that formatter shows UTF-8 (Fmt.utf_8). Otherwise a view draws its glyphs in ASCII.

Sourceval pp : t Fmt.t

pp formats the width, the height and the time of a room, for debugging.