Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Anim

type Anim struct {
	Next func(int) (int, time.Duration)
	// contains filtered or unexported fields
}

func (*Anim) Animate

func (a *Anim) Animate(gtx layout.Context) int

    Animate returns the value and moves the animation forward.

    func (*Anim) Animating

    func (a *Anim) Animating() bool

    func (*Anim) Start

    func (a *Anim) Start(start, end int)

      Start starts the animation, ending when the value crosses the end value.

      func (*Anim) Value

      func (a *Anim) Value() int

        Value returns the current value, without animating.

        type Button

        type Button struct {
        	Hover  color.NRGBA
        	Border widget.Border
        }

        func (Button) Layout

        func (b Button) Layout(gtx layout.Context, click *widget.Clickable, w layout.Widget) layout.Dimensions

        type Label

        type Label struct {
        	Color  color.NRGBA
        	Shaper text.Shaper
        	Font   text.Font
        	Size   unit.Value
        	Inset  layout.Inset
        	// contains filtered or unexported fields
        }

        func (Label) Layout

        func (l Label) Layout(gtx layout.Context, txt string) layout.Dimensions
        type Menu struct {
        	List   layout.List
        	Label  Label
        	Hover  color.NRGBA
        	Border widget.Border
        	// contains filtered or unexported fields
        }

          Menu lays out a vertical set of widgets and adds a border around each of them. Borders will all have their width set to the widest widget.

          func (m *Menu) Clicked() (idx int)
          func (m *Menu) Hovered(idx int) bool
          func (m *Menu) Layout(gtx layout.Context, n int, el MenuElement) layout.Dimensions

            Layout lays out the widgets with a button if set as such, in the center of the current container.

            type MenuElement func(layout.Context, int) MenuItem
            type MenuItem struct {
            	// contains filtered or unexported fields
            }
            func MenuButton(w layout.Widget) MenuItem
            func MenuNoTitle(w layout.Widget) MenuItem
            func MenuSpacer(v unit.Value) MenuItem
            func MenuTitle(w layout.Widget, title string) MenuItem

            type Table

            type Table struct {
            	Hover      color.NRGBA
            	LineColor  color.NRGBA
            	LineHeight unit.Value
            	// contains filtered or unexported fields
            }

            func (*Table) Clicked

            func (t *Table) Clicked() int

            func (*Table) Layout

            func (t *Table) Layout(gtx layout.Context, rows int, el TableRow) layout.Dimensions

            type TableColumn

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

            type TableRow

            type TableRow func(layout.Context, int) layout.Dimensions