table

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 4 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 Behavior added in v0.2.0

type Behavior interface {
}

TODO(KD): Behavior does nothing at the moment.

type Layouter

type Layouter struct {
	StartEdge layout.Edge // If no edges or more than one edge is specified layout.EdgeTop will be used.
	// contains filtered or unexported fields
}

func (*Layouter) Add

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

Add adds v to the layouter and positions it with g. Pass nil for the behavior.

func (*Layouter) Layout

func (l *Layouter) Layout(ctx layout.Context) (layout.Guide, []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.

Jump to

Keyboard shortcuts

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