Documentation ¶
Index ¶
- type Editor
- func (e *Editor) BuftoWin(x, y int) (int, int)
- func (e *Editor) Cursor() (int, int)
- func (e *Editor) Draw(s tcell.Screen)
- func (e *Editor) Input(ev *tcell.EventKey)
- func (e *Editor) Load(path string)
- func (e *Editor) MoveCursor(dx, dy int)
- func (e *Editor) MoveWindow(dx, dy int)
- func (e *Editor) Save(path string)
- func (e *Editor) SetCursor(x, y int)
- func (e *Editor) Status() (status string)
- func (e *Editor) WintoBuf(x, y int) (int, int)
- type Manager
- type Mode
- type StatusBar
- type View
- type Window
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Editor ¶
type Editor struct { Window *Window Buffer [][]rune Path string Mode Mode // contains filtered or unexported fields }
Editor defines an editor window for editing a single file
func (*Editor) MoveCursor ¶
MoveCursor moves the cursor within boundaries, shifting the offset if necessary
func (*Editor) MoveWindow ¶
MoveWindow shifts the editor window
type Manager ¶
type Manager struct { Status *StatusBar Editor *Editor // TODO: Add support for multiple editors Focused View }
Manager is the main UI handler for each instance of a program
func NewManager ¶
NewManager creates an returns the standard initial layout for a jai instance
type StatusBar ¶
StatusBar is the status bar shown for each editor
func NewStatusBar ¶
NewStatusBar creates and returns the default status bar
type View ¶
type View interface { Input(*tcell.EventKey) Draw(s tcell.Screen) Cursor() (int, int) Status() string }
View is a drawable view on the screen
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
Window represents a view in the UI
Click to show internal directories.
Click to hide internal directories.