tui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSpaces

func BuildSpaces(maxOffset int) string

Types

type TUI

type TUI struct {
	Redraw chan bool

	Message string
	Error   string
	Hello   [][]rune
	CurOff  int
	H       int
	W       int
	XScroll int
	CurRow  int
	YScroll int
	// contains filtered or unexported fields
}

func InitTUI

func InitTUI(w int) *TUI

func (*TUI) AddVisual

func (ui *TUI) AddVisual(curMode mode.Mode, l []rune, i int, startOffset, startLine, endOffset, endLine int, Type buffers.BufferType) string

This function is used to add visual highlight to the selected lines

func (*TUI) BuildCommandBar

func (ui *TUI) BuildCommandBar(curdata string) string

func (*TUI) BuildLine

func (ui *TUI) BuildLine(str []rune, show bool, start, end int, i int, isCurrent bool, isFirst bool, Type buffers.BufferType) string

func (*TUI) BuildLowerBar

func (ui *TUI) BuildLowerBar(x int, y int, curdata string, message string, err string, cmd string) string

func (*TUI) BuildNumber

func (ui *TUI) BuildNumber(curLine int, n int, maxOffset int, rln bool) string

this func is used to build pretty line numbers (represented with '.'): |..8 // foo func |..9 func foo() { |.10 bar() |.11 baz() |.12 }

func (*TUI) BuildTabs

func (ui *TUI) BuildTabs(tabs []string, curTab int, show bool) string

func (*TUI) Center

func (ui *TUI) Center(l []rune) string

func (*TUI) MakeDirty

func (tui *TUI) MakeDirty()

func (*TUI) PurgeCache

func (ui *TUI) PurgeCache()

func (*TUI) ResetRender

func (ui *TUI) ResetRender()

func (*TUI) ResizeRender

func (ui *TUI) ResizeRender(w int)

func (*TUI) ToggleRender

func (ui *TUI) ToggleRender()

func (*TUI) WithEndLine

func (ui *TUI) WithEndLine(l string) []rune

used to add 'new line' symbol to the givven selected line

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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