package oxbow
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=a637acaa0e19046cd65fff733874eb97
sha512=76230cbecd7510de7a05b5d1f335915ef7b6c4aa557d8dbfd23591606618d2cfa25082d17b93f2f4b53a118d1cbf6a80e4ad51cf0f099b4921fb83d6df0c9801
doc/oxbow.layout/Oxbow_layout/Strip/index.html
Module Oxbow_layout.StripSource
split ~total ~count is an int list of length count, where each element is equal to total / count. If total mod count <> 0 then total mod count elements are eqaul to (total / count) + 1.
columns ~consumes items groups items into columns. A new column starts at each item whose predecessor does not consume. The concatenation of the result is items.
val layout :
usable:int Oxbow_core.Rect.canonical ->
offset:int ->
('a * Item.t) list ->
('a * int Oxbow_core.Rect.canonical) listlayout ~usable ~offset items is the canonical-space geometry of items arranged as full-height columns on a horizontal strip, in order. Column width is the head item's width_fac * usable width (min 1); windows within a column split the height evenly. Strip x offset is subtracted, so rects may lie outside usable. Callers apply Gaps.post.
val scroll :
align:Oxbow_core.Align.t ->
viewport_w:int ->
max_offset:int ->
offset:int ->
col:(int * int) ->
intscroll ~align ~viewport_w ~max_offset ~offset ~col:(x, w) is the strip offset after applying align to the focused column col, where x is its strip-relative position (offset-0 placement minus the usable origin), w its width. max_offset is the strip-relative x of the last column. For Left and Visible the result is clamped to 0, max 0 max_offset, so stale offsets self-heal and the tail column can anchor at the left edge.