table

package
v0.0.0-...-b6976fc Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDataLabelStyle

func DefaultDataLabelStyle(th *material.Theme) material.LabelStyle

func DefaultHeaderLabelStyle

func DefaultHeaderLabelStyle(th *material.Theme) material.LabelStyle

Types

type Cell

type Cell func(gtx layout.Context, row, col int, labelStyle material.LabelStyle) layout.Dimensions

type Dimensioner

type Dimensioner func(axis layout.Axis, index, constraint, minSize, height int) int
type Header struct {
	Text string
}

func NewHeader

func NewHeader(text string) Header

type LabelStyle

type LabelStyle func(theme *material.Theme) material.LabelStyle

type Option

type Option func(*Table)

func OptBorder

func OptBorder(value widget.Border) Option

func OptDataLabelStyle

func OptDataLabelStyle(value LabelStyle) Option

func OptHeaderLabelStyle

func OptHeaderLabelStyle(value LabelStyle) Option

func OptHeaders

func OptHeaders(value ...Header) Option

func OptInset

func OptInset(value layout.Inset) Option

func OptMinSize

func OptMinSize(value float32) Option

type Table

type Table struct {
	Headers []Header

	MinSize float32
	Border  widget.Border
	Inset   layout.Inset

	HeaderLabelStyle LabelStyle
	DataLabelStyle   LabelStyle
	// contains filtered or unexported fields
}

func NewTable

func NewTable(opts ...Option) Table

func (*Table) Layout

func (t *Table) Layout(
	theme *material.Theme, gtx layout.Context,
	rows int, dimensioner Dimensioner, cell Cell,
) layout.Dimensions

func (*Table) Update

func (t *Table) Update(opts ...Option)

Jump to

Keyboard shortcuts

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