tui

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

internal/tui/drawing.go

internal/tui/tui.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawBuffer

func DrawBuffer(tuiManager *TUI, editor *core.Editor, activeTheme *theme.Theme)

DrawBuffer draws the *visible* portion using the provided theme. It now takes an activeTheme argument.

func DrawCursor

func DrawCursor(tuiManager *TUI, editor *core.Editor)

DrawCursor positions the terminal cursor using visual width calculations.

Types

type TUI

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

TUI manages the terminal screen using tcell.

func New

func New() (*TUI, error)

New creates and initializes a new TUI instance.

func (*TUI) Clear

func (t *TUI) Clear()

Clear clears the entire screen.

func (*TUI) Close

func (t *TUI) Close()

Close finalizes the tcell screen.

func (*TUI) GetScreen

func (t *TUI) GetScreen() tcell.Screen

GetScreen provides direct access (use with caution).

func (*TUI) PollEvent

func (t *TUI) PollEvent() tcell.Event

PollEvent retrieves the next event.

func (*TUI) Show

func (t *TUI) Show()

Show makes the changes visible.

func (*TUI) Size

func (t *TUI) Size() (int, int)

Size returns the width and height of the terminal screen.

Jump to

Keyboard shortcuts

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