Skip to main content

Crate llimphi_layout

Crate llimphi_layout 

Source
Expand description

llimphi-layout — Física del Espacio.

Wrapper sobre taffy que resuelve árboles flex/grid y devuelve coordenadas absolutas (no relativas al padre). El consumidor pasa el árbol a compute(root, viewport) y obtiene un ComputedLayout con un rect absoluto por nodo, listo para llimphi-raster.

Re-exports§

pub use taffy;

Structs§

CompactLength
A representation of a length as a compact 64-bit tagged pointer
ComputedLayout
Resultado de LayoutTree::compute: rect absoluto por nodo del árbol.
Dimension
A unit of linear measurement
Layout
The final result of a layout algorithm for a single node.
LayoutTree
Árbol de layout. Encapsula la TaffyTree y la lógica de absolutización.
LengthPercentage
A unit of linear measurement
LengthPercentageAuto
A unit of linear measurement
Line
An abstract “line”. Represents any type that has a start and an end
MaxTrackSizingFunction
Maximum track sizing function
MinTrackSizingFunction
Minimum track sizing function
NodeId
A type representing the id of a single node in a tree of nodes
Rect
Caja absoluta de un nodo (origen en la esquina superior izquierda del viewport).
Size
The width and height of a Rect
Style
A typed representation of the CSS style information for a single node.
TaffyTree
An entire tree of UI nodes. The entry point to Taffy’s high-level API.

Enums§

AlignContent
Sets the distribution of space between and around content items For Flexbox it controls alignment in the cross axis For Grid it controls alignment in the block axis
AlignItems
Used to control how child nodes are aligned. For Flexbox it controls alignment in the cross axis For Grid it controls alignment in the block axis
AvailableSpace
The amount of space available to a node in a given axis https://www.w3.org/TR/css-sizing-3/#available
BoxSizing
Specifies whether size styles for this node are assigned to the node’s “content box” or “border box”
Display
Sets the layout used for the children of this node
FlexDirection
The direction of the flexbox layout main axis.
FlexWrap
Controls whether flex items are forced onto one line or can wrap onto multiple lines.
GridAutoFlow
Controls whether grid items are placed row-wise or column-wise. And whether the sparse or dense packing algorithm is used.
GridPlacement
A grid line placement specification. Used for grid-[row/column]-[start/end]. Named tracks are not implemented.
GridTemplateComponent
An element in a grid-template-columns or grid-template-rows definition. Either a track sizing function or a repeat().
LayoutError
Errores del motor de layout.
Position
The positioning strategy for this item.
RepetitionCount
The first argument to a repeated track definition. This type represents the type of automatic repetition to perform.

Traits§

FromFr
Trait to create constant percent values from plain numbers
FromLength
Trait to create absolute length values from plain numbers
FromPercent
Trait to create constant percent values from plain numbers
LayoutPartialTree
Any type that implements LayoutPartialTree can be laid out using Taffy’s algorithms
PrintTree
Trait used by the print_tree method which prints a debug representation
RoundTree
Trait used by the round_layout method which takes a tree of unrounded float-valued layouts and performs rounding to snap the values to the pixel grid.
TaffyAuto
Trait to abstract over auto values
TaffyFitContent
Trait to create fit-content(…) values from plain numbers
TaffyGridLine
Trait to abstract over grid line values
TaffyGridSpan
Trait to abstract over grid span values
TaffyMaxContent
Trait to abstract over max_content values
TaffyMinContent
Trait to abstract over min_content values
TaffyZero
Trait to abstract over zero values
TraversePartialTree
Taffy’s abstraction for downward tree traversal.
TraverseTree
A marker trait which extends TraversePartialTree

Functions§

auto
Returns the auto value for that type
evenly_sized_tracks
Returns a grid template containing count evenly sized tracks
fit_content
Returns a value of the inferred type which represent a fit-content(…) value with the given argument.
flex
Shorthand for minmax(0, Nfr). Probably what you want if you want exactly evenly sized tracks.
fr
Create a Fraction track sizing function (fr in CSS)
length
Returns a value of the inferred type which represent an absolute length
line
Specifies a grid line to place a grid item between in CSS Grid Line coordinates:
max_content
Returns the auto value for that type
min_content
Returns the auto value for that type
minmax
Returns a MinMax with min value of min and max value of max
percent
Returns a value of the inferred type which represent a percentage
repeat
Returns an auto-repeated track definition
span
Returns a GridPlacement::Span
zero
Returns the zero value for that type

Type Aliases§

AlignSelf
Controls alignment of an individual node
JustifyContent
Sets the distribution of space between and around content items For Flexbox it controls alignment in the main axis For Grid it controls alignment in the inline axis
JustifyItems
Used to control how child nodes are aligned. Does not apply to Flexbox, and will be ignored if specified on a flex container For Grid it controls alignment in the inline axis
JustifySelf
Controls alignment of an individual node
TrackSizingFunction
The sizing function for a grid track (row/column)