mylayouts

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: BSD-3-Clause Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BorderBox

type BorderBox struct {
	//These are ratios not values
	//Ex left = 6 is like use 1/6th available width as left intend
	//these can be zero
	LeftIntend  float32 //left intend
	RightIntend float32
	TopIntend   float32
	SpacerSize  int //times of default font size

}

BorderBox : Custom Layout

func (*BorderBox) Layout

func (n *BorderBox) Layout(objects []fyne.CanvasObject, containerSize fyne.Size)

Layout : Defines Arranging of Objects

func (*BorderBox) MinSize

func (n *BorderBox) MinSize(objects []fyne.CanvasObject) fyne.Size

MinSize : This will give maximum of (min width of an object)

type BorderBoxMin

type BorderBoxMin struct {
	//This will also add intend to Minsize
	//These are ratios not values
	//Ex left = 6 is like use 1/6th available width as left intend
	//these can be zero
	LeftIntend  float32 //left intend
	RightIntend float32
	TopIntend   float32
	SpacerSize  int               //times of default font size
	MenuObject  fyne.CanvasObject //present at top right
	Padding     int               //This padding will be added to min size
}

BorderBoxMin : Custom Layout

func (*BorderBoxMin) AddMenuObj

func (n *BorderBoxMin) AddMenuObj(z fyne.CanvasObject)

AddMenuObj : Adds Custom Menu Object

func (*BorderBoxMin) Layout

func (n *BorderBoxMin) Layout(objects []fyne.CanvasObject, containerSize fyne.Size)

Layout : Defines Arranging of Objects

func (*BorderBoxMin) MinSize

func (n *BorderBoxMin) MinSize(objects []fyne.CanvasObject) fyne.Size

MinSize : This will give maximum of (min width of an object)

type MenuBtnlayout struct {
}

MenuBtnlayout : Layout to add top right menu btn

func (m *MenuBtnlayout) Layout(objects []fyne.CanvasObject, containerSize fyne.Size)

Layout : Defines Arranging of Objects

func (m *MenuBtnlayout) MinSize(objects []fyne.CanvasObject) fyne.Size

MinSize : Get MinSize

type MenuButton struct{}

MenuBotton : Menu Btn Widget

func (M *MenuButton) Layout(objects []fyne.CanvasObject, containerSize fyne.Size)

Layout : Defines Arranging of Objects

func (M *MenuButton) MinSize(objects []fyne.CanvasObject) fyne.Size

MinSize : Get MinSize

Jump to

Keyboard shortcuts

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