Documentation ¶
Index ¶
- Variables
- func Main(app func(context.Context, Events) error, viewfns ...func()) error
- func PopView()
- func PushView(v View)
- func PushViewFunc(f func())
- func RemoveView(v View)
- func Show()
- func Sync()
- type Align
- type Box
- func (b *Box) CenterOf(dst *Box) *Box
- func (b *Box) Clear()
- func (b *Box) DrawSides(title string, left, top, right, bottom int) *Box
- func (b *Box) Enclose(title string) *Box
- func (b *Box) Fit(dst *Box, dstx, dsty, srcx, srcy float64) *Box
- func (b *Box) GridCell(g *Grid, left, top, right, bottom int) *Box
- func (b *Box) GridItem(g *Grid, name string) *Box
- func (b *Box) InsideSides(left, top, right, bottom int) *Box
- func (b *Box) IsClicked(e *tcell.EventMouse) bool
- func (b *Box) Print(a ...interface{})
- func (b *Box) Printf(format string, a ...interface{})
- func (b *Box) Println(a ...interface{})
- func (b *Box) Prints(s string)
- func (b *Box) Puts(s string)
- func (b *Box) Write(p []byte) (int, error)
- type Buffer
- type Events
- type Grid
- type Length
- type LengthUnit
- type Point
- type View
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAborted represents that the program was aborted // for some reason, such as Ctrl+C or OS signals. ErrAborted = fmt.Errorf("program aborted") )
Functions ¶
Types ¶
type Box ¶
type Box struct { Pos Point Size Point Scroll Point Style tcell.Style // contains filtered or unexported fields }
Box represents an area on the screen and provides various drawing and layout functions.
func (*Box) InsideSides ¶
type Events ¶
Events is an alias of chan tcell.Event and provides some reading functions.
func (Events) ReadKey ¶
ReadKey waits for a key event to the channel and returns it. Other events are ignored.
func (Events) ReadMouse ¶
func (es Events) ReadMouse() *tcell.EventMouse
ReadMouse waits for a mouse event to the channel and returns it. Other events are ignored.
type Length ¶
type Length struct { Unit LengthUnit Value int }
type LengthUnit ¶
type LengthUnit int
const ( Em LengthUnit = iota Fr )
func (LengthUnit) String ¶
func (u LengthUnit) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.