Documentation
¶
Overview ¶
Helper library for termbox-go to split screen into panels
Index ¶
- func DrawAll(p ...Panel)
- func DrawBorder(p BorderedPanel)
- func Write(panel Panel, b []byte) (n int, err error)
- type BorderedPanel
- type Buffered
- func (panel *Buffered) At(x, y int) termbox.Cell
- func (panel *Buffered) Buffer() []termbox.Cell
- func (panel *Buffered) Clear() *Buffered
- func (panel *Buffered) Draw()
- func (panel *Buffered) SetCell(x, y int, ch rune, fg, bg termbox.Attribute)
- func (panel *Buffered) Write(b []byte) (n int, err error)
- type Drawer
- type Panel
- type Unbuffered
- func (panel *Unbuffered) Area(r image.Rectangle) *Unbuffered
- func (panel *Unbuffered) At(x, y int) termbox.Cell
- func (panel *Unbuffered) Border() termbox.Cell
- func (panel *Unbuffered) Bounds() image.Rectangle
- func (panel *Unbuffered) Move(deltax, deltay int)
- func (panel *Unbuffered) SetBorder(style termbox.Cell)
- func (panel *Unbuffered) SetCell(x, y int, ch rune, fg, bg termbox.Attribute)
- func (panel *Unbuffered) SetCursor(x, y int)
- func (panel *Unbuffered) Write(b []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BorderedPanel ¶
type Buffered ¶
type Buffered struct { Unbuffered // contains filtered or unexported fields }
func MainScreen ¶
func MainScreen() *Buffered
Returns buffered struct of the main screen. NOTE: Resize creates new buffer?
type Unbuffered ¶
type Unbuffered struct {
// contains filtered or unexported fields
}
Panel that writes directly to termbox buffer. *Unbuffered methods can be used directly with *Buffered as well.
func NewUnbuffered ¶
func NewUnbuffered(r image.Rectangle, border termbox.Cell) *Unbuffered
func (*Unbuffered) Area ¶
func (panel *Unbuffered) Area(r image.Rectangle) *Unbuffered
Returns unbuffered panel that contains area of 'panel' r specifies. NOTE: At current state *Unbuffered always writes to main termbox buffer.
func (*Unbuffered) Border ¶
func (panel *Unbuffered) Border() termbox.Cell
func (*Unbuffered) Bounds ¶
func (panel *Unbuffered) Bounds() image.Rectangle
func (*Unbuffered) Move ¶
func (panel *Unbuffered) Move(deltax, deltay int)
func (*Unbuffered) SetBorder ¶
func (panel *Unbuffered) SetBorder(style termbox.Cell)
func (*Unbuffered) SetCell ¶
func (panel *Unbuffered) SetCell(x, y int, ch rune, fg, bg termbox.Attribute)
func (*Unbuffered) SetCursor ¶
func (panel *Unbuffered) SetCursor(x, y int)
Click to show internal directories.
Click to hide internal directories.