layout

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT 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 List

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

List 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 (*List) Layout

func (*List) Position

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

func (*List) ScrollBy

func (l *List) ScrollBy(num float32)

type WrappedListElement

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳