Documentation
¶
Index ¶
- Variables
- func AddChildPager(parent, child Pager, creatingKey string)
- func AddEventListener(keyStr string, handler func())
- func Close()
- func Confirm(message string, callback func())
- func ConfirmExec(cmd string, ctx Context, callback func())
- func Exec(cmd string, ctx Context)
- func Init() error
- func InterpolateContext(str string, ctx Context) string
- func KeyEventFromString(str string) keyEvent
- func KeyEventFromTBEvent(tbev *termbox.Event) keyEvent
- func LoadConfig(rd io.Reader)
- func PopPager()
- func PushPager(p Pager)
- func Quit()
- func RegisterMode(name string, mode Mode)
- func Run()
- func SetAnnotatorsDir(dir string)
- type Annotation
- type Annotations
- type Annotator
- type Box
- type Buffer
- type Configurer
- type ConfirmPrompt
- type Context
- type Highlight
- type Highlights
- type KeyConst
- type Line
- type Mode
- type Pager
- type PagerStack
- type Region
- type ShellCommand
- type Stream
- type StreamReader
- type StyledRune
- type TermStyle
- type TermStyles
- type Token
- type TokenReader
- type TokenType
- type Widget
- type WidgetStack
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ConfigDir string
)
Functions ¶
func AddChildPager ¶
func AddEventListener ¶
func AddEventListener(keyStr string, handler func())
func ConfirmExec ¶
func InterpolateContext ¶
func KeyEventFromString ¶
func KeyEventFromString(str string) keyEvent
func KeyEventFromTBEvent ¶
func LoadConfig ¶
func RegisterMode ¶
func SetAnnotatorsDir ¶ added in v0.0.2
func SetAnnotatorsDir(dir string)
Types ¶
type Annotation ¶
func NewAnnotation ¶
func NewAnnotation(start, end int, class string, val string) Annotation
type Annotations ¶ added in v0.0.2
type Annotations interface { Add(Annotation) Intersecting(Region) []Annotation Len() int }
func NewAnnotations ¶ added in v0.0.2
func NewAnnotations() Annotations
type Annotator ¶
type Annotator interface {
Annotate(io.Reader) <-chan Annotation
}
func NewExternalAnnotator ¶ added in v0.0.2
func NewMatchAnnotator ¶ added in v0.0.2
func NewRegexAnnotator ¶ added in v0.0.2
type Box ¶
type Box interface { Left() int Top() int Width() int Height() int DrawStyledRune(x, y int, sr StyledRune) DrawStyledRunes(x, y int, runes []StyledRune) Fill(sr StyledRune) }
type Buffer ¶
type Configurer ¶
func NewConfigurer ¶
func NewConfigurer() Configurer
type ConfirmPrompt ¶
func NewConfirmPrompt ¶
func NewConfirmPrompt() ConfirmPrompt
type Context ¶
func MergeContext ¶
type Highlights ¶ added in v0.0.2
func NewHighlights ¶ added in v0.0.2
func NewHighlights() Highlights
type KeyConst ¶
const ( KeyF1 KeyConst = KeyConst(termbox.KeyF1) KeyF2 KeyConst = KeyConst(termbox.KeyF2) KeyF3 KeyConst = KeyConst(termbox.KeyF3) KeyF4 KeyConst = KeyConst(termbox.KeyF4) KeyF5 KeyConst = KeyConst(termbox.KeyF5) KeyF6 KeyConst = KeyConst(termbox.KeyF6) KeyF7 KeyConst = KeyConst(termbox.KeyF7) KeyF8 KeyConst = KeyConst(termbox.KeyF8) KeyF9 KeyConst = KeyConst(termbox.KeyF9) KeyF10 KeyConst = KeyConst(termbox.KeyF10) KeyF11 KeyConst = KeyConst(termbox.KeyF11) KeyF12 KeyConst = KeyConst(termbox.KeyF12) KeyInsert KeyConst = KeyConst(termbox.KeyInsert) KeyDelete KeyConst = KeyConst(termbox.KeyDelete) KeyHome KeyConst = KeyConst(termbox.KeyHome) KeyEnd KeyConst = KeyConst(termbox.KeyEnd) KeyPgup KeyConst = KeyConst(termbox.KeyPgup) KeyPgdn KeyConst = KeyConst(termbox.KeyPgdn) KeyArrowUp KeyConst = KeyConst(termbox.KeyArrowUp) KeyArrowDown KeyConst = KeyConst(termbox.KeyArrowDown) KeyArrowLeft KeyConst = KeyConst(termbox.KeyArrowLeft) KeyArrowRight KeyConst = KeyConst(termbox.KeyArrowRight) KeyTab KeyConst = KeyConst(termbox.KeyTab) KeyBackspace KeyConst = KeyConst(termbox.KeyBackspace) KeyEnter KeyConst = KeyConst(termbox.KeyEnter) KeyEsc KeyConst = KeyConst(termbox.KeyEsc) KeySpace KeyConst = KeyConst(termbox.KeySpace) )
type Mode ¶
type Pager ¶
type PagerStack ¶
type PagerStack interface { Widget AddEventListener(string, func()) Show(int) Push(p Pager) Pop() Size() int AddChild(parent Pager, child Pager, creatingKey string) PushAsChild(Pager, string) ParentCursorUp() ParentCursorDown() }
func NewPagerStack ¶
func NewPagerStack() PagerStack
type ShellCommand ¶ added in v0.0.2
type ShellCommand interface { io.ReadCloser }
func NewShellCommand ¶ added in v0.0.2
func NewShellCommand(c string) (ShellCommand, error)
type Stream ¶ added in v0.0.2
type Stream interface { io.WriteCloser Bytes() []byte NewReader() StreamReader }
type StreamReader ¶ added in v0.0.2
type StyledRune ¶
func NewStyledRune ¶
func NewStyledRune(ch rune, ts TermStyle) StyledRune
func StyledRunesFromString ¶
func StyledRunesFromString(str string, ts TermStyle) []StyledRune
type TermStyles ¶ added in v0.0.2
type TermStyles interface { Get(termbox.Attribute, termbox.Attribute) TermStyle Default() TermStyle }
func NewTermStyles ¶ added in v0.0.2
func NewTermStyles() TermStyles
type TokenReader ¶ added in v0.0.2
func NewScanner ¶ added in v0.0.2
func NewScanner(rd io.Reader) TokenReader
type WidgetStack ¶
func NewWidgetStack ¶
func NewWidgetStack() WidgetStack
Click to show internal directories.
Click to hide internal directories.