layout

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpaceEnd     Spacing = layout.SpaceEnd
	SpaceStart           = layout.SpaceStart
	SpaceSides           = layout.SpaceSides
	SpaceAround          = layout.SpaceAround
	SpaceBetween         = layout.SpaceBetween
	SpaceEvenly          = layout.SpaceEvenly
)

Variables

View Source
var Exact = layout.Exact
View Source
var Expanded = layout.Expanded
View Source
var Flexed = layout.Flexed
View Source
var NewContext = layout.NewContext
View Source
var Rigid = layout.Rigid
View Source
var Stacked = layout.Stacked
View Source
var UniformInset = layout.UniformInset

Functions

func Cross

func Cross(a Axis, pt *image.Point) *int

func Main

func Main(a Axis, pt *image.Point) *int

Types

type Alignment

type Alignment = layout.Alignment
const (
	Start    Alignment = layout.Start
	End      Alignment = layout.End
	Middle   Alignment = layout.Middle
	Baseline Alignment = layout.Baseline
)

type Axis

type Axis = layout.Axis
const (
	Horizontal Axis = layout.Horizontal
	Vertical   Axis = layout.Vertical
)

type Constraints

type Constraints = layout.Constraints

func Normalize

func Normalize(c Constraints) Constraints

type Context

type Context = layout.Context

type Dimensions

type Dimensions = layout.Dimensions

type Flex

type Flex = layout.Flex

type FlexChild

type FlexChild = layout.FlexChild

type Inset

type Inset = layout.Inset

type List

type List = layout.List

type ListElement

type ListElement = layout.ListElement

type PixelInset

type PixelInset struct {
	Top, Bottom, Left, Right int
}

PixelInset is like Inset, but using pixel coordinates instead of dp.

func (PixelInset) Layout

func (in PixelInset) Layout(gtx Context, w Widget) Dimensions

type Position

type Position = layout.Position

type SmallGrid

type SmallGrid struct {
	Grid          outlay.Grid
	RowPadding    int
	ColumnPadding int
}

func (SmallGrid) Layout

func (sg SmallGrid) Layout(gtx Context, rows, cols int, sizeEstimator outlay.Cell, cellFunc outlay.Cell) Dimensions

type Spacer

type Spacer = layout.Spacer

type Spacing

type Spacing = layout.Spacing

type Stack

type Stack = layout.Stack

type Widget

type Widget = layout.Widget

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL