-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharea.go
More file actions
40 lines (33 loc) · 723 Bytes
/
area.go
File metadata and controls
40 lines (33 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package main
import (
"github.com/kybin/tor/cell"
"github.com/kybin/tor/syntax"
)
// Area is an area of screen.
// An Area has it's matching Window that is same size.
type Area struct {
min cell.Pt
size cell.Pt
Win *Window
}
// NewArea creates a new Area.
func NewArea(min cell.Pt, size cell.Pt) *Area {
a := &Area{
min: min,
size: size,
Win: NewWindow(size),
}
return a
}
func (a *Area) Set(min cell.Pt, size cell.Pt) {
a.min = min
a.size = size
a.Win.size = size
}
// Resize resizes it and it's window size.
func (a *Area) Resize(size cell.Pt) {
a.size = size
a.Win.size = size
}
func (a *Area) Draw(tx Text, sel *Selection, matches []syntax.Match) {}
func (a *Area) DrawCursor(c Cursor) {}