prefabs

package
v0.0.0-...-a44c12d Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Divider

func Divider(gtx layout.Context, height unit.Dp) layout.Dimensions

Types

type Header struct {
	Title       func() string
	Subtitle    func(gtx layout.Context, th *material.Theme) layout.Dimensions
	LeftLayout  func(gtx layout.Context, th *material.Theme) layout.Dimensions
	RightLayout func(gtx layout.Context, th *material.Theme) layout.Dimensions
	// contains filtered or unexported fields
}

func NewHeader

func NewHeader(r *router.Router) *Header

func (*Header) AddHistory

func (h *Header) AddHistory(tag interface{})

func (*Header) GetLastHistory

func (h *Header) GetLastHistory() interface{}

func (*Header) GetPosition

func (h *Header) GetPosition(tag interface{}) int

func (*Header) GoBack

func (h *Header) GoBack()

func (*Header) HandleKeyGoBack

func (h *Header) HandleKeyGoBack(gtx layout.Context)

func (*Header) HandleSwipeRightGoBack

func (h *Header) HandleSwipeRightGoBack(gtx layout.Context)

func (*Header) History

func (h *Header) History() []interface{}

func (*Header) IsHistory

func (h *Header) IsHistory(tag interface{}) bool

func (*Header) Layout

func (h *Header) Layout(gtx layout.Context, th *material.Theme, titleLayout HeaderTitleLayoutFunc) layout.Dimensions

func (*Header) ResetHistory

func (h *Header) ResetHistory()

type HeaderTitleLayoutFunc

type HeaderTitleLayoutFunc func(gtx layout.Context, th *material.Theme, title string) layout.Dimensions

type ImageHoverClick

type ImageHoverClick struct {
	Image     *components.Image
	Clickable *widget.Clickable

	AnimationEnter *animation.Animation
	AnimationLeave *animation.Animation
	// contains filtered or unexported fields
}

func NewImageHoverClick

func NewImageHoverClick() *ImageHoverClick

func (*ImageHoverClick) Layout

func (item *ImageHoverClick) Layout(gtx layout.Context) layout.Dimensions

type InfoRow

type InfoRow struct {
	Editor *widget.Editor
}

func NewInfoRow

func NewInfoRow() *InfoRow

func NewInfoRows

func NewInfoRows(count int) []*InfoRow

func (*InfoRow) Layout

func (i *InfoRow) Layout(gtx layout.Context, th *material.Theme, title string, value string) layout.Dimensions

type Input

type Input struct {
	*components.Input
	// contains filtered or unexported fields
}

func NewInput

func NewInput() *Input

func NewNumberInput

func NewNumberInput() *Input

func NewPasswordInput

func NewPasswordInput() *Input

func (*Input) Layout

func (i *Input) Layout(gtx layout.Context, th *material.Theme, hint string) layout.Dimensions

type LangSelector

type LangSelector struct {
	Key     string
	Changed bool
	// contains filtered or unexported fields
}

func NewLangSelector

func NewLangSelector(defaultLangKey string) *LangSelector

func (*LangSelector) Layout

type ListItemMenuItem

type ListItemMenuItem struct {
	Key   string
	Icon  *widget.Icon
	Title string
}

func (ListItemMenuItem) Layout

func (t ListItemMenuItem) Layout(gtx layout.Context, index int, th *material.Theme) layout.Dimensions

type ListItemSelect

type ListItemSelect struct {
	// contains filtered or unexported fields
}

func NewListItemSelect

func NewListItemSelect() *ListItemSelect

func (*ListItemSelect) Layout

func (n *ListItemSelect) Layout(gtx layout.Context, th *material.Theme, buttons []*components.Button) layout.Dimensions

func (*ListItemSelect) SetVisible

func (n *ListItemSelect) SetVisible(visible bool)

func (*ListItemSelect) Toggle

func (n *ListItemSelect) Toggle()

type PageHeaderAnimation

type PageHeaderAnimation struct {
	// contains filtered or unexported fields
}

func NewPageHeaderAnimation

func NewPageHeaderAnimation(tag interface{}) *PageHeaderAnimation

func (*PageHeaderAnimation) Enter

func (p *PageHeaderAnimation) Enter(header *Header) bool

This is a helper to load page animation based on the header depth

func (*PageHeaderAnimation) Leave

func (p *PageHeaderAnimation) Leave(header *Header) bool

func (*PageHeaderAnimation) Update

func (p *PageHeaderAnimation) Update(gtx layout.Context, finished func()) (trans op.TransformOp)

type RingSizeSelector

type RingSizeSelector struct {
	Size    int
	Changed bool
	// contains filtered or unexported fields
}

func NewRingSizeSelector

func NewRingSizeSelector(defaultSize int) *RingSizeSelector

func (*RingSizeSelector) Layout

type TextField

type TextField struct {
	Input *Input
}

func NewNumberTextField

func NewNumberTextField() *TextField

func NewPasswordTextField

func NewPasswordTextField() *TextField

func NewTextField

func NewTextField() *TextField

func (*TextField) Editor

func (t *TextField) Editor() *widget.Editor

func (*TextField) Layout

func (t *TextField) Layout(gtx layout.Context, th *material.Theme, title string, hint string) layout.Dimensions

func (*TextField) SetValue

func (t *TextField) SetValue(text string)

func (*TextField) Value

func (t *TextField) Value() string

type ThemeSelector

type ThemeSelector struct {
	Changed bool
	Key     string
	// contains filtered or unexported fields
}

func NewThemeSelector

func NewThemeSelector(defaultThemeKey string) *ThemeSelector

func (*ThemeSelector) Layout

Jump to

Keyboard shortcuts

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