goc

package module
v0.0.0-...-01d4552 Latest Latest
Warning

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

Go to latest
Published: May 8, 2015 License: MIT Imports: 2 Imported by: 0

README

goc

Go terminal applications

Documentation

Index

Constants

View Source
const (
	BorderT = iota
	BorderTR
	BorderR
	BorderBR
	BorderB
	BorderBL
	BorderL
	BorderTL
)

Variables

This section is empty.

Functions

func CopyCells

func CopyCells(src, dst []termbox.Cell, srcWidth, dstX, dstY, dstWidth int)

func RunesToCells

func RunesToCells(input []rune, fg, bg termbox.Attribute) []termbox.Cell

func Screen

func Screen(c SizedCeller)

func SetCells

func SetCells(src []termbox.Cell, srcWidth, dstX, dstY int)

func StrToCells

func StrToCells(input string, fg, bg termbox.Attribute) []termbox.Cell

func Width

func Width(c Celler) (width int, ok bool)

Types

type BorderRunes

type BorderRunes map[int]rune

type Bordered

type Bordered struct {
	Content                              Celler
	Label                                string
	Runes                                BorderRunes
	BorderFg, BorderBg, LabelFg, LabelBg termbox.Attribute
}

func (*Bordered) SizedCells

func (b *Bordered) SizedCells(x, y, width, height int) []termbox.Cell

type Celler

type Celler interface {
	Cells() (cells []termbox.Cell, width int)
}

type HeightCeller

type HeightCeller interface {
	Celler
	Height(width int) int
}

type Padded

type Padded struct {
	Content                  SizedCeller
	Top, Right, Bottom, Left int
}

func PaddedEven

func PaddedEven(content SizedCeller, padding int) *Padded

func (*Padded) SizedCells

func (p *Padded) SizedCells(x, y, width, height int) []termbox.Cell

type Sized

type Sized struct {
	Content Celler
}

func (*Sized) SizedCells

func (s *Sized) SizedCells(x, y, width, height int) []termbox.Cell

type SizedCeller

type SizedCeller interface {
	SizedCells(x, y, width, height int) []termbox.Cell
}

type Sizer

type Sizer interface {
	Size() (width, height int)
}

type Text

type Text struct {
	Content []termbox.Cell
}

func (*Text) Cells

func (t *Text) Cells() ([]termbox.Cell, int)

func (*Text) Lines

func (t *Text) Lines() [][]termbox.Cell

func (*Text) Size

func (t *Text) Size() (width, height int)

type VertScroll

type VertScroll struct {
	Content HeightCeller
}

func (*VertScroll) Cells

func (vs *VertScroll) Cells(x, y, width, height int) []termbox.Cell

type Widther

type Widther interface {
	Width() int
}

type Wrapped

type Wrapped struct {
	Content  Celler
	WordWrap bool
}

func (*Wrapped) SizedCells

func (w *Wrapped) SizedCells(x, y, width, height int) []termbox.Cell

func (*Wrapped) WrappedCells

func (w *Wrapped) WrappedCells(width int) []termbox.Cell

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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