package layout
import "fyne.io/fyne/layout"
Package layout defines the various layouts available to Fyne apps
Index ¶
- func NewBorderLayout(top, bottom, left, right fyne.CanvasObject) fyne.Layout
- func NewCenterLayout() fyne.Layout
- func NewFixedGridLayout(size fyne.Size) fyne.Layout
- func NewFormLayout() fyne.Layout
- func NewGridLayout(cols int) fyne.Layout
- func NewHBoxLayout() fyne.Layout
- func NewMaxLayout() fyne.Layout
- func NewSpacer() fyne.CanvasObject
- func NewVBoxLayout() fyne.Layout
- type Spacer
- func (s *Spacer) ExpandHorizontal() bool
- func (s *Spacer) ExpandVertical() bool
- func (s *Spacer) Hide()
- func (s *Spacer) MinSize() fyne.Size
- func (s *Spacer) Move(pos fyne.Position)
- func (s *Spacer) Position() fyne.Position
- func (s *Spacer) Resize(size fyne.Size)
- func (s *Spacer) Show()
- func (s *Spacer) Size() fyne.Size
- func (s *Spacer) Visible() bool
- type SpacerObject
Functions ¶
func NewBorderLayout ¶
func NewBorderLayout(top, bottom, left, right fyne.CanvasObject) fyne.Layout
NewBorderLayout creates a new BorderLayout instance with top, left, bottom and right objects set. All other items in the container will fill the centre space
func NewCenterLayout ¶
NewCenterLayout creates a new CenterLayout instance
func NewFixedGridLayout ¶
NewFixedGridLayout returns a new FixedGridLayout instance
func NewFormLayout ¶
NewFormLayout returns a new FormLayout instance
func NewGridLayout ¶
NewGridLayout returns a new GridLayout instance
func NewHBoxLayout ¶
NewHBoxLayout returns a horizontal box layout for stacking a number of child canvas objects or widgets left to right.
func NewMaxLayout ¶
NewMaxLayout creates a new MaxLayout instance
func NewSpacer ¶
func NewSpacer() fyne.CanvasObject
NewSpacer returns a spacer object which can fill vertical and horizontal space. This is primarily used with a box layout.
func NewVBoxLayout ¶
NewVBoxLayout returns a vertical box layout for stacking a number of child canvas objects or widgets top to bottom.
Types ¶
type Spacer ¶
type Spacer struct { FixHorizontal bool FixVertical bool // contains filtered or unexported fields }
Spacer is any simple object that can be used in a box layout to space out child objects
func (*Spacer) ExpandHorizontal ¶
ExpandHorizontal returns whether or not this spacer expands on the horizontal axis
func (*Spacer) ExpandVertical ¶
ExpandVertical returns whether or not this spacer expands on the vertical axis
func (*Spacer) Hide ¶
func (s *Spacer) Hide()
Hide removes this Spacer from layout calculations
func (*Spacer) MinSize ¶
MinSize returns a 0 size as a Spacer can shrink to no actual size
func (*Spacer) Move ¶
Move sets a new position for the Spacer - this will be called by the layout
func (*Spacer) Position ¶
Position returns the current position of this Spacer
func (*Spacer) Resize ¶
Resize sets a new size for the Spacer - this will be called by the layout
func (*Spacer) Show ¶
func (s *Spacer) Show()
Show sets the Spacer to be part of the layout calculations
func (*Spacer) Size ¶
Size returns the current size of this Spacer
func (*Spacer) Visible ¶
Visible returns true if this spacer should affect the layout
type SpacerObject ¶
SpacerObject is any object that can be used to space out child objects
Source Files ¶
borderlayout.go boxlayout.go centerlayout.go fixedgridlayout.go formlayout.go gridlayout.go maxlayout.go spacer.go
- Version
- v1.1.0
- Published
- Jun 21, 2019
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 4 seconds ago –
Tools for package owners.