Documentation ¶
Index ¶
- Constants
- Variables
- type CellRune
- type Color
- type DefaultColor
- type IndexColor
- type LineInfo
- type ModifyTx
- type Output
- type PenAttr
- type PenGraphic
- type PenState
- type Pos
- type RGBColor
- type Rect
- func (r Rect) Height() int
- func (s Rect) ScrollDown(dist int) ScrollRect
- func (s Rect) ScrollLeft(dist int) ScrollRect
- func (s Rect) ScrollRight(dist int) ScrollRect
- func (s Rect) ScrollUp(dist int) ScrollRect
- func (s Rect) SplitColumns(perc float32) (Rect, Rect)
- func (s Rect) SplitEvenColumns() (Rect, Rect)
- func (s Rect) SplitEvenRows() (Rect, Rect)
- func (s Rect) SplitRows(perc float32) (Rect, Rect)
- func (r Rect) Width() int
- type ScrollDirection
- type ScrollRect
- type State
- type TermAttr
Constants ¶
View Source
const ( MouseNone int = iota MouseClick MouseDrag MouseMove )
View Source
const ( MouseX10 int = iota MouseUTF8 MouseSGR MouseRXVT )
Variables ¶
View Source
var NamedColors = map[int]string{
0: "black",
1: "red",
2: "green",
3: "yellow",
4: "blue",
5: "magenta",
6: "cyan",
7: "white",
8: "bright black",
9: "bright red",
10: "bright green",
11: "bright yellow",
12: "bright blue",
13: "bright magenta",
14: "bright cyan",
15: "bright white",
}
Functions ¶
This section is empty.
Types ¶
type DefaultColor ¶
type DefaultColor struct{}
type IndexColor ¶
type IndexColor struct {
Index int
}
func (IndexColor) String ¶
func (i IndexColor) String() string
type Output ¶
type Output interface { MoveCursor(pos Pos) error SetCell(pos Pos, val CellRune) error BeginTx() ModifyTx AppendCell(pos Pos, r rune) error ClearRect(r Rect) error ScrollRect(s ScrollRect) error Output(data []byte) error SetTermProp(prop TermAttr, val interface{}) error SetPenProp(prop PenAttr, val interface{}, ps PenState) error StringEvent(kind string, data []byte) error Resize(rows, cols int, lines []LineInfo) error }
type PenGraphic ¶
type PenGraphic uint16
const ( // used as separate bits, so specified directly PenNormal PenGraphic = iota PenBold PenGraphic = (1 << iota) PenFaint PenGraphic = (1 << iota) PenBlink PenGraphic = (1 << iota) PenConceal PenGraphic = (1 << iota) PenItalic PenGraphic = (1 << iota) PenFraktur PenGraphic = (1 << iota) PenUnderlineSingle PenGraphic = (1 << iota) PenUnderlineDouble PenGraphic = (1 << iota) PenReverse PenGraphic = (1 << iota) PenStrikeThrough PenGraphic = (1 << iota) PenFramed PenGraphic = (1 << iota) PenEncircled PenGraphic = (1 << iota) PenOverlined PenGraphic = (1 << iota) PenIntensity PenGraphic = PenBold | PenFaint PenStyle PenGraphic = PenItalic | PenFraktur PenUnderlineCurly PenGraphic = PenUnderlineSingle | PenUnderlineDouble PenUnderline PenGraphic = PenUnderlineCurly PenWrapper PenGraphic = PenFramed | PenEncircled )
func (PenGraphic) String ¶
func (i PenGraphic) String() string
type PenState ¶
type PenState struct {
// contains filtered or unexported fields
}
func (*PenState) Attrs ¶
func (p *PenState) Attrs() PenGraphic
type Rect ¶
type Rect struct {
Start, End Pos
}
func (Rect) ScrollDown ¶
func (s Rect) ScrollDown(dist int) ScrollRect
func (Rect) ScrollLeft ¶
func (s Rect) ScrollLeft(dist int) ScrollRect
func (Rect) ScrollRight ¶
func (s Rect) ScrollRight(dist int) ScrollRect
func (Rect) ScrollUp ¶
func (s Rect) ScrollUp(dist int) ScrollRect
func (Rect) SplitColumns ¶
Split the rectangle into two rectangles as columns within the original rectangle. The size of the right rectangle is a +perc+ percentage of the original
func (Rect) SplitEvenColumns ¶
Split the rectangle into 2 parts as though we were to run a line down the middle vertically in the original.
func (Rect) SplitEvenRows ¶
Split the rectangle into 2 parts as though we were to run a line down the middle horizontally in the original.
type ScrollDirection ¶
type ScrollDirection int
const ( ScrollNone ScrollDirection = iota // don't scroll ScrollUp // move the content at the top of the rect to the bottom ScrollDown // move the content at the bottom of the rect to the top ScrollRight // move the content on the right side of the rect to the left side ScrollLeft // move the content on the left side of the rect to the right side )
func (ScrollDirection) String ¶
func (i ScrollDirection) String() string
type ScrollRect ¶
type ScrollRect struct { Rect Direction ScrollDirection Distance int }
Click to show internal directories.
Click to hide internal directories.