ui

package
v0.0.0-...-80e25d9 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2016 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

type Box struct {
	PositionX int
	PositionY int
	Width     int
	Height    int

	// Embedded types
	Widget
}

func NewBox

func NewBox(x, y, width, height int) Box

func (Box) Draw

func (this Box) Draw()

func (Box) GetHorizontalCenter

func (this Box) GetHorizontalCenter() int

func (Box) GetVerticalCenter

func (this Box) GetVerticalCenter() int

type Button

type Button struct {
	Widget
}

type Drawable

type Drawable interface {
	Draw()
	DrawAll()
}

type TextBox

type TextBox struct {
	Widget
	Value string
}

func NewTextBox

func NewTextBox(defaultValue string) TextBox

func (TextBox) Draw

func (this TextBox) Draw()

type Ui

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

func NewUi

func NewUi() Ui

func (Ui) AddUrlPanel

func (this Ui) AddUrlPanel()

func (Ui) Draw

func (this Ui) Draw()

type Widget

type Widget struct {
	PositionX int
	PositionY int
	Width     int
	Height    int
	Color     termbox.Attribute
	BgColor   termbox.Attribute
	Children  []Drawable
}

func (*Widget) AddChild

func (this *Widget) AddChild(widget Drawable)

func (Widget) DrawAll

func (this Widget) DrawAll()

func (Widget) Flush

func (this Widget) Flush()

func (*Widget) SetBgColor

func (this *Widget) SetBgColor(newcolor termbox.Attribute)

func (*Widget) SetColor

func (this *Widget) SetColor(newcolor termbox.Attribute)

func (*Widget) SetPositionX

func (this *Widget) SetPositionX(x int)

func (*Widget) SetPositionY

func (this *Widget) SetPositionY(y int)

type Window

type Window struct {
	Widget
	Box
	Title string
}

func NewWindow

func NewWindow(title string, x, y, width, height int) Window

func (*Window) SetTitle

func (this *Window) SetTitle(title string)

Jump to

Keyboard shortcuts

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