Documentation
¶
Overview ¶
internal/tui/drawing.go
internal/tui/tui.go
Index ¶
- func DrawBox(screen tcell.Screen, x, y, width, height int, style tcell.Style)
- func DrawBuffer(tuiManager *TUI, editor *core.Editor, activeTheme *theme.Theme)
- func DrawCursor(tuiManager *TUI, editor *core.Editor)
- func DrawText(screen tcell.Screen, x, y, maxWidth int, text string, style tcell.Style)
- type FuzzyFinder
- type Overlay
- type TUI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DrawBuffer ¶
DrawBuffer draws the *visible* portion using the provided theme. It uses the editor's dirty-line tracking to skip rows that have not changed, avoiding redundant screen.SetContent calls. After drawing, it calls ClearDirty.
func DrawCursor ¶
DrawCursor positions the terminal cursor using visual width calculations.
Types ¶
type FuzzyFinder ¶ added in v0.1.3
type FuzzyFinder struct {
// contains filtered or unexported fields
}
FuzzyFinder is an overlay for finding files
func NewFuzzyFinder ¶ added in v0.1.3
func NewFuzzyFinder(onSelect func(filePath string)) *FuzzyFinder
NewFuzzyFinder creates a new instance
func (*FuzzyFinder) HandleKeyEvent ¶ added in v0.1.3
func (f *FuzzyFinder) HandleKeyEvent(ev *tcell.EventKey) bool
func (*FuzzyFinder) IsActive ¶ added in v0.1.3
func (f *FuzzyFinder) IsActive() bool
func (*FuzzyFinder) Toggle ¶ added in v0.1.3
func (f *FuzzyFinder) Toggle(rootPath string)
Toggle activates or deactivates the finder
type Overlay ¶ added in v0.1.3
type Overlay interface {
Draw(screen tcell.Screen, t *theme.Theme, screenW, screenH int)
HandleKeyEvent(ev *tcell.EventKey) bool // returns true if event was consumed
IsActive() bool
}
Overlay represents a floating UI element
type TUI ¶
type TUI struct {
// contains filtered or unexported fields
}
TUI manages the terminal screen using tcell.
func (*TUI) Clear ¶
func (t *TUI) Clear()
Clear clears the entire screen ensuring the background color is applied.
Click to show internal directories.
Click to hide internal directories.