Documentation ¶
Index ¶
- type Buffer
- func (buffer *Buffer) Backspace()
- func (buffer *Buffer) BottomMargin() uint
- func (buffer *Buffer) CarriageReturn()
- func (buffer *Buffer) Clear()
- func (buffer *Buffer) ClearSelection()
- func (buffer *Buffer) Compare(path string) bool
- func (buffer *Buffer) CursorAttr() *CellAttributes
- func (buffer *Buffer) CursorColumn() uint16
- func (buffer *Buffer) CursorLine() uint16
- func (buffer *Buffer) CursorLineAbsolute() uint16
- func (buffer *Buffer) DeleteChars(n int)
- func (buffer *Buffer) DeleteLines(count int)
- func (buffer *Buffer) EraseCharacters(n int)
- func (buffer *Buffer) EraseDisplay()
- func (buffer *Buffer) EraseDisplayFromCursor()
- func (buffer *Buffer) EraseDisplayToCursor()
- func (buffer *Buffer) EraseLine()
- func (buffer *Buffer) EraseLineFromCursor()
- func (buffer *Buffer) EraseLineToCursor()
- func (buffer *Buffer) ExtendSelection(col uint16, viewRow uint16, complete bool)
- func (buffer *Buffer) GetCell(viewCol uint16, viewRow uint16) *Cell
- func (buffer *Buffer) GetHintAtPosition(col uint16, viewRow uint16) *hints.Hint
- func (buffer *Buffer) GetRawCell(viewCol uint16, rawLine uint64) *Cell
- func (buffer *Buffer) GetScrollOffset() uint
- func (buffer *Buffer) GetSelectedText() string
- func (buffer *Buffer) GetURLAtPosition(col uint16, viewRow uint16) string
- func (buffer *Buffer) GetVisibleLines() []Line
- func (buffer *Buffer) HasScrollableRegion() bool
- func (buffer *Buffer) Height() int
- func (buffer *Buffer) InScrollableRegion() bool
- func (buffer *Buffer) InSelection(col uint16, row uint16) bool
- func (buffer *Buffer) Index()
- func (buffer *Buffer) InsertBlankCharacters(count int)
- func (buffer *Buffer) InsertLines(count int)
- func (buffer *Buffer) IsDirty() bool
- func (buffer *Buffer) IsNewLineMode() bool
- func (buffer *Buffer) IsSelectionComplete() bool
- func (buffer *Buffer) MovePosition(x int16, y int16)
- func (buffer *Buffer) NewLine()
- func (buffer *Buffer) NewLineEx(forceCursorToMargin bool)
- func (buffer *Buffer) RawLine() uint64
- func (buffer *Buffer) ResizeView(width uint16, height uint16)
- func (buffer *Buffer) RestoreCursor()
- func (buffer *Buffer) ReverseIndex()
- func (buffer *Buffer) ReverseVideo()
- func (buffer *Buffer) Save(path string)
- func (buffer *Buffer) SaveCursor()
- func (buffer *Buffer) ScrollDown(lines uint16)
- func (buffer *Buffer) ScrollPageDown()
- func (buffer *Buffer) ScrollPageUp()
- func (buffer *Buffer) ScrollToEnd()
- func (buffer *Buffer) ScrollUp(lines uint16)
- func (buffer *Buffer) SetPosition(col uint16, line uint16)
- func (buffer *Buffer) StartSelection(col uint16, viewRow uint16, mode SelectionMode)
- func (buffer *Buffer) Tab()
- func (buffer *Buffer) TopMargin() uint
- func (buffer *Buffer) ViewHeight() uint16
- func (buffer *Buffer) ViewWidth() uint16
- func (buffer *Buffer) Width() uint16
- func (buffer *Buffer) Write(runes ...rune)
- type Cell
- type CellAttributes
- type Line
- type Position
- type SelectionMode
- type TerminalState
- func (terminalState *TerminalState) DefaultCell(applyEffects bool) Cell
- func (terminalState *TerminalState) IsNewLineMode() bool
- func (terminalState *TerminalState) IsTabSetAtCursor() bool
- func (terminalState *TerminalState) ResetVerticalMargins()
- func (terminalState *TerminalState) SetVerticalMargins(top uint, bottom uint)
- func (terminalState *TerminalState) TabClear(index uint16)
- func (terminalState *TerminalState) TabClearAtCursor()
- func (terminalState *TerminalState) TabReset()
- func (terminalState *TerminalState) TabSet(index uint16)
- func (terminalState *TerminalState) TabSetAtCursor()
- func (terminalState *TerminalState) TabZonk()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func NewBuffer ¶
func NewBuffer(terminalState *TerminalState) *Buffer
NewBuffer creates a new terminal buffer
func (*Buffer) BottomMargin ¶
func (*Buffer) CarriageReturn ¶
func (buffer *Buffer) CarriageReturn()
func (*Buffer) ClearSelection ¶ added in v0.8.9
func (buffer *Buffer) ClearSelection()
func (*Buffer) CursorAttr ¶
func (buffer *Buffer) CursorAttr() *CellAttributes
func (*Buffer) CursorColumn ¶
Column returns cursor column
func (*Buffer) CursorLine ¶
CursorLine returns cursor line (in Origin Mode it is relative to the top margin)
func (*Buffer) CursorLineAbsolute ¶ added in v0.9.0
CursorLineAbsolute returns absolute cursor line coordinate (ignoring Origin Mode)
func (*Buffer) DeleteChars ¶
func (*Buffer) DeleteLines ¶
func (*Buffer) EraseCharacters ¶
func (*Buffer) EraseDisplay ¶
func (buffer *Buffer) EraseDisplay()
func (*Buffer) EraseDisplayFromCursor ¶
func (buffer *Buffer) EraseDisplayFromCursor()
func (*Buffer) EraseDisplayToCursor ¶
func (buffer *Buffer) EraseDisplayToCursor()
func (*Buffer) EraseLineFromCursor ¶
func (buffer *Buffer) EraseLineFromCursor()
func (*Buffer) EraseLineToCursor ¶
func (buffer *Buffer) EraseLineToCursor()
func (*Buffer) ExtendSelection ¶ added in v0.9.0
func (*Buffer) GetHintAtPosition ¶
func (*Buffer) GetRawCell ¶ added in v0.7.2
func (*Buffer) GetScrollOffset ¶
func (*Buffer) GetSelectedText ¶
func (*Buffer) GetURLAtPosition ¶
func (*Buffer) GetVisibleLines ¶
func (*Buffer) HasScrollableRegion ¶
func (*Buffer) InScrollableRegion ¶
func (*Buffer) InsertBlankCharacters ¶
func (*Buffer) InsertLines ¶
func (*Buffer) IsNewLineMode ¶ added in v0.8.8
func (*Buffer) IsSelectionComplete ¶ added in v0.9.0
func (*Buffer) MovePosition ¶
func (*Buffer) ResizeView ¶
func (*Buffer) RestoreCursor ¶
func (buffer *Buffer) RestoreCursor()
func (*Buffer) ReverseIndex ¶
func (buffer *Buffer) ReverseIndex()
func (*Buffer) ReverseVideo ¶ added in v0.9.0
func (buffer *Buffer) ReverseVideo()
func (*Buffer) SaveCursor ¶
func (buffer *Buffer) SaveCursor()
func (*Buffer) ScrollDown ¶
func (*Buffer) ScrollPageDown ¶
func (buffer *Buffer) ScrollPageDown()
func (*Buffer) ScrollPageUp ¶
func (buffer *Buffer) ScrollPageUp()
func (*Buffer) ScrollToEnd ¶
func (buffer *Buffer) ScrollToEnd()
func (*Buffer) SetPosition ¶
func (*Buffer) StartSelection ¶
func (buffer *Buffer) StartSelection(col uint16, viewRow uint16, mode SelectionMode)
func (*Buffer) ViewHeight ¶
type Cell ¶
type Cell struct {
// contains filtered or unexported fields
}
func NewBackgroundCell ¶
func (*Cell) Attr ¶
func (cell *Cell) Attr() CellAttributes
type CellAttributes ¶
type CellAttributes struct { FgColour [3]float32 BgColour [3]float32 Bold bool Dim bool Underline bool Blink bool Inverse bool Hidden bool }
func (*CellAttributes) ReverseVideo ¶ added in v0.9.0
func (cellAttr *CellAttributes) ReverseVideo()
type Line ¶
type Line struct {
// contains filtered or unexported fields
}
func (*Line) Cleanse ¶
func (line *Line) Cleanse()
Cleanse removes null bytes from the end of the row
func (*Line) CutCellsAfter ¶
@todo test these (ported from legacy) ------------------
func (*Line) CutCellsFromBeginning ¶
func (*Line) CutCellsFromEnd ¶
func (*Line) ReverseVideo ¶ added in v0.9.0
func (line *Line) ReverseVideo()
type SelectionMode ¶ added in v0.9.0
type SelectionMode int
const ( SelectionChar SelectionMode = iota // char-by-char selection SelectionWord SelectionMode = iota // by word selection SelectionLine SelectionMode = iota // whole line selection )
type TerminalState ¶ added in v0.8.9
type TerminalState struct { CursorAttr CellAttributes ReplaceMode bool // overwrite character at cursor or insert new OriginMode bool // see DECOM docs - whether cursor is positioned within the margins or not LineFeedMode bool ScreenMode bool // DECSCNM (black on white background) AutoWrap bool Charsets []*map[rune]rune // array of 2 charsets, nil means ASCII (no conversion) CurrentCharset int // active charset index in Charsets array, valid values are 0 or 1 // contains filtered or unexported fields }
func NewTerminalState ¶ added in v0.8.9
func NewTerminalState(viewCols uint16, viewLines uint16, attr CellAttributes, maxLines uint64) *TerminalState
NewTerminalMode creates a new terminal state
func (*TerminalState) DefaultCell ¶ added in v0.9.0
func (terminalState *TerminalState) DefaultCell(applyEffects bool) Cell
func (*TerminalState) IsNewLineMode ¶ added in v0.8.9
func (terminalState *TerminalState) IsNewLineMode() bool
func (*TerminalState) IsTabSetAtCursor ¶ added in v0.8.9
func (terminalState *TerminalState) IsTabSetAtCursor() bool
func (*TerminalState) ResetVerticalMargins ¶ added in v0.8.9
func (terminalState *TerminalState) ResetVerticalMargins()
ResetVerticalMargins resets margins to extreme positions
func (*TerminalState) SetVerticalMargins ¶ added in v0.8.9
func (terminalState *TerminalState) SetVerticalMargins(top uint, bottom uint)
func (*TerminalState) TabClear ¶ added in v0.8.9
func (terminalState *TerminalState) TabClear(index uint16)
func (*TerminalState) TabClearAtCursor ¶ added in v0.8.9
func (terminalState *TerminalState) TabClearAtCursor()
func (*TerminalState) TabReset ¶ added in v0.8.9
func (terminalState *TerminalState) TabReset()
func (*TerminalState) TabSet ¶ added in v0.8.9
func (terminalState *TerminalState) TabSet(index uint16)
func (*TerminalState) TabSetAtCursor ¶ added in v0.8.9
func (terminalState *TerminalState) TabSetAtCursor()
func (*TerminalState) TabZonk ¶ added in v0.8.9
func (terminalState *TerminalState) TabZonk()
Click to show internal directories.
Click to hide internal directories.