Documentation
¶
Index ¶
- func NewAdaptiveGridLayout(rowcols int) fyne.Layout
- func NewGridLayout(cols int) fyne.Layout
- func NewGridLayoutWithColumns(cols int) fyne.Layout
- func NewGridLayoutWithColumnsAndPadding(cols int, padding float32) fyne.Layout
- func NewGridLayoutWithRows(rows int) fyne.Layout
- type ColumnsLayout
- type LeftMiddleRightLayout
- type PercentPadLayout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdaptiveGridLayout ¶ added in v0.4.0
func NewAdaptiveGridLayout(rowcols int) fyne.Layout
NewAdaptiveGridLayout returns a new grid layout which uses columns when horizontal but rows when vertical.
func NewGridLayout ¶ added in v0.4.0
func NewGridLayout(cols int) fyne.Layout
NewGridLayout returns a grid layout arranged in a specified number of columns. The number of rows will depend on how many children are in the container that uses this layout.
func NewGridLayoutWithColumns ¶ added in v0.4.0
func NewGridLayoutWithColumns(cols int) fyne.Layout
NewGridLayoutWithColumns returns a new grid layout that specifies a column count and wrap to new rows when needed.
func NewGridLayoutWithColumnsAndPadding ¶ added in v0.4.0
func NewGridLayoutWithRows ¶ added in v0.4.0
func NewGridLayoutWithRows(rows int) fyne.Layout
NewGridLayoutWithRows returns a new grid layout that specifies a row count that creates new rows as required.
Types ¶
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 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 PercentPadLayout ¶ added in v0.10.0
Centers and pads a given item by a percent (0-1) of the width and height that should be taken by the objects
func (*PercentPadLayout) Layout ¶ added in v0.10.0
func (l *PercentPadLayout) Layout(objects []fyne.CanvasObject, size fyne.Size)
func (*PercentPadLayout) MinSize ¶ added in v0.10.0
func (l *PercentPadLayout) MinSize(objects []fyne.CanvasObject) fyne.Size