tabview

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithButton

func WithButton(s view.View, button *Button) view.View

Types

type Button

type Button struct {
	Title        string
	Icon         image.Image
	SelectedIcon image.Image
	Badge        string
}

type ChildView

type ChildView interface {
	view.View
	TabButton(*view.Context) *Button
}

type Tabs

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

func (*Tabs) Notify

func (s *Tabs) Notify(f func()) comm.Id

func (*Tabs) SelectedIndex

func (s *Tabs) SelectedIndex() int

func (*Tabs) SetSelectedIndex

func (s *Tabs) SetSelectedIndex(idx int)

func (*Tabs) SetViews

func (s *Tabs) SetViews(ss ...view.View)

func (*Tabs) Unnotify

func (s *Tabs) Unnotify(id comm.Id)

func (*Tabs) Views

func (s *Tabs) Views() []view.View

type View

type View struct {
	view.Embed
	Tabs                *Tabs
	BarColor            color.Color
	SelectedTextStyle   *text.Style
	UnselectedTextStyle *text.Style
	SelectedColor       color.Color
	UnselectedColor     color.Color
	// contains filtered or unexported fields
}

func New

func New(ctx *view.Context, key string) *View

func (*View) Build

func (v *View) Build(ctx *view.Context) view.Model

func (*View) Lifecycle

func (v *View) Lifecycle(from, to view.Stage)

Jump to

Keyboard shortcuts

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