Layouts

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

Objects containing all default layouts.

By convention, all layouts are of the form def layout(area, params...)(body): Value.

Attributes

Companion
trait
Graph
Supertypes
trait Layouts
class Object
trait Matchable
class Any
Self type
Layouts.type

Members list

Value members

Inherited 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

Inherited from:
Layouts
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

Inherited from:
Layouts
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

Inherited from:
Layouts
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

Inherited from:
Layouts
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

Inherited from:
Layouts
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

Inherited from:
Layouts