package inquire
An OCaml library to create beautiful interactive CLIs
Install
Dune Dependency
Authors
Maintainers
Sources
inquire-0.2.1.tbz
sha256=0b88d89e24d4cbc0560a7c8d8ec51388990e1b27f24685029997afa52a7c720f
sha512=8b62860a8d15e41528a404a6f1b9968c3d79755607b5ea319af2e3e45516e672a785361d278279910928db4054e1800e87bcee0210ff3eabfb330713b368c827
doc/src/inquire.lambda-term/lTerm_geom.ml.html
Source file lTerm_geom.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
(* * lTerm_geom.ml * ------------- * Copyright : (c) 2011, Jeremie Dimino <jeremie@dimino.org> * Licence : BSD3 * * This file is a part of Lambda-Term. *) type size = { rows : int; cols : int; } let rows size = size.rows let cols size = size.cols let string_of_size size = Printf.sprintf "{ rows = %d; cols = %d }" size.rows size.cols type coord = { row : int; col : int; } let row size = size.row let col size = size.col let string_of_coord coord = Printf.sprintf "{ row = %d; col = %d }" coord.row coord.col type rect = { row1 : int; col1 : int; row2 : int; col2 : int; } let row1 rect = rect.row1 let col1 rect = rect.col1 let row2 rect = rect.row2 let col2 rect = rect.col2 let size_of_rect rect = { rows = rect.row2 - rect.row1; cols = rect.col2 - rect.col1 } let string_of_rect rect = Printf.sprintf "{ row1 = %d; col1 = %d; row2 = %d; col2 = %d }" rect.row1 rect.col1 rect.row2 rect.col2 let in_rect rect coord = coord.col >= rect.col1 && coord.col < rect.col2 && coord.row >= rect.row1 && coord.row < rect.row2 type horz_alignment = | H_align_left | H_align_center | H_align_right type vert_alignment = | V_align_top | V_align_center | V_align_bottom type 'a directions = { left : 'a; right : 'a; up : 'a; down : 'a; }
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>