Documentation ¶
Index ¶
- Constants
- Variables
- func HasFullscreenRenderer() bool
- type Attr
- type BorderCharacter
- type BorderShape
- type BorderStyle
- type Color
- type ColorPair
- type ColorTheme
- type Event
- type FillReturn
- type FullscreenRenderer
- func (r *FullscreenRenderer) Clear()
- func (r *FullscreenRenderer) Close()
- func (r *FullscreenRenderer) DoesAutoWrap() bool
- func (r *FullscreenRenderer) GetChar() Event
- func (r *FullscreenRenderer) Init()
- func (r *FullscreenRenderer) MaxX() int
- func (r *FullscreenRenderer) MaxY() int
- func (r *FullscreenRenderer) NewWindow(top int, left int, width int, height int, preview bool, ...) Window
- func (r *FullscreenRenderer) Pause(bool)
- func (r *FullscreenRenderer) Refresh()
- func (r *FullscreenRenderer) RefreshWindows(windows []Window)
- func (r *FullscreenRenderer) Resume(bool)
- type LightRenderer
- func (r *LightRenderer) Clear()
- func (r *LightRenderer) Close()
- func (r *LightRenderer) DoesAutoWrap() bool
- func (r *LightRenderer) GetChar() Event
- func (r *LightRenderer) Init()
- func (r *LightRenderer) MaxX() int
- func (r *LightRenderer) MaxY() int
- func (r *LightRenderer) NewWindow(top int, left int, width int, height int, preview bool, ...) Window
- func (r *LightRenderer) Pause(clear bool)
- func (r *LightRenderer) Refresh()
- func (r *LightRenderer) RefreshWindows(windows []Window)
- func (r *LightRenderer) Resume(clear bool)
- type LightWindow
- func (w *LightWindow) CFill(fg Color, bg Color, attr Attr, text string) FillReturn
- func (w *LightWindow) CPrint(pair ColorPair, attr Attr, text string)
- func (w *LightWindow) Close()
- func (w *LightWindow) Enclose(y int, x int) bool
- func (w *LightWindow) Erase()
- func (w *LightWindow) Fill(text string) FillReturn
- func (w *LightWindow) FinishFill()
- func (w *LightWindow) Height() int
- func (w *LightWindow) Left() int
- func (w *LightWindow) Move(y int, x int)
- func (w *LightWindow) MoveAndClear(y int, x int)
- func (w *LightWindow) Print(text string)
- func (w *LightWindow) Refresh()
- func (w *LightWindow) Top() int
- func (w *LightWindow) Width() int
- func (w *LightWindow) X() int
- func (w *LightWindow) Y() int
- type MouseEvent
- type Renderer
- type Window
Constants ¶
View Source
const ( AttrRegular Attr = Attr(0) Bold = Attr(1) Dim = Attr(1 << 1) Italic = Attr(1 << 2) Underline = Attr(1 << 3) Blink = Attr(1 << 4) Blink2 = Attr(1 << 5) Reverse = Attr(1 << 6) )
View Source
const ( Rune = iota CtrlA CtrlB CtrlC CtrlD CtrlE CtrlF CtrlG CtrlH Tab CtrlJ CtrlK CtrlL CtrlM CtrlN CtrlO CtrlP CtrlQ CtrlR CtrlS CtrlT CtrlU CtrlV CtrlW CtrlX CtrlY CtrlZ ESC CtrlSpace // https://apple.stackexchange.com/questions/24261/how-do-i-send-c-that-is-control-slash-to-the-terminal CtrlBackSlash CtrlRightBracket CtrlCaret CtrlSlash Invalid Resize Mouse DoubleClick LeftClick RightClick BTab BSpace Del PgUp PgDn Up Down Left Right Home End SUp SDown SLeft SRight F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Change AltSpace AltSlash AltBS AltUp AltDown AltLeft AltRight Alt0 )
Types of user action
Variables ¶
View Source
var ( Default16 *ColorTheme Dark256 *ColorTheme Light256 *ColorTheme ColPrompt ColorPair ColNormal ColorPair ColMatch ColorPair ColCursor ColorPair ColSelected ColorPair ColCurrent ColorPair ColCurrentMatch ColorPair ColCurrentCursor ColorPair ColCurrentSelected ColorPair ColSpinner ColorPair ColInfo ColorPair ColHeader ColorPair ColBorder ColorPair ColPreview ColorPair ColPreviewBorder ColorPair )
Functions ¶
func HasFullscreenRenderer ¶
func HasFullscreenRenderer() bool
Types ¶
type BorderCharacter ¶
type BorderCharacter int
type BorderShape ¶
type BorderShape int
const ( BorderNone BorderShape = iota BorderAround BorderHorizontal )
type BorderStyle ¶
type BorderStyle struct {
// contains filtered or unexported fields
}
func MakeBorderStyle ¶
func MakeBorderStyle(shape BorderShape, unicode bool) BorderStyle
func MakeTransparentBorder ¶
func MakeTransparentBorder() BorderStyle
type ColorPair ¶
type ColorPair struct {
// contains filtered or unexported fields
}
func NewColorPair ¶
type ColorTheme ¶
type ColorTheme struct { Fg Color Bg Color PreviewFg Color PreviewBg Color DarkBg Color Gutter Color Prompt Color Match Color Current Color CurrentMatch Color Spinner Color Info Color Cursor Color Selected Color Header Color Border Color }
func EmptyTheme ¶
func EmptyTheme() *ColorTheme
type Event ¶
type Event struct { Type int Char rune MouseEvent *MouseEvent }
type FillReturn ¶
type FillReturn int
const ( FillContinue FillReturn = iota FillNextLine FillSuspend )
type FullscreenRenderer ¶
type FullscreenRenderer struct {
// contains filtered or unexported fields
}
func (*FullscreenRenderer) Clear ¶
func (r *FullscreenRenderer) Clear()
func (*FullscreenRenderer) Close ¶
func (r *FullscreenRenderer) Close()
func (*FullscreenRenderer) DoesAutoWrap ¶
func (r *FullscreenRenderer) DoesAutoWrap() bool
func (*FullscreenRenderer) GetChar ¶
func (r *FullscreenRenderer) GetChar() Event
func (*FullscreenRenderer) Init ¶
func (r *FullscreenRenderer) Init()
func (*FullscreenRenderer) MaxX ¶
func (r *FullscreenRenderer) MaxX() int
func (*FullscreenRenderer) MaxY ¶
func (r *FullscreenRenderer) MaxY() int
func (*FullscreenRenderer) NewWindow ¶
func (r *FullscreenRenderer) NewWindow(top int, left int, width int, height int, preview bool, borderStyle BorderStyle) Window
func (*FullscreenRenderer) Pause ¶
func (r *FullscreenRenderer) Pause(bool)
func (*FullscreenRenderer) Refresh ¶
func (r *FullscreenRenderer) Refresh()
func (*FullscreenRenderer) RefreshWindows ¶
func (r *FullscreenRenderer) RefreshWindows(windows []Window)
func (*FullscreenRenderer) Resume ¶
func (r *FullscreenRenderer) Resume(bool)
type LightRenderer ¶
type LightRenderer struct {
// contains filtered or unexported fields
}
Light renderer
func (*LightRenderer) Clear ¶
func (r *LightRenderer) Clear()
func (*LightRenderer) Close ¶
func (r *LightRenderer) Close()
func (*LightRenderer) DoesAutoWrap ¶
func (r *LightRenderer) DoesAutoWrap() bool
func (*LightRenderer) GetChar ¶
func (r *LightRenderer) GetChar() Event
func (*LightRenderer) Init ¶
func (r *LightRenderer) Init()
func (*LightRenderer) MaxX ¶
func (r *LightRenderer) MaxX() int
func (*LightRenderer) MaxY ¶
func (r *LightRenderer) MaxY() int
func (*LightRenderer) NewWindow ¶
func (r *LightRenderer) NewWindow(top int, left int, width int, height int, preview bool, borderStyle BorderStyle) Window
func (*LightRenderer) Pause ¶
func (r *LightRenderer) Pause(clear bool)
func (*LightRenderer) Refresh ¶
func (r *LightRenderer) Refresh()
func (*LightRenderer) RefreshWindows ¶
func (r *LightRenderer) RefreshWindows(windows []Window)
func (*LightRenderer) Resume ¶
func (r *LightRenderer) Resume(clear bool)
type LightWindow ¶
type LightWindow struct {
// contains filtered or unexported fields
}
func (*LightWindow) CFill ¶
func (w *LightWindow) CFill(fg Color, bg Color, attr Attr, text string) FillReturn
func (*LightWindow) Close ¶
func (w *LightWindow) Close()
func (*LightWindow) Erase ¶
func (w *LightWindow) Erase()
func (*LightWindow) Fill ¶
func (w *LightWindow) Fill(text string) FillReturn
func (*LightWindow) FinishFill ¶
func (w *LightWindow) FinishFill()
func (*LightWindow) Height ¶
func (w *LightWindow) Height() int
func (*LightWindow) Left ¶
func (w *LightWindow) Left() int
func (*LightWindow) Move ¶
func (w *LightWindow) Move(y int, x int)
func (*LightWindow) MoveAndClear ¶
func (w *LightWindow) MoveAndClear(y int, x int)
func (*LightWindow) Print ¶
func (w *LightWindow) Print(text string)
func (*LightWindow) Refresh ¶
func (w *LightWindow) Refresh()
func (*LightWindow) Top ¶
func (w *LightWindow) Top() int
func (*LightWindow) Width ¶
func (w *LightWindow) Width() int
func (*LightWindow) X ¶
func (w *LightWindow) X() int
func (*LightWindow) Y ¶
func (w *LightWindow) Y() int
type MouseEvent ¶
type Renderer ¶
type Renderer interface { Init() Pause(clear bool) Resume(clear bool) Clear() RefreshWindows(windows []Window) Refresh() Close() GetChar() Event MaxX() int MaxY() int DoesAutoWrap() bool NewWindow(top int, left int, width int, height int, preview bool, borderStyle BorderStyle) Window }
func NewFullscreenRenderer ¶
func NewFullscreenRenderer(theme *ColorTheme, forceBlack bool, mouse bool) Renderer
type Window ¶
type Window interface { Top() int Left() int Width() int Height() int Refresh() FinishFill() Close() X() int Y() int Enclose(y int, x int) bool Move(y int, x int) MoveAndClear(y int, x int) Print(text string) CPrint(color ColorPair, attr Attr, text string) Fill(text string) FillReturn CFill(fg Color, bg Color, attr Attr, text string) FillReturn Erase() }
Click to show internal directories.
Click to hide internal directories.