draw

package
v0.0.0-...-5faa4f6 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultStyle = tcell.StyleDefault.Background(bgColor)

Functions

func ActiveInputOffset

func ActiveInputOffset(st *State) int

func HideCursorIfNeeded

func HideCursorIfNeeded(st *State, scr tcell.Screen)

func IsElementActive

func IsElementActive(st *State, element Element) bool

func MoveCursor

func MoveCursor(st *State, inputLen, delta int)

func SwitchElement

func SwitchElement(st *State, delta int)

func SwitchTab

func SwitchTab(st *State, numTabs int, delta int)

func Tui

func Tui(scr tcell.Screen, st *State, mdl *model.State)

Types

type CursorGlobalInfo

type CursorGlobalInfo struct {
	R    rune
	X, Y int
}

type Element

type Element int
const (
	ProjectNameInput Element = iota
	LocationInput
	SearchInput
	Tabs
	CreateButton
	LastElement
)

type Range

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

type State

type State struct {
	CursorOffs    map[Element]int
	ActiveElement Element
	PluginsShown  bool

	ActiveTab    int
	ActivePlugin int
	VisibleOffs  map[Element]int
	InputLens    map[Element]int
	// contains filtered or unexported fields
}

func NewState

func NewState() *State

func (*State) CursorPos

func (st *State) CursorPos() int

func (*State) InputLen

func (st *State) InputLen() int

func (*State) VisOff

func (st *State) VisOff() int

Jump to

Keyboard shortcuts

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