]> git.lizzy.rs Git - micro.git/blob - internal/display/window.go
Fix v2 import path for go mod
[micro.git] / internal / display / window.go
1 package display
2
3 import (
4         "github.com/zyedidia/micro/v2/internal/buffer"
5 )
6
7 type View struct {
8         X, Y          int // X,Y location of the view
9         Width, Height int // Width and height of the view
10
11         // Start line and start column of the view (vertical/horizontal scroll)
12         // note that since the starting column of every line is different if the view
13         // is scrolled, StartCol is a visual index (will be the same for every line)
14         StartLine, StartCol int
15 }
16
17 type Window interface {
18         Display()
19         Clear()
20         Relocate() bool
21         GetView() *View
22         SetView(v *View)
23         LocFromVisual(vloc buffer.Loc) buffer.Loc
24         Resize(w, h int)
25         SetActive(b bool)
26         IsActive() bool
27 }
28
29 type BWindow interface {
30         Window
31         SetBuffer(b *buffer.Buffer)
32 }