Documentation
¶
Overview ¶
Package bublog to show your logs in TUI and duplicate them to other places.
Index ¶
- func SplitLine(line []rune, maxWidth int) [][]rune
- type KeyMap
- type Model
- type TextViewer
- func (t *TextViewer) AppendToText(s string)
- func (t *TextViewer) Recalculate()
- func (t *TextViewer) ScrollDown() bool
- func (t *TextViewer) ScrollTextDown() bool
- func (t *TextViewer) ScrollTextUp() bool
- func (t *TextViewer) ScrollUp() bool
- func (t *TextViewer) SetHeight(h int)
- func (t *TextViewer) SetWidth(w int)
- func (t *TextViewer) SwitchStickToBottom()
- func (t *TextViewer) View() [][]rune
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KeyMap ¶ added in v0.0.3
func DefaultKeyMap ¶ added in v0.0.3
func DefaultKeyMap() *KeyMap
type Model ¶
type Model struct {
AdditionalWriters []io.Writer
Viewer *TextViewer
KeyMap *KeyMap
}
type TextViewer ¶ added in v0.0.3
type TextViewer struct {
// Inner representation of Text is already split by /n to make it easier to navigate.
Text [][]rune
// DisplayText has several layer structure.
// Upper level represents a complete /n line from Text.
// Level below is a sublines - several strings gotten from original to fix into Width.
// Last level is rune representation of a string.
DisplayText [][][]rune
Width int
Height int
// LineInText shows from which line current DisplayText is rendered.
LineInText int
SubLineInDisplayText int
StickedToBottom bool
}
TextViewer takes Text and allows to have only a portion of it being displayed in given Private.Width and Private.Height
func NewTextViewer ¶ added in v0.0.3
func NewTextViewer(text []rune) *TextViewer
func (*TextViewer) AppendToText ¶ added in v0.0.3
func (t *TextViewer) AppendToText(s string)
func (*TextViewer) Recalculate ¶ added in v0.0.3
func (t *TextViewer) Recalculate()
func (*TextViewer) ScrollDown ¶ added in v0.0.3
func (t *TextViewer) ScrollDown() bool
func (*TextViewer) ScrollTextDown ¶ added in v0.0.3
func (t *TextViewer) ScrollTextDown() bool
func (*TextViewer) ScrollTextUp ¶ added in v0.0.3
func (t *TextViewer) ScrollTextUp() bool
func (*TextViewer) ScrollUp ¶ added in v0.0.3
func (t *TextViewer) ScrollUp() bool
func (*TextViewer) SetHeight ¶ added in v0.0.3
func (t *TextViewer) SetHeight(h int)
func (*TextViewer) SetWidth ¶ added in v0.0.3
func (t *TextViewer) SetWidth(w int)
func (*TextViewer) SwitchStickToBottom ¶ added in v0.0.3
func (t *TextViewer) SwitchStickToBottom()
func (*TextViewer) View ¶ added in v0.0.3
func (t *TextViewer) View() [][]rune
Click to show internal directories.
Click to hide internal directories.