Documentation
¶
Index ¶
- Constants
- Variables
- func Bg(s string, c ansiColor) string
- func ClearScreen()
- func ClosePopup()
- func Fg(s string, c ansiColor) string
- func GetCurrentFocus() (int, error)
- func HideCursor()
- func LoadAlternateScreen()
- func MoveCursorTo(x, y int)
- func NextItem()
- func NextPage()
- func OpenPopup(title string, tw, th int, f func(line string)) string
- func OpenPopupSelect(tw, th int)
- func PrevItem()
- func PrevPage()
- func Print(v ...interface{})
- func Println(v ...interface{})
- func ReloadAll()
- func RotateFocus()
- func ScrollHalfDown()
- func ScrollHalfUp()
- func ScrollLeft()
- func ScrollRight()
- func Select()
- func SetBg(c ansiColor)
- func SetFg(c ansiColor)
- func ShowCursor()
- func ShowKeyBindings()
- func UnloadAlternateScreen()
- type Window
- func (w *Window) Append(line string) *Window
- func (w *Window) Clear()
- func (w *Window) ClearWithFrame()
- func (w *Window) Close()
- func (w *Window) Content(content []string) *Window
- func (w *Window) Disable() *Window
- func (w *Window) Enable() *Window
- func (w *Window) Fill()
- func (w *Window) Focus() *Window
- func (w *Window) OnSelect(fns []func()) *Window
- func (w *Window) Relocate(x, y int) *Window
- func (w *Window) Render()
- func (w *Window) Resize(height, width int) *Window
- func (w *Window) Title(title string) *Window
- type WindowMeta
Constants ¶
View Source
const ( BLACK ansiColor = iota RED GREEN YELLOW BLUE MAGENTA CYAN WHITE )
Variables ¶
View Source
var Input = false
View Source
var WindowStore = []*Window{}
Functions ¶
func ClearScreen ¶
func ClearScreen()
func ClosePopup ¶
func ClosePopup()
func HideCursor ¶
func HideCursor()
func LoadAlternateScreen ¶
func LoadAlternateScreen()
func OpenPopupSelect ¶
func OpenPopupSelect(tw, th int)
func Println ¶
func Println(v ...interface{})
prints everything and append carriage return and newline
func RotateFocus ¶
func RotateFocus()
func ScrollHalfDown ¶
func ScrollHalfDown()
func ScrollHalfUp ¶
func ScrollHalfUp()
func ScrollLeft ¶
func ScrollLeft()
func ScrollRight ¶
func ScrollRight()
func ShowCursor ¶
func ShowCursor()
func ShowKeyBindings ¶
func ShowKeyBindings()
func UnloadAlternateScreen ¶
func UnloadAlternateScreen()
Types ¶
type Window ¶
type Window struct { Meta *WindowMeta /* window metadata */ // contains filtered or unexported fields }
var LensWindow *Window
var PopupWindow *Window
func NewRoundWindow ¶
func NewWindow ¶
x: vertical coordinate of window top-left point y: horizontal coordinate of window top-left point h: window's vertical length (including frame) w: window's horizontal length (including frame)
func (*Window) ClearWithFrame ¶
func (w *Window) ClearWithFrame()
type WindowMeta ¶
type WindowMeta struct {
// contains filtered or unexported fields
}
WindowMeta includes information about window manipulation
Click to show internal directories.
Click to hide internal directories.