stackview

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 WithBar

func WithBar(s view.View, bar *Bar) view.View

Types

type Bar

type Bar struct {
	Title            string
	BackButtonTitle  string
	BackButtonHidden bool

	TitleView  view.View
	RightViews []view.View
	LeftViews  []view.View
}

type ChildView

type ChildView interface {
	view.View
	StackBar(*view.Context) *Bar // TODO(KD): Doesn't this make it harder to wrap??
}

type Stack

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

func (*Stack) Notify

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

func (*Stack) Pop

func (s *Stack) Pop()

func (*Stack) Push

func (s *Stack) Push(vs view.View)

func (*Stack) SetViews

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

func (*Stack) Unnotify

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

func (*Stack) Views

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

type View

type View struct {
	view.Embed
	Stack *Stack

	TitleTextStyle *text.Style
	BackTextStyle  *text.Style
	BarColor       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