Fyne API "layout.Spacer"

layout.Spacer


import "fyne.io/fyne/v2/layout"

Usage

type Spacer

type Spacer struct {
	FixHorizontal bool
	FixVertical   bool
}

Spacer is any simple object that can be used in a box layout to space out child objects

func (*Spacer) ExpandHorizontal

func (s *Spacer) ExpandHorizontal() bool

ExpandHorizontal returns whether or not this spacer expands on the horizontal axis

func (*Spacer) ExpandVertical

func (s *Spacer) ExpandVertical() bool

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

func (s *Spacer) MinSize() fyne.Size

MinSize returns a 0 size as a Spacer can shrink to no actual size

func (*Spacer) Move

func (s *Spacer) Move(pos fyne.Position)

Move sets a new position for the Spacer - this will be called by the layout

func (*Spacer) Position

func (s *Spacer) Position() fyne.Position

Position returns the current position of this Spacer

func (*Spacer) Refresh

func (s *Spacer) Refresh()

Refresh does nothing for a spacer but is part of the CanvasObject definition

func (*Spacer) Resize

func (s *Spacer) Resize(size fyne.Size)

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

func (s *Spacer) Size() fyne.Size

Size returns the current size of this Spacer

func (*Spacer) Visible

func (s *Spacer) Visible() bool

Visible returns true if this spacer should affect the layout