MCPcopy
hub / github.com/g3n/engine / GridLayout

Struct GridLayout

gui/gridlayout.go:13–20  ·  view source on GitHub ↗

GridLayout is a panel layout which arranges its children in a rectangular grid. It is necessary to set the number of columns of the grid when the layout is created. The panel's child elements are positioned in the grid cells accordingly to the order they were added to the panel. The height of each r

Source from the content-addressed store, hash-verified

11// The height of each row is determined by the height of the heightest child in the row.
12// The width of each column is determined by the width of the widest child in the column
13type GridLayout struct {
14 pan IPanel // parent panel
15 columns []colInfo // columns alignment info
16 alignh Align // global cell horizontal alignment
17 alignv Align // global cell vertical alignment
18 expandh bool // expand horizontally flag
19 expandv bool // expand vertically flag
20}
21
22// GridLayoutParams describes layout parameter for an specific child
23type GridLayoutParams struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected