table

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package table implements a vertical, single column layout system. Views are layed out from top to bottom.

l := &table.Layouter{}

childView := NewChildView(...)
l.Add(childView, nil) // The height of the view is determined by the child's layouter.

return view.Model{
	Views: l.Views(),
	Layouter:l,
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layouter

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

func (*Layouter) Add

func (l *Layouter) Add(v view.View, b ScrollBehavior)

Add adds v to the layouter and positions it with g.

func (*Layouter) Layout

func (l *Layouter) Layout(ctx *layout.Context) (layout.Guide, map[matcha.Id]layout.Guide)

Layout implements the view.Layouter interface.

func (*Layouter) Notify

func (l *Layouter) Notify(f func()) comm.Id

Notify implements the view.Layouter interface.

func (*Layouter) Unnotify

func (l *Layouter) Unnotify(id comm.Id)

Unnotify implements the view.Layouter interface.

func (*Layouter) Views

func (l *Layouter) Views() []view.View

Views returns all views that have been added to l.

type ScrollBehavior

type ScrollBehavior interface {
}

Jump to

Keyboard shortcuts

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