textbox

package module
v0.0.0-...-dce8956 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayWidth

func DisplayWidth(s string) (ret int)

func MakeMove

func MakeMove(fn func() Point, x, y int) func() Point

func RuneWidth

func RuneWidth(r rune) int

Types

type Backend

type Backend interface {
	Size() (int, int)
	EventsChan() chan Event
	Flush(*Buffer)
	Close()
}

type Box

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

func (*Box) Adjust

func (b *Box) Adjust()

func (*Box) BottomCenter

func (b *Box) BottomCenter() Point

func (*Box) BottomLeft

func (b *Box) BottomLeft() Point

func (*Box) BottomRight

func (b *Box) BottomRight() Point

func (*Box) Center

func (b *Box) Center() Point

func (*Box) CenterLeft

func (b *Box) CenterLeft() Point

func (*Box) CenterRight

func (b *Box) CenterRight() Point

func (*Box) Fill

func (b *Box) Fill()

func (*Box) SetAdjust

func (b *Box) SetAdjust(topLeft, bottomRight func() Point, depends ...*Box)

func (*Box) SetFill

func (b *Box) SetFill(fill func(*Box), depends ...*Box)

func (*Box) TopCenter

func (b *Box) TopCenter() Point

func (*Box) TopLeft

func (b *Box) TopLeft() Point

func (*Box) TopRight

func (b *Box) TopRight() Point

type Buffer

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

func NewBuffer

func NewBuffer(size int) *Buffer

func (*Buffer) Resize

func (b *Buffer) Resize(size int)

type Dependencies

type Dependencies struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewDependencies

func NewDependencies() *Dependencies

func (*Dependencies) Add

func (d *Dependencies) Add(box, depend *Box)

func (*Dependencies) Iter

func (d *Dependencies) Iter(from *Box, fn func(*Box))

type DumbBackend

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

func NewDumbBackend

func NewDumbBackend() *DumbBackend

func (*DumbBackend) Close

func (b *DumbBackend) Close()

func (*DumbBackend) EventsChan

func (b *DumbBackend) EventsChan() chan Event

func (*DumbBackend) Flush

func (b *DumbBackend) Flush(buf *Buffer)

func (*DumbBackend) Resize

func (b *DumbBackend) Resize(width, height int)

func (*DumbBackend) Size

func (b *DumbBackend) Size() (int, int)

type ErrorEvent

type ErrorEvent struct {
}

type Event

type Event interface {
	// contains filtered or unexported methods
}

type Point

type Point struct {
	X, Y int
}

func (Point) Move

func (p Point) Move(x, y int) Point

type ResizeEvent

type ResizeEvent struct {
	Width, Height int
}

type Window

type Window struct {
	Events chan Event
	Root   *Box
	// contains filtered or unexported fields
}

func New

func New(backend Backend) *Window

func (*Window) Box

func (w *Window) Box() *Box

func (*Window) Close

func (w *Window) Close()

Jump to

Keyboard shortcuts

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