package toffee
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=9e4e90d17f9b2af1b07071fe425bc2c519c849c4f1d1ab73cde512be2d874849
sha512=06e9c4a741590942e81a27738d0b5c0413fafec8cf3b7dae047ad69f155e7b718aa4223818dc161b7d028efffcfd3365905e264d6fd31d453910ddfa91dcf9b9
doc/toffee.tree/Tree/Requested_axis/index.html
Module Tree.Requested_axisSource
Axis that layout algorithms can be requested to compute a size for.
Requested_axis specifies which dimensions a layout algorithm should compute. Unlike Geometry.Absolute_axis, which represents only horizontal or vertical axes, Requested_axis includes a Both variant to indicate that both dimensions should be computed simultaneously.
This type is used in Layout_input.t to control which axis or axes a node should compute during layout. Single-axis requests are used when querying intrinsic sizes, while Both is used for full layout passes.
The type representing which axis or axes to compute.
Conversion Functions
of_absolute_axis axis converts an absolute axis to a requested axis.
Maps Horizontal to Horizontal and Vertical to Vertical.
to_absolute_axis t converts a requested axis to an absolute axis.
Returns Some Horizontal or Some Vertical for single-axis requests, and None for Both.
String Conversion
to_string t returns a string representation of the requested axis.
Returns "Horizontal", "Vertical", or "Both".
Comparison and Equality
compare a b compares two requested axes.
The ordering is Horizontal < Vertical < Both.
pp fmt t pretty-prints a requested axis to a formatter.