Documentation ¶
Index ¶
- func InitScreen() tcell.Screen
- type Buffer
- func (buffer *Buffer) AddLine(line []rune)
- func (buffer *Buffer) Delete()
- func (buffer *Buffer) DeleteLine()
- func (buffer *Buffer) Draw(screen tcell.Screen)
- func (buffer *Buffer) InsertRune(r rune)
- func (buffer *Buffer) IsEmpty() bool
- func (buffer *Buffer) LoadFromFile(filepath string) error
- func (buffer *Buffer) NewLine()
- func (buffer *Buffer) SaveAs() (err error)
- func (buffer *Buffer) String() string
- type Config
- type Cursor
- func (cursor *Cursor) AtBeginOfLine() bool
- func (cursor *Cursor) AtEndOfLine() bool
- func (cursor *Cursor) AtFirstLineOfBuffer() bool
- func (cursor *Cursor) AtLastLineOfBuffer() bool
- func (cursor *Cursor) IsLastPoint() bool
- func (cursor *Cursor) IsOriginPoint() bool
- func (cursor *Cursor) MoveDown()
- func (cursor *Cursor) MoveLeft()
- func (cursor *Cursor) MovePrevLine()
- func (cursor *Cursor) MoveRight()
- func (cursor *Cursor) MoveUp()
- func (cursor *Cursor) NewLine()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitScreen ¶
Types ¶
type Buffer ¶
type Buffer struct { // current cursor CurrCursor *Cursor // []rune just equivalent of one line, and a rune is a rune. Runes [][]rune // how many lines of buffer, start with 0 Lines int Config *Config }
content of screen
func (*Buffer) DeleteLine ¶
func (buffer *Buffer) DeleteLine()
func (*Buffer) InsertRune ¶
Insert a rune behind current cursor
func (*Buffer) LoadFromFile ¶
type Cursor ¶
The cursor position
func (*Cursor) AtBeginOfLine ¶
func (*Cursor) AtFirstLineOfBuffer ¶
func (*Cursor) AtLastLineOfBuffer ¶
at the last line of buffer
func (*Cursor) MovePrevLine ¶
func (cursor *Cursor) MovePrevLine()
Click to show internal directories.
Click to hide internal directories.