layouts

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoxLayout

type BoxLayout struct {
	Padding float32
	// contains filtered or unexported fields
}

func NewHBoxLayout

func NewHBoxLayout() *BoxLayout

NewHBoxLayout returns a horizontal box layout for stacking a number of child canvas objects or widgets left to right. The objects are always displayed at their horizontal MinSize. Use a different layout if the objects are intended to be larger then their horizontal MinSize.

func NewVBoxLayout

func NewVBoxLayout() *BoxLayout

NewVBoxLayout returns a vertical box layout for stacking a number of child canvas objects or widgets top to bottom. The objects are always displayed at their vertical MinSize. Use a different layout if the objects are intended to be larger then their vertical MinSize.

func (*BoxLayout) Layout

func (g *BoxLayout) Layout(objects []fyne.CanvasObject, size fyne.Size)

Layout is called to pack all child objects into a specified size. For a VBoxLayout this will pack objects into a single column where each item is full width but the height is the minimum required. Any spacers added will pad the view, sharing the space if there are two or more.

func (*BoxLayout) MinSize

func (g *BoxLayout) MinSize(objects []fyne.CanvasObject) fyne.Size

MinSize finds the smallest size that satisfies all the child objects. For a BoxLayout this is the width of the widest item and the height is the sum of of all children combined with padding between each.

Jump to

Keyboard shortcuts

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