GridLayout

io.worxbend.tui.core.GridLayout
See theGridLayout companion class
object GridLayout

Attributes

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

Members list

Value members

Concrete methods

def apply(columns: Seq[Constraint], rows: Seq[Constraint]): GridLayout

A grid of columns x rows tracks with no gap; add one with GridLayout.withGap.

A grid of columns x rows tracks with no gap; add one with GridLayout.withGap.

Attributes

def autoFlow(columns: Int, items: Seq[GridItem]): Seq[GridPlacement]

Resolves every item to a placement on a grid columns wide, in the order given.

Resolves every item to a placement on a grid columns wide, in the order given.

Fixed items are placed first, where they asked to be, so a flowed item never lands on top of one. Each flowed item then takes the first run of free cells, in reading order, that its spans fit into, starting the search where the previous flowed item ended — CSS grid's "sparse" auto-placement, so the flow never goes back to fill an earlier hole. A column span wider than the grid is narrowed to the grid. Rows grow as far as the items need; the caller decides how many row tracks to solve.

Attributes