Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activater

type Activater interface {
	Activate()
}

type C

type C = layout.Context

type D

type D = layout.Dimensions

type Deactivater

type Deactivater interface {
	Deactivate()
}

type Labeler

type Labeler interface {
	Label() string
}

type Layouter

type Layouter interface {
	Layout(C) D
}

type Tab

type Tab struct {
	Label        string
	W            Layouter
	Closeable    bool
	CloseButton  widget.Clickable
	BecameActive bool
	// contains filtered or unexported fields
}

func NewTab

func NewTab(label string, w Layouter, closeable bool) *Tab

func (*Tab) GetLabel

func (t *Tab) GetLabel() string

func (*Tab) Layout

func (t *Tab) Layout(gtx C) D

func (*Tab) LayoutButton

func (t *Tab) LayoutButton(gtx C) D

type TabEvent

type TabEvent struct {
	Type TabEventType
	Tab  Layouter
}

type TabEventType

type TabEventType int
const (
	TabEventClose TabEventType = iota
	TabEventActivate
)

type Tabbar

type Tabbar struct {
	Tabs []*Tab

	Active *Tab
	// contains filtered or unexported fields
}

func NewTabbar

func NewTabbar(tabs ...*Tab) *Tabbar

func (*Tabbar) Activate

func (tb *Tabbar) Activate(key interface{})

func (*Tabbar) ActiveIndex

func (tb *Tabbar) ActiveIndex() int

func (*Tabbar) Append

func (tb *Tabbar) Append(t *Tab)

func (*Tabbar) Close

func (tb *Tabbar) Close(index int)

    Close closes the indicated tab. You cannot close the active tab.

    func (*Tabbar) Events

    func (tb *Tabbar) Events(gtx layout.Context) []TabEvent

    func (*Tabbar) IndexOf

    func (tb *Tabbar) IndexOf(key interface{}) int

    func (*Tabbar) Insert

    func (tb *Tabbar) Insert(index int, t *Tab)

    func (*Tabbar) InsertAfter

    func (tb *Tabbar) InsertAfter(after, new *Tab)

    func (*Tabbar) Next

    func (tb *Tabbar) Next()

    func (*Tabbar) Prev

    func (tb *Tabbar) Prev()

    Source Files

    Directories

    Path Synopsis