screen

package
v1.5.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWidth  = 80
	DefaultHeight = 25
)

Variables

This section is empty.

Functions

func New

func New(vt int) error

New initialize new screen on tty2

func Push

func Push(section Section)

Push section to screen

func Refresh

func Refresh()

Refresh redraws the screen after an update of the sctions

func StringWidth

func StringWidth(s string) int

Types

type Attribute

type Attribute string
const (
	Bold  Attribute = "1"
	Red   Attribute = "31"
	Blue  Attribute = "34"
	Green Attribute = "32"
)

type Attributes

type Attributes []Attribute

type CenteredText

type CenteredText struct {
	TextSection
}

type Frame

type Frame []Section

type GroupSection

type GroupSection struct {
	Sections []Section
}

type ProgressSection

type ProgressSection struct {
	Text string
	// contains filtered or unexported fields
}

func (*ProgressSection) Enter added in v1.2.2

func (s *ProgressSection) Enter()

func (*ProgressSection) Leave added in v1.2.2

func (s *ProgressSection) Leave()

type RowCell

type RowCell struct {
	Text string
}

type RowSection

type RowSection struct {
	Cells []RowCell
}

type Section

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

type SplitterSection

type SplitterSection struct {
	Title string
}

type TextSection

type TextSection struct {
	Attributes Attributes
	Text       string
}

func (*TextSection) String

func (s *TextSection) String() string

Jump to

Keyboard shortcuts

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