ui

package
v0.0.0-...-5c6c0cc Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderBar

func RenderBar(r rune, y int, fg, bg termbox.Attribute)

func RenderRect

func RenderRect(rect image.Rectangle, colour termbox.Attribute)

func RenderRune

func RenderRune(r rune, x, y int, fg, bg termbox.Attribute)

func RenderText

func RenderText(text string, x, y int, fg, bg termbox.Attribute)

Types

type Component

type Component struct {
	X, Y int
	// contains filtered or unexported fields
}

func (*Component) GetPosition

func (c *Component) GetPosition() (int, int)

func (*Component) Handle

func (c *Component) Handle(event termbox.Event)

func (*Component) Height

func (c *Component) Height() int

func (*Component) InBounds

func (c *Component) InBounds(x, y int) bool

func (*Component) SetPosition

func (c *Component) SetPosition(x, y int)

func (*Component) SetSize

func (c *Component) SetSize(width, height int)

func (*Component) Width

func (c *Component) Width() int

type UIComponent

type UIComponent interface {
	Render()
	SetPosition(x, y int)
	GetPosition() (int, int)
	SetSize(width, height int)
	Width() int
	InBounds(x, y int) bool
	Handle(event termbox.Event)
}

Jump to

Keyboard shortcuts

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