Skip to main content

Crate cranpose_ui_layout

Crate cranpose_ui_layout 

Source
Expand description

Layout contracts & policies for Cranpose

Modules§

prelude

Structs§

Alignment
Alignment across both axes used for positioning content within a box.
AlignmentLines
Text baselines measured down from a layout’s top edge.
Constraints
Constraints used during layout measurement.
FlexParentData
Parent data for flex layouts (Row/Column weights and alignment).
LayoutModifierMeasureResult
Result of a layout modifier measurement operation.
MeasureResult
Result of a measurement operation.
Measurement
The size and explicit alignment lines produced by a measure policy.
ParentData
Layout metadata supplied by a child for its direct parent.
Placeable
Result of running a measurement pass for a single child.
Placement
Placement information for a measured child.

Enums§

Axis
Represents the primary axis of flex layout (Row or Column).
HorizontalAlignment
Alignment along the horizontal axis.
IntrinsicSize
Specifies how to size a component based on its intrinsic measurements.
LinearArrangement
Arrangement strategy matching Jetpack Compose’s linear arrangements.
VerticalAlignment
Alignment along the vertical axis.

Traits§

Arrangement
Trait implemented by arrangement strategies that distribute children on an axis.
AxisAlignment
An alignment along one axis, which places a block at a bias of the space left beside it.
Measurable
Object capable of measuring a layout child and exposing intrinsic sizes.
MeasurePolicy
Policy responsible for measuring and placing children.
MeasureScope
Scope for measurement operations.
PlaceTarget
What a node-backed Placeable tells when its parent places it.

Functions§

bias_offset
Compose’s BiasAlignment: the offset that puts child at bias of available (-1 the start, 0 the middle, 1 the end), on a whole device pixel of density as Kotlin’s roundToInt rounds it, and before the start when the child is the larger.
ceil_to_px
A length moved up onto the next whole device pixel, as Compose sizes text: a layout’s size is its paragraph’s, ceiled, so it never clips.
round_to_px
A length moved onto the whole device pixel Compose would give it.