Layouts

eu.joaocosta.interim.api.Layouts
See theLayouts companion object
trait Layouts

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Layouts.type
object InterIm.type

Members list

Value members

Concrete methods

final def clip[T](area: Rect)(body: (InputState, UiContext) ?=> T)(using inputState: InputState, uiContext: UiContext): T

Clipped region.

Clipped region.

The body will be rendered only inside the clipped area. Input outside the area will also be ignored.

Note that the clip will only be applied to elements in the current Z-index.

Attributes

final def columns[T](area: Rect, numColumns: Int, padding: Int)(body: Vector[Rect] => T): T

Lays out the components in a sequence of columns where all elements have the same size, separated by a padding.

Lays out the components in a sequence of columns where all elements have the same size, separated by a padding.

The body receives a column: Vector[Rect], where column(y) is the rect of the x-th column.

Attributes

final def dynamicColumns[T](area: Rect, padding: Int)(body: (Int => Rect) => T): T

Lays out the components in a sequence of columns of different sizes, separated by a padding.

Lays out the components in a sequence of columns of different sizes, separated by a padding.

The body receives a nextColumn: Int => Rect, where nextColumn(width) is the rect of the next column, with the specified width (if possible). . If the size is negative, the row will start from the right.

Attributes

final def dynamicRows[T](area: Rect, padding: Int)(body: (Int => Rect) => T): T

Lays out the components in a sequence of rows of different sizes, separated by a padding.

Lays out the components in a sequence of rows of different sizes, separated by a padding.

The body receives a nextRow: Int => Rect, where nextRow(height) is the rect of the next row, with the specified height (if possible). If the size is negative, the row will start from the bottom.

Attributes

final def grid[T](area: Rect, numRows: Int, numColumns: Int, padding: Int)(body: Vector[Vector[Rect]] => T): T

Lays out the components in a grid where all elements have the same size, separated by a padding.

Lays out the components in a grid where all elements have the same size, separated by a padding.

The body receives a cell: Vector[Vector[Rect]], where cell(y)(x) is the rect of the y-th row and x-th column.

Attributes

final def rows[T](area: Rect, numRows: Int, padding: Int)(body: Vector[Rect] => T): T

Lays out the components in a sequence of rows where all elements have the same size, separated by a padding.

Lays out the components in a sequence of rows where all elements have the same size, separated by a padding.

The body receives a row: Vector[Rect], where row(y) is the rect of the y-th row.

Attributes