MCPcopy Index your code
hub / github.com/g3n/engine / NewGridLayout

Function NewGridLayout

gui/gridlayout.go:36–44  ·  view source on GitHub ↗

NewGridLayout creates and returns a pointer of a new grid layout

(ncols int)

Source from the content-addressed store, hash-verified

34
35// NewGridLayout creates and returns a pointer of a new grid layout
36func NewGridLayout(ncols int) *GridLayout {
37
38 if ncols <= 0 {
39 panic("Invalid number of columns")
40 }
41 gl := new(GridLayout)
42 gl.columns = make([]colInfo, ncols)
43 return gl
44}
45
46// SetAlignV sets the vertical alignment for all the grid cells
47// The alignment of an individual cell can be set by settings its layout parameters.

Callers 1

BuildLayoutMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected