package nottui

  1. Overview
  2. Docs

Module Nottui.GravitySource

Sourcetype direction = [
  1. | `Negative
  2. | `Neutral
  3. | `Positive
]

A gravity is a pair of directions along the horizontal and vertical axis.

Horizontal axis goes from left to right and vertical axis from top to bottom.

`Negative direction means left / top bounds, `Neutral means center and `Positive means right / bottom.

Sourceval pp_direction : Format.formatter -> direction -> unit

Printing directions

Sourcetype t

The gravity type is a pair of an horizontal and a vertical gravity

Sourceval pp : Format.formatter -> t -> unit

Printing gravities

Sourceval make : h:direction -> v:direction -> t

Make a gravity value from an horizontal and a vertical directions.

Sourceval default : t

Default (negative, aligning to the top-left) gravity.

Sourceval h : t -> direction

Get the horizontal direction

Sourceval v : t -> direction

Get the vertical direction

OCaml

Innovation. Community. Security.