Documentation
¶
Index ¶
- Constants
- Variables
- func ClearCursorLine()
- func ClearLines(count int)
- func HideCursor()
- func InitGetKey()
- func MoveCursorDown(by int)
- func MoveCursorLeft(by int)
- func MoveCursorRight(by int)
- func MoveCursorToLineStart()
- func MoveCursorUp(by int)
- func NewLine()
- func NewLines(count int)
- func OnCtrlC(callback func())
- func RestoreMode(mode string)
- func SaveMode() string
- func SendResizeEvents()
- func SetMode(flags Flag)
- func ShowCursor()
- func Update()
- type Flag
- type Key
Constants ¶
View Source
const ( AttrReset = "\x1b[0m" AttrBold = "\x1b[1m" AttrItalics = "\x1b[3m" AttrUnderline = "\x1b[4m" AttrBlink = "\x1b[5m" AttrBlack = "\x1b[30m" AttrRed = "\x1b[31m" AttrGreen = "\x1b[32m" AttrYellow = "\x1b[33m" AttrBlue = "\x1b[34m" AttrMagenta = "\x1b[35m" AttrCyan = "\x1b[36m" AttrWhite = "\x1b[37m" AttrGrey = "\x1b[90m" AttrBrightRed = "\x1b[91m" AttrBrightGreen = "\x1b[92m" AttrBrightYellow = "\x1b[93m" AttrBrightBlue = "\x1b[94m" AttrBrightMagenta = "\x1b[95m" AttrBrightCyan = "\x1b[96m" AttrBrightWhite = "\x1b[97m" )
View Source
const ( // Additional keys KeyArrowUp = Key(iota + 256) KeyArrowDown KeyArrowLeft KeyArrowRight KeyCtrlArrowUp KeyCtrlArrowDown KeyCtrlArrowLeft KeyCtrlArrowRight KeyResize // Window resize event // ASCII keys KeyEnter = Key('\n') KeyBackspace = Key(127) KeyEscape = Key(27) KeyTab = Key('\t') KeyNone = 0 )
View Source
const ( CBreak = 1 << iota NoEcho Echo NoIxon Ixon )
Variables ¶
View Source
var ( Width = 0 Height = 0 )
Functions ¶
func ClearCursorLine ¶
func ClearCursorLine()
func ClearLines ¶
func ClearLines(count int)
func HideCursor ¶
func HideCursor()
func InitGetKey ¶
func InitGetKey()
func MoveCursorDown ¶
func MoveCursorDown(by int)
func MoveCursorLeft ¶
func MoveCursorLeft(by int)
func MoveCursorRight ¶
func MoveCursorRight(by int)
func MoveCursorToLineStart ¶
func MoveCursorToLineStart()
func MoveCursorUp ¶
func MoveCursorUp(by int)
func RestoreMode ¶
func RestoreMode(mode string)
func SendResizeEvents ¶
func SendResizeEvents()
func ShowCursor ¶
func ShowCursor()
Types ¶
Click to show internal directories.
Click to hide internal directories.