Skip to content

commonnet.kernelpanicsoft.archie.gui.layout

Package-level declarations

Types

AbsoluteAlignment


A collection of common Alignments unaware of the layout direction.

Alignment


@Stablefun interface Alignment

An 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 Arrangement

Used 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) : Alignment

An 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) : Alignment

An 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


typealias  = Int

IntCoordinates


@JvmInlinevalue class IntCoordinates(val pair: Long)

IntOffset


IntSize


@JvmInlinevalue class IntSize(val pair: Long)

LayoutDirection


A class for defining layout directions.

Measurable


interface Measurable

MeasurePolicy


@Stablefun interface MeasurePolicy

MeasureResult


data class MeasureResult(val width: Int, val height: Int, val placer: Placer)

Placeable


interface Placeable

Placer


@Stablefun interface Placer

Renderer


@Stableinterface Renderer

RowColumnMeasurePolicy


abstract class RowColumnMeasurePolicy(val sumWidth: Boolean = false, val sumHeight: Boolean = false, val arrangementSpacing: Int = 0) : MeasurePolicy

Size


@Immutabledata class Size(val width: Int = 0, val height: Int = 0)

Properties

dp


val Int.dp: Int

EmptyRenderer


Functions

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.