common • net.kernelpanicsoft.archie.gui.layout
Package-level declarations
Types
AbsoluteAlignment
object AbsoluteAlignmentA collection of common Alignments unaware of the layout direction.
Alignment
@Stablefun interface AlignmentAn interface to calculate the position of a sized box inside an available space. Alignment is often used to define the alignment of a layout inside a parent layout.
Arrangement
@Immutableobject ArrangementUsed to specify the arrangement of the layout's children in layouts like Row or Column in the main axis direction (horizontal and vertical, respectively).
BiasAbsoluteAlignment
@Immutabledata class BiasAbsoluteAlignment(horizontalBias: Float, verticalBias: Float) : AlignmentAn Alignment specified by bias: for example, a bias of -1 represents alignment to the left/top, a bias of 0 will represent centering, and a bias of 1 will represent right/bottom. Any value can be specified to obtain an alignment. Inside the -1, 1 range, the obtained alignment will position the aligned size fully inside the available space, while outside the range it will the aligned size will be positioned partially or completely outside.
BiasAlignment
@Immutabledata class BiasAlignment(val horizontalBias: Float, val verticalBias: Float) : AlignmentAn Alignment specified by bias: for example, a bias of -1 represents alignment to the start/top, a bias of 0 will represent centering, and a bias of 1 will represent end/bottom. Any value can be specified to obtain an alignment. Inside the -1, 1 range, the obtained alignment will position the aligned size fully inside the available space, while outside the range it will the aligned size will be positioned partially or completely outside.
Dp
IntCoordinates
@JvmInlinevalue class IntCoordinates(val pair: Long)IntOffset
typealias = IntCoordinatesIntSize
LayoutDirection
enum LayoutDirection : Enum<LayoutDirection> A class for defining layout directions.
Measurable
interface MeasurableMeasurePolicy
@Stablefun interface MeasurePolicyMeasureResult
data class MeasureResult(val width: Int, val height: Int, val placer: Placer)Placeable
interface PlaceablePlacer
@Stablefun interface PlacerRenderer
@Stableinterface RendererRowColumnMeasurePolicy
abstract class RowColumnMeasurePolicy(val sumWidth: Boolean = false, val sumHeight: Boolean = false, val arrangementSpacing: Int = 0) : MeasurePolicySize
Properties
dp
EmptyRenderer
val EmptyRenderer: RendererFunctions
Box
@Composablefun Box(modifier: Modifier = Modifier, contentAlignment: Alignment = Alignment.TopStart, content: @Composable () -> Unit)Column
@Composablefun Column(modifier: Modifier = Modifier, verticalArrangement: Arrangement.Vertical = Arrangement.Top, horizontalAlignment: Alignment.Horizontal = Alignment.Start, content: @Composable () -> Unit)A layout component that places contents in a column top-to-bottom.
Layout
@Composableinline fun Layout(measurePolicy: MeasurePolicy, renderer: Renderer = EmptyRenderer, modifier: Modifier = Modifier, content: @Composable () -> Unit = {})The main component for layout, it measures and positions zero or more children.
Row
@Composablefun Row(modifier: Modifier = Modifier, horizontalArrangement: Arrangement.Horizontal = Arrangement.Start, verticalAlignment: Alignment.Vertical = Alignment.Top, content: @Composable () -> Unit)A layout component that places contents in a row left-to-right.