layouts

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CenterPadLayout

type CenterPadLayout struct {
	PadLeftRight float32
	PadTopBottom float32
}

func (*CenterPadLayout) Layout

func (c *CenterPadLayout) Layout(objects []fyne.CanvasObject, size fyne.Size)

func (*CenterPadLayout) MinSize

func (c *CenterPadLayout) MinSize(objects []fyne.CanvasObject) fyne.Size

only supports one object

type ColumnsLayout

type ColumnsLayout struct {
	ColumnWidths []float32
}

ColumnsLayout lays out a number of items into columns. There are two types of columns: fixed-width and variable width. A fixed width column is any with a non-negative width and will be laid out with that width. A variable width column is created by using any negative number as its width. Variable width columns are all laid out with the same width, splitting the "leftover" space equally between themselves after accounting for the fixed-width columns. Hidden items are not shown and take up 0 space.

func NewColumnsLayout

func NewColumnsLayout(widths []float32) *ColumnsLayout

func (*ColumnsLayout) Layout

func (c *ColumnsLayout) Layout(objects []fyne.CanvasObject, size fyne.Size)

func (*ColumnsLayout) MinSize

func (c *ColumnsLayout) MinSize(objects []fyne.CanvasObject) fyne.Size

type HboxCustomPadding

type HboxCustomPadding struct {
	ExtraPad        float32
	DisableThemePad bool
}

func (*HboxCustomPadding) Layout

func (h *HboxCustomPadding) Layout(objects []fyne.CanvasObject, size fyne.Size)

func (*HboxCustomPadding) MinSize

func (h *HboxCustomPadding) MinSize(objects []fyne.CanvasObject) fyne.Size

type LeftMiddleRightLayout

type LeftMiddleRightLayout struct {
	// contains filtered or unexported fields
}

Lays out up to 3 objects such that the middle object, Objects[1], is centered in the available space and takes up a fixed width. The left, and right (if non-nil), split the leftover space equally.

func NewLeftMiddleRightLayout

func NewLeftMiddleRightLayout(middleWidth float32) *LeftMiddleRightLayout

func (*LeftMiddleRightLayout) Layout

func (b *LeftMiddleRightLayout) Layout(objects []fyne.CanvasObject, size fyne.Size)

func (*LeftMiddleRightLayout) MinSize

func (b *LeftMiddleRightLayout) MinSize(objects []fyne.CanvasObject) fyne.Size

type MaxPadLayout

type MaxPadLayout struct {
	PadLeft   float32
	PadRight  float32
	PadTop    float32
	PadBottom float32
}

func (*MaxPadLayout) Layout

func (c *MaxPadLayout) Layout(objects []fyne.CanvasObject, size fyne.Size)

func (*MaxPadLayout) MinSize

func (c *MaxPadLayout) MinSize(objects []fyne.CanvasObject) fyne.Size

only supports one object

type VboxCustomPadding

type VboxCustomPadding struct {
	ExtraPad float32
}

func (*VboxCustomPadding) Layout

func (v *VboxCustomPadding) Layout(objects []fyne.CanvasObject, size fyne.Size)

func (*VboxCustomPadding) MinSize

func (v *VboxCustomPadding) MinSize(objects []fyne.CanvasObject) fyne.Size

Jump to

Keyboard shortcuts

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