GUI library for ocaml, with animations, based on SDL2
Library bogue
Module Bogue . Long_list
Dependency graph
type t
val create : w:int -> h:int -> length:int -> ?first:int -> generate:( int -> Layout.t ) -> ?height_fn:( int -> int option ) -> ?cleanup:( Layout.t -> unit ) -> ?max_memory:int -> ?linear:bool -> ?scrollbar_width:int -> unit -> Layout.t

Create a long list through the function generate which maps any index i to the ieth element (layout) of the list. If specified (which is not a good idea), the max_memory should be at least twice the area (in physical pixels) of the visible part of the list. If the number of elements is large (typically 100000 or more, this depends on your CPU), its is highly advisable to provide a height_fn, which to an index i gives the height (in logical pixels) of the ieth entry. If some heights are not known in advance, it's ok to return None. For instance, if all entries have the same height, say 30 pixels, one can define

let height_fn _ = Some 30