view

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package view provides local view that can be swapped in and out.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(views ...View) seed.Option

List creates a viewset that can be used with Index, Back & Next functions.

func Name

func Name(view View) string

func New

func New(options ...seed.Option) seed.Seed

func OnEnter

func OnEnter(f ...client.Script) seed.Option

func OnExit

func OnExit(f ...client.Script) seed.Option

func Set

func Set(starting View) seed.Option

Set adds and sets an initial view to the seed.

Types

type Controller

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

Controller is responsible for showing the current view.

func ControllerOf

func ControllerOf(c seed.Seed) Controller

ControllerOf returns the Controller for the given seed.

func (Controller) Back

func (c Controller) Back() client.Script

Back changes to the back view in the List

func (Controller) Goto

func (c Controller) Goto(view View) js.Script

Goto returns a script that goes to the given view.

func (Controller) Is

func (c Controller) Is(v View) *clientside.Bool

Is returns true if the given view is the current view of the given controller..

func (Controller) Next

func (c Controller) Next() client.Script

Next changes to the next view in the List

func (Controller) Reset

func (c Controller) Reset() client.Script

Reset the controller to the default view.

func (Controller) Seed

func (c Controller) Seed() seed.Seed

type View

type View interface {
	View(Controller) seed.Seed
}

View is a local view.

Jump to

Keyboard shortcuts

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