Documentation
¶
Index ¶
- func Close() error
- func GetCursorRow() (int, error)
- func GetTerminalSize() (int, int)
- type Config
- type EventHandler
- type Frame
- func (frame *Frame) Append() (*Line, error)
- func (frame *Frame) AppendFooter() (*Line, error)
- func (frame *Frame) AppendHeader() (*Line, error)
- func (frame *Frame) AppendTrail(str string)
- func (frame *Frame) Clear()
- func (frame *Frame) Close() error
- func (frame *Frame) Draw() (errs []error)
- func (frame *Frame) Height() int
- func (frame *Frame) Insert(index int) (*Line, error)
- func (frame *Frame) IsClosed() bool
- func (frame *Frame) IsPastScreenBottom() bool
- func (frame *Frame) IsPastScreenTop() bool
- func (frame *Frame) Move(rows int)
- func (frame *Frame) Prepend() (*Line, error)
- func (frame *Frame) PrependFooter() (*Line, error)
- func (frame *Frame) PrependHeader() (*Line, error)
- func (frame *Frame) Remove(line *Line) error
- func (frame *Frame) SetAutoDraw(enabled bool)
- func (frame *Frame) VisibleHeight() int
- type Line
- func (line *Line) Clear() error
- func (line *Line) ClearAndClose() error
- func (line *Line) Close() error
- func (line *Line) Hide() error
- func (line *Line) Id() uuid.UUID
- func (line *Line) IsClosed() bool
- func (line *Line) Open() error
- func (line *Line) Read(buff []byte) (int, error)
- func (line *Line) Remove() error
- func (line *Line) Row() int
- func (line *Line) Show() error
- func (line Line) String() string
- func (line *Line) Write(buff []byte) (int, error)
- func (line *Line) WriteAndClose(buff []byte) (int, error)
- func (line *Line) WriteString(str string) error
- func (line *Line) WriteStringAndClose(str string) (int, error)
- type Policy
- type PositionPolicy
- type ScreenEvent
- type TestEventHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCursorRow ¶
todo: will this be supported on windows?... https://github.com/nsf/termbox-go/blob/master/termbox_windows.go currently assumed VT100 compatible emulator
func GetTerminalSize ¶
Types ¶
type Config ¶
type Config struct { Lines int HeaderRows int TrailOnRemove bool PositionPolicy PositionPolicy ManualDraw bool Output *os.File // contains filtered or unexported fields }
func (*Config) VisibleHeight ¶
type EventHandler ¶
type EventHandler interface {
// contains filtered or unexported methods
}
type Frame ¶
type Frame struct { Config Config HeaderLines []*Line BodyLines []*Line // contains filtered or unexported fields }
func (*Frame) AppendFooter ¶
func (*Frame) AppendHeader ¶
func (*Frame) AppendTrail ¶
func (*Frame) IsClosed ¶
todo: I think this should be decided by the user via a Close() action, not by the indication of closed lines since you can always add another line... you don't know when an empty frame should remain open or not
func (*Frame) IsPastScreenBottom ¶
func (*Frame) IsPastScreenTop ¶
func (*Frame) PrependFooter ¶
func (*Frame) PrependHeader ¶
func (*Frame) SetAutoDraw ¶
func (*Frame) VisibleHeight ¶
type Line ¶
type Line struct {
// contains filtered or unexported fields
}
func NewLine ¶
func NewLine(row int, events chan ScreenEvent) *Line
func (*Line) ClearAndClose ¶
func (*Line) WriteString ¶
type PositionPolicy ¶
type PositionPolicy int
const ( PolicyOverflow PositionPolicy = iota // allowed to go anywhere, even off the screen PolicyFloatForward // similar to free, except once it hits the bottom, it does not go off the screen (it makes more realestate). If the frame is too large for the screen, overflow (including headers) occurs at the top of the screen. // PolicyFloatForwardBuffered // similar to forward-trail, except once it hits the bottom, it does not go off the screen... instead it will act like a bottom-frame with the header fixed to the top of the screen. (it does NOT make more realestate, but instead buffers the unseen output and flushes it all to the screen at the end.). The header and footer stays on the screen while content is overflowed. PolicyFloatTop // top fixed PolicyFloatBottom // bottom fixed )
func (PositionPolicy) String ¶
func (float PositionPolicy) String() string
type ScreenEvent ¶
type ScreenEvent struct {
// contains filtered or unexported fields
}
type TestEventHandler ¶
type TestEventHandler struct {
// contains filtered or unexported fields
}
func NewTestEventHandler ¶
func NewTestEventHandler(t *testing.T) *TestEventHandler
Click to show internal directories.
Click to hide internal directories.