screen

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package screen configures the screen, basically remembering the size and foreground and background colours.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Screen added in v1.0.11

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

Screen is a wrapper around termbox

func NewScreen added in v1.0.11

func NewScreen(program string) *Screen

NewScreen initialises a screen, clearing it, returning a *Screen

func (*Screen) BoldPrintAt added in v1.0.11

func (screen *Screen) BoldPrintAt(x int, y int, text string)

BoldPrintAt displays bold text at the location specified, but does not try to display outside of the screen boundary.

func (*Screen) Clear added in v1.0.11

func (screen *Screen) Clear()

Clear clears the screen

func (*Screen) ClearLine added in v1.0.11

func (screen *Screen) ClearLine(x int, y int)

ClearLine clears the line with spaces to the right hand side of the screen

func (*Screen) Close added in v1.0.11

func (screen *Screen) Close()

Close closes the screen prior to shutdown

func (*Screen) Flush added in v1.0.11

func (screen *Screen) Flush()

Flush pushes out the pending changes to the screen

func (*Screen) Height added in v1.0.11

func (screen *Screen) Height() int

Height returns the current height of the screen

func (*Screen) InvertedClearLine added in v1.1.8

func (screen *Screen) InvertedClearLine(x int, y int)

InvertedClearLine clears the line with inverted spaces to the right hand side of the screen

func (*Screen) InvertedPrintAt added in v1.0.11

func (screen *Screen) InvertedPrintAt(x int, y int, text string)

InvertedPrintAt displays text inverting background and foreground colours at the location specified, but does not try to display outside of the screen boundary.

func (*Screen) PrintAt added in v1.0.11

func (screen *Screen) PrintAt(x int, y int, text string)

PrintAt prints the characters at the requested location while they fit in the screen

func (*Screen) SetSize added in v1.0.11

func (screen *Screen) SetSize(width, height int)

SetSize records the size of the screen and if the terminal gets longer then clear out the bottom line.

func (*Screen) Size added in v1.0.11

func (screen *Screen) Size() (int, int)

Size returns the current (width, height) of the screen

func (Screen) TermBoxChan added in v1.0.11

func (screen Screen) TermBoxChan() chan termbox.Event

TermBoxChan creates a channel for termbox.Events and run a poller to send these events to the channel. Return the channel to the caller..

Jump to

Keyboard shortcuts

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