Documentation ¶
Overview ¶
Package layouthelp has a few utilities for helping with custom layouts or widgets.
Index ¶
- func AccumulateHeight(sizes ...fyne.Size) fyne.Size
- func AccumulateWidth(sizes ...fyne.Size) fyne.Size
- func Margin(obj fyne.CanvasObject, top, right, bottom, left float32) fyne.CanvasObject
- func MarginAll(obj fyne.CanvasObject, all float32) fyne.CanvasObject
- func MarginLeftRight(obj fyne.CanvasObject, left, right float32) fyne.CanvasObject
- func MarginTopBottom(obj fyne.CanvasObject, top, bottom float32) fyne.CanvasObject
- func MarginXY(obj fyne.CanvasObject, x, y float32) fyne.CanvasObject
- type MultiView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccumulateHeight ¶
func AccumulateHeight(sizes ...fyne.Size) fyne.Size
AccumulateHeight will add all heights together and return a fyne.Size with the sum height and max width. This is useful for defining MinSize of fyne.CanvasObjects in a column.
func AccumulateWidth ¶
func AccumulateWidth(sizes ...fyne.Size) fyne.Size
AccumulateWidth will add all widths together and return a fyne.Size with the sum width and max height. This is useful for defining MinSize of fyne.CanvasObjects in a row.
func Margin ¶
func Margin(obj fyne.CanvasObject, top, right, bottom, left float32) fyne.CanvasObject
Margin allows specifying padding individually on all sides.
func MarginAll ¶
func MarginAll(obj fyne.CanvasObject, all float32) fyne.CanvasObject
MarginAll adds the specified padding on all sides of the object.
func MarginLeftRight ¶
func MarginLeftRight(obj fyne.CanvasObject, left, right float32) fyne.CanvasObject
MarginLeftRight allows specifying left and right padding, but leaves top and bottom at zero.
func MarginTopBottom ¶
func MarginTopBottom(obj fyne.CanvasObject, top, bottom float32) fyne.CanvasObject
MarginTopBottom allows specifying top and bottom padding, but leaves left and right at zero.
Types ¶
type MultiView ¶
type MultiView struct {
// contains filtered or unexported fields
}
MultiView allows different fyne.CanvasObjects to be displayed in the same area of a layout. It can be used as either a stack which allows pushing an object for a separate task and popping it off to return to the previous view, or as a replacement target that discards the existing canvas object instead.
func NewMultiView ¶
func NewMultiView() *MultiView
NewMultiView should be used to initialize a MultiView.
func (*MultiView) Clear ¶
func (v *MultiView) Clear()
Clear removes all objects from the stack and the container.
func (*MultiView) Container ¶
func (v *MultiView) Container() *fyne.Container
Container gets the configured container which can be manipulated through the MultiView.
func (*MultiView) Pop ¶
func (v *MultiView) Pop()
Pop pops the top canvas object off the view stack and replaces the container content with the next if there is one.