Type Grid

type Grid struct {
	// contains filtered or unexported fields
}

Grid hands out the cells of a GridSpec left to right, wrapping at the container edge. It is a value type: layout allocates nothing.

Constructors

BeginGrid#

func BeginGrid(bounds Rect, spec GridSpec) Grid

BeginGrid starts a grid inside bounds.

Methods

Columns#

func (g Grid) Columns() int

Columns reports how many cells share one row.

Next#

func (g *Grid) Next() Rect

Next returns the next cell. Cells keep coming past the container height; the caller owns scrolling and clipping.