package toffee

Build not yet checked
  1. Overview
  2. Docs
CSS layout engine for OCaml (Flexbox, Grid, Block)

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mosaic-0.3.0.tbz
sha256=a92cbbcbe016fb19fb0a749222da0e459a9567aef3f4c7340d9bd6b71c53ed6f
sha512=6a7ab054605538bb31a2b73a1a6d093981a2704c9f0af5852221c05735290d74aca7c7282298c4d0f91e86a800e2ccd94b4918af883cd963449c758eb6b272b3

doc/toffee.tree/Toffee_tree/Scrollable_overflow/index.html

Module Toffee_tree.Scrollable_overflowSource

A box's scrollable overflow area.

The rectangle a box's content reaches, relative to the box's padding-box origin (its inner border edge), with the direction of its scroll origin in each axis. In a non-reversed axis the scroll origin is at the start (left or top) and only the end edge is reachable by scrolling; in a reversed axis (a row-reverse flex container's horizontal axis, for one) the origin is at the end and the content reaches before it.

The rectangle always contains the origin. A scroll container's area is clipped to what scrolling can reach; another box's area is all of its content's overflow, which it propagates to its parent.

Sourcetype t

A scrollable overflow area.

Sourceval zero : t

zero is the empty area at the origin, with no reversed axis.

Sourceval make : Toffee_geometry.Rectf.t -> reversed_x:bool -> reversed_y:bool -> t

make rect ~reversed_x ~reversed_y is the area rect, which must contain the origin, with the given scroll origin directions.

rect t is the rectangle of t.

packed t is the rectangle of t with its right and bottom edges negated in its reversed axes, the form t is stored in: equal bit for bit exactly when the areas are.

Sourceval left : t -> float

left t is the left edge of t: zero or less.

Sourceval right : t -> float

right t is the right edge of t: zero or more.

Sourceval top : t -> float

top t is the top edge of t: zero or less.

Sourceval bottom : t -> float

bottom t is the bottom edge of t: zero or more.

Sourceval reversed_x : t -> bool

reversed_x t is true if the horizontal scroll origin of t is at the right.

Sourceval reversed_y : t -> bool

reversed_y t is true if the vertical scroll origin of t is at the bottom.

Sourceval equal : t -> t -> bool

equal a b is true if a and b are the same area with the same scroll origins.

Sourceval compare : t -> t -> int

compare a b orders areas by their rectangles, then their scroll origins.

Sourceval to_string : t -> string

to_string t is a human-readable form of t.