txtview

package
v0.0.0-...-baca244 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Title *string

	BgColor       tcell.Color
	Wrap          bool
	DynamicColors bool
	Regions       bool
	FullScreen    bool

	X, Y, Rows, Cols int // Position and size of the viewer when FullScreen is false

	Border      bool
	BorderAttr  *tcell.AttrMask
	BorderStyle *tcell.Style

	DoneFunc func(tcell.Key, *Viewer)
}

func NewDefaultOpts

func NewDefaultOpts() *Options

type Viewer

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

func NewViewer

func NewViewer(opts ...*Options) *Viewer

func (*Viewer) App

func (v *Viewer) App() *tview.Application

func (*Viewer) Run

func (v *Viewer) Run() error

func (*Viewer) SetOpts

func (v *Viewer) SetOpts(opts *Options) *Viewer

func (*Viewer) Stop

func (v *Viewer) Stop()

func (*Viewer) View

func (v *Viewer) View() *tview.TextView

func (*Viewer) Write

func (v *Viewer) Write(p []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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