layoutx

package
v0.0.0-...-c164e21 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: MIT, Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Swap

func Swap(a layout.Axis) layout.Axis

Types

type Flex

type Flex struct {
	layout.Flex
	// contains filtered or unexported fields
}

Flex wraps a layout.Flex to support cross constraint rigids.

func (*Flex) Rigid

func (f *Flex) Rigid(w layout.Widget) layout.FlexChild

func (*Flex) RigidCross

func (f *Flex) RigidCross(w layout.Widget) layout.FlexChild

RigidCross returns a Rigid which cross axis constraint is set to the largest one from other non RigidCross.

type Flexes

type Flexes struct {
	layout.Flex
	// contains filtered or unexported fields
}

Flexes provide the same functionality as layout.Flex but only for layout.Flex children.

func (*Flexes) Layout

func (f *Flexes) Layout(gtx layout.Context, n int, el layout.ListElement) layout.Dimensions

type ListWrap

type ListWrap struct {
	Axis      layout.Axis
	Alignment layout.Alignment
	// contains filtered or unexported fields
}

ListWrap lays out as many items as possible along the main axis before wrapping to the cross axis.

The number of items along the main axis must be the same for all rows or columns on the cross axis.

func (*ListWrap) Layout

func (*ListWrap) Position

func (l *ListWrap) Position() layout.Position

type ListWrapElement

type ListWrapElement func(layout.Context, int, layout.Dimensions, op.CallOp) layout.Dimensions

ListWrapElement is called for each row/column with the CallOp containing all the elements to be displayed for that row/column and their combined dimensions.

type Rigids

type Rigids struct {
	layout.Flex
	// contains filtered or unexported fields
}

Rigids provide the same functionality as layout.Flex but only for layout.Rigid children.

func (*Rigids) Layout

func (f *Rigids) Layout(gtx layout.Context, n int, el layout.ListElement) layout.Dimensions

Jump to

Keyboard shortcuts

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