Add some commands

This commit is contained in:
Zachary Yedidia
2019-01-14 00:57:39 -05:00
parent 23926af9f7
commit 01f618627b
9 changed files with 160 additions and 15 deletions

View File

@@ -41,6 +41,10 @@ func NewBufWindow(x, y, width, height int, buf *buffer.Buffer) *BufWindow {
return w
}
func (w *BufWindow) SetBuffer(b *buffer.Buffer) {
w.Buf = b
}
func (v *View) GetView() *View {
return v
}

View File

@@ -53,6 +53,10 @@ func (i *InfoWindow) Resize(w, h int) {
i.y = h
}
func (i *InfoWindow) SetBuffer(b *buffer.Buffer) {
i.InfoBuf.Buffer = b
}
// func (i *InfoWindow) YesNoPrompt() (bool, bool) {
// for {
// i.Clear()

View File

@@ -24,3 +24,8 @@ type Window interface {
Resize(w, h int)
SetActive(b bool)
}
type BWindow interface {
Window
SetBuffer(b *buffer.Buffer)
}