nav

package
v0.0.0-...-e7f5644 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PageNavigator interface {
	Draw() error
	MaxScrollX() int
	MaxScrollY() int
	PageDown() bool
	PageUp() bool
	Pages() int
	ScrollDown()
	ScrollLeft()
	ScrollRight()
	ScrollUp()
	SetDoc(parse.Cellbuf)
	Size() (int, int)
	ToBottom()
	ToTop()
}

type Pager

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

func (*Pager) Draw

func (p *Pager) Draw() error

Draw displays a pager's cell buffer in the terminal.

func (*Pager) MaxScrollX

func (p *Pager) MaxScrollX() int

maxScrollX represents the pager's maximum horizontal scroll distance.

func (*Pager) MaxScrollY

func (p *Pager) MaxScrollY() int

maxScrollY represents the pager's maximum vertical scroll distance.

func (*Pager) PageDown

func (p *Pager) PageDown() bool

pageDown pans the pager's viewport down by a full page, without exceeding the underlying cell buffer document's boundaries.

func (*Pager) PageUp

func (p *Pager) PageUp() bool

pageUp pans the pager's viewport up by a full page, without exceeding the underlying cell buffer document's boundaries.

func (*Pager) Pages

func (p *Pager) Pages() int

pages returns the number of times the pager's underlying cell buffer document can be split into viewport sized pages.

func (*Pager) ScrollDown

func (p *Pager) ScrollDown()

scrollDown pans the pager's viewport down, without exceeding the underlying cell buffer document's boundaries.

func (*Pager) ScrollLeft

func (p *Pager) ScrollLeft()

scrollLeft pans the pager's viewport left, without exceeding the underlying cell buffer document's boundaries.

func (*Pager) ScrollRight

func (p *Pager) ScrollRight()

scrollRight pans the pager's viewport right, without exceeding the underlying cell buffer document's boundaries.

func (*Pager) ScrollUp

func (p *Pager) ScrollUp()

scrollUp pans the pager's viewport up, without exceeding the underlying cell buffer document's boundaries.

func (*Pager) SetDoc

func (p *Pager) SetDoc(doc parse.Cellbuf)

setDoc sets the pager's cell buffer

func (*Pager) Size

func (p *Pager) Size() (int, int)

size returns the width and height of the pager's underlying cell buffer document.

func (*Pager) ToBottom

func (p *Pager) ToBottom()

toBottom set's the pager's horizontal panning distance back to zero and vertical panning distance to the last viewport page.

func (*Pager) ToTop

func (p *Pager) ToTop()

toTop set's the pager's horizontal and vertical panning distance back to zero.

Jump to

Keyboard shortcuts

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