jotframe

package
v0.0.0-...-a4c2a2d Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

func GetCursorRow

func GetCursorRow() (int, error)

todo: will this be supported on windows?... https://github.com/nsf/termbox-go/blob/master/termbox_windows.go currently assumed VT100 compatible emulator

func GetTerminalSize

func GetTerminalSize() (int, int)

func Refresh

func Refresh() error

func TrimToVisualLength

func TrimToVisualLength(message string, length int) string

func VisualLength

func VisualLength(str string) int

Types

type BottomFrame

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

func NewBottomFrame

func NewBottomFrame(rows int, hasHeader, hasFooter bool, includeTrailOnRemove bool) *BottomFrame

func (*BottomFrame) Append

func (frame *BottomFrame) Append() (*Line, error)

func (*BottomFrame) AppendTrail

func (frame *BottomFrame) AppendTrail(str string)

func (*BottomFrame) Clear

func (frame *BottomFrame) Clear() error

func (*BottomFrame) ClearAndClose

func (frame *BottomFrame) ClearAndClose() error

func (*BottomFrame) Close

func (frame *BottomFrame) Close() error

func (*BottomFrame) Footer

func (frame *BottomFrame) Footer() *Line

func (*BottomFrame) Header

func (frame *BottomFrame) Header() *Line

func (*BottomFrame) Insert

func (frame *BottomFrame) Insert(index int) (*Line, error)

func (*BottomFrame) Lines

func (frame *BottomFrame) Lines() []*Line

func (*BottomFrame) Prepend

func (frame *BottomFrame) Prepend() (*Line, error)

func (*BottomFrame) Remove

func (frame *BottomFrame) Remove(line *Line) error

func (*BottomFrame) Wait

func (frame *BottomFrame) Wait()

type FixedFrame

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

func NewFixedFrame

func NewFixedFrame(rows int, hasHeader, hasFooter, includeTrailOnRemove bool) *FixedFrame

func NewFixedFrameAt

func NewFixedFrameAt(rows int, hasHeader, hasFooter, includeTrailOnRemove bool, destinationRow int) *FixedFrame

func (*FixedFrame) Append

func (frame *FixedFrame) Append() (*Line, error)

func (*FixedFrame) AppendTrail

func (frame *FixedFrame) AppendTrail(str string)

func (*FixedFrame) Clear

func (frame *FixedFrame) Clear() error

func (*FixedFrame) ClearAndClose

func (frame *FixedFrame) ClearAndClose() error

func (*FixedFrame) Close

func (frame *FixedFrame) Close() error

func (*FixedFrame) Footer

func (frame *FixedFrame) Footer() *Line

func (*FixedFrame) Header

func (frame *FixedFrame) Header() *Line

func (*FixedFrame) Insert

func (frame *FixedFrame) Insert(index int) (*Line, error)

func (*FixedFrame) Lines

func (frame *FixedFrame) Lines() []*Line

func (*FixedFrame) Move

func (frame *FixedFrame) Move(rows int) error

func (*FixedFrame) Prepend

func (frame *FixedFrame) Prepend() (*Line, error)

func (*FixedFrame) Remove

func (frame *FixedFrame) Remove(line *Line) error

func (*FixedFrame) Wait

func (frame *FixedFrame) Wait()

type Line

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

func NewLine

func NewLine(row int, closeSignal *sync.WaitGroup) *Line

func (*Line) Clear

func (line *Line) Clear() error

func (*Line) ClearAndClose

func (line *Line) ClearAndClose() error

func (*Line) Close

func (line *Line) Close() error

func (*Line) Id

func (line *Line) Id() uuid.UUID

func (*Line) IsClosed

func (line *Line) IsClosed() bool

func (*Line) Open

func (line *Line) Open() error

func (*Line) Read

func (line *Line) Read(buff []byte) (int, error)

func (*Line) Row

func (line *Line) Row() int

func (Line) String

func (line Line) String() string

func (*Line) Write

func (line *Line) Write(buff []byte) (int, error)

func (*Line) WriteAndClose

func (line *Line) WriteAndClose(buff []byte) (int, error)

func (*Line) WriteString

func (line *Line) WriteString(str string) error

func (*Line) WriteStringAndClose

func (line *Line) WriteStringAndClose(str string) (int, error)

type TopFrame

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

func NewTopFrame

func NewTopFrame(rows int, hasHeader, hasFooter bool) *TopFrame

func (*TopFrame) Append

func (frame *TopFrame) Append() (*Line, error)

func (*TopFrame) Clear

func (frame *TopFrame) Clear() error

func (*TopFrame) ClearAndClose

func (frame *TopFrame) ClearAndClose() error

func (*TopFrame) Close

func (frame *TopFrame) Close() error

func (*TopFrame) Footer

func (frame *TopFrame) Footer() *Line

func (*TopFrame) Header

func (frame *TopFrame) Header() *Line

func (*TopFrame) Insert

func (frame *TopFrame) Insert(index int) (*Line, error)

func (*TopFrame) Lines

func (frame *TopFrame) Lines() []*Line

func (*TopFrame) Prepend

func (frame *TopFrame) Prepend() (*Line, error)

func (*TopFrame) Remove

func (frame *TopFrame) Remove(line *Line) error

func (*TopFrame) Wait

func (frame *TopFrame) Wait()

type Worker

type Worker interface {
	Work(*Line)
}

Worker is working

Jump to

Keyboard shortcuts

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