viewport

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CursorFunc

type CursorFunc func(lineno, col int)

type RenderFunc

type RenderFunc func(lineno, col int, line []rune)

type RenderLine

type RenderLine struct {
	Content                 []rune
	LineLogical, LineBuffer int
	// contains filtered or unexported fields
}

func (*RenderLine) GetStyle

func (rl *RenderLine) GetStyle(col int) tcell.Style

type Rendering

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

Rendering essentially represents a double buffer in the graphics programming sense.

func (*Rendering) Cursor

func (r *Rendering) Cursor() (int, int)

func (*Rendering) Line

func (r *Rendering) Line() *RenderLine

func (*Rendering) Scan

func (r *Rendering) Scan() bool

type Viewport

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

func New

func New(buffer *buffer.Buffer) *Viewport

func (*Viewport) PageDown

func (v *Viewport) PageDown() int

func (*Viewport) PageUp

func (v *Viewport) PageUp() int

func (*Viewport) Render

func (v *Viewport) Render(
	w, h, cursorlineno, cursorcol int, hilite highlighting.Highlighting) *Rendering

func (*Viewport) SetTeleported

func (v *Viewport) SetTeleported(y int)

func (*Viewport) Start

func (v *Viewport) Start() int

Jump to

Keyboard shortcuts

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