Debian Codegraph @

internal/display/window.go

raw
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 of the view (for vertical scroll)
12 StartLine SLoc
13
14 // Start column of the view (for horizontal scroll)
15 // note that since the starting column of every line is different if the view
16 // is scrolled, StartCol is a visual index (will be the same for every line)
17 StartCol int
18 }
19
20 type Window interface {
21 Display()
22 Clear()
23 Relocate() bool
24 GetView() *View
25 SetView(v *View)
26 LocFromVisual(vloc buffer.Loc) buffer.Loc
27 Resize(w, h int)
28 SetActive(b bool)
29 IsActive() bool
30 }
31
32 type BWindow interface {
33 Window
34 SoftWrap
35 SetBuffer(b *buffer.Buffer)
36 BufView() View
37 }